Compare commits
3 Commits
beaea0bd66
...
dbafe01b1d
Author | SHA1 | Date | |
---|---|---|---|
dbafe01b1d | |||
342b1ea1df | |||
6feecc1fdc |
@ -48,81 +48,85 @@ of said command running.
|
|||||||
#+header: :wrap "src bash :exports code"
|
#+header: :wrap "src bash :exports code"
|
||||||
#+BEGIN_SRC emacs-lisp :var table=autostart-table :cache yes
|
#+BEGIN_SRC emacs-lisp :var table=autostart-table :cache yes
|
||||||
(mapconcat (lambda (start-command)
|
(mapconcat (lambda (start-command)
|
||||||
(let* ((command (replace-regexp-in-string (regexp-quote "~") "" (nth 0 start-command)))
|
(let* ((command (replace-regexp-in-string "~" "" (nth 0 start-command)))
|
||||||
(arguments (replace-regexp-in-string (regexp-quote "~") "" (nth 1 start-command)))
|
(arguments (replace-regexp-in-string "~" "" (nth 1 start-command)))
|
||||||
(oncep (string= "yes" (nth 2 start-command)))
|
(oncep (string= "yes" (nth 2 start-command)))
|
||||||
(full-command (replace-regexp-in-string " +"
|
(full-command (replace-regexp-in-string
|
||||||
" "
|
" +"
|
||||||
(format "%s %s &" command arguments))))
|
" "
|
||||||
(if oncep
|
(format "%s %s &" command arguments))))
|
||||||
(format
|
|
||||||
(concat "if pgrep -x %s ; then\n"
|
(concat (format "which %s && %s"
|
||||||
" echo \"%s already running\"\n"
|
command
|
||||||
"else\n"
|
(if (not oncep)
|
||||||
" %s\n"
|
full-command
|
||||||
" disown\n"
|
(format (concat "if pgrep -x %s ; then\n"
|
||||||
"fi")
|
" echo %s already running\n"
|
||||||
command
|
"else\n"
|
||||||
command
|
" %s\n"
|
||||||
full-command)
|
" disown\n"
|
||||||
full-command)))
|
"fi")
|
||||||
|
command
|
||||||
|
command
|
||||||
|
command
|
||||||
|
full-command))))))
|
||||||
table
|
table
|
||||||
"\n")
|
"\n")
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
#+RESULTS[97a97fceb694333615e59599d7c2d7fac52c5e8d]: autostart-gen
|
#+RESULTS[64fcf7c33f989171bc7582495cd508959f4030c3]: autostart-gen
|
||||||
#+begin_src bash :exports code
|
#+begin_src bash :exports code
|
||||||
pactl load-module module-switch-on-connect &
|
which pactl && pactl load-module module-switch-on-connect &
|
||||||
mpc stop &
|
which mpc && mpc stop &
|
||||||
xrdb -merge "$HOME"/.Xresources &
|
which xrdb && xrdb -merge "$HOME"/.Xresources &
|
||||||
if pgrep -x picom ; then
|
which picom && if pgrep -x picom ; then
|
||||||
echo "picom already running"
|
echo picom already running
|
||||||
else
|
else
|
||||||
picom --experimental-backends &
|
picom
|
||||||
disown
|
disown
|
||||||
fi
|
fi
|
||||||
set-screens &
|
which set-screens && set-screens &
|
||||||
if pgrep -x numlockx ; then
|
which numlockx && if pgrep -x numlockx ; then
|
||||||
echo "numlockx already running"
|
echo numlockx already running
|
||||||
else
|
else
|
||||||
numlockx on &
|
numlockx
|
||||||
disown
|
disown
|
||||||
fi
|
fi
|
||||||
if pgrep -x pumopm ; then
|
which pumopm && if pgrep -x pumopm ; then
|
||||||
echo "pumopm already running"
|
echo pumopm already running
|
||||||
else
|
else
|
||||||
pumopm &
|
pumopm
|
||||||
disown
|
disown
|
||||||
fi
|
fi
|
||||||
if pgrep -x xfce-polkit ; then
|
which xfce-polkit && if pgrep -x xfce-polkit ; then
|
||||||
echo "xfce-polkit already running"
|
echo xfce-polkit already running
|
||||||
else
|
else
|
||||||
xfce-polkit &
|
xfce-polkit
|
||||||
disown
|
disown
|
||||||
fi
|
fi
|
||||||
if pgrep -x nm-applet ; then
|
which nm-applet && if pgrep -x nm-applet ; then
|
||||||
echo "nm-applet already running"
|
echo nm-applet already running
|
||||||
else
|
else
|
||||||
nm-applet &
|
nm-applet
|
||||||
disown
|
disown
|
||||||
fi
|
fi
|
||||||
xwallpaper --zoom "$(cat "$HOME"/.cache/wallpaper)" &
|
which xwallpaper && xwallpaper --zoom "$(cat "$HOME"/.cache/wallpaper)" &
|
||||||
if pgrep -x xss-lock ; then
|
which xss-lock && if pgrep -x xss-lock ; then
|
||||||
echo "xss-lock already running"
|
echo xss-lock already running
|
||||||
else
|
else
|
||||||
xss-lock plock &
|
xss-lock
|
||||||
disown
|
disown
|
||||||
fi
|
fi
|
||||||
if pgrep -x /usr/lib/kdeconnectd ; then
|
which /usr/lib/kdeconnectd && if pgrep -x /usr/lib/kdeconnectd ; then
|
||||||
echo "/usr/lib/kdeconnectd already running"
|
echo /usr/lib/kdeconnectd already running
|
||||||
else
|
else
|
||||||
/usr/lib/kdeconnectd &
|
/usr/lib/kdeconnectd
|
||||||
disown
|
disown
|
||||||
fi
|
fi
|
||||||
if pgrep -x dunst ; then
|
which dunst && if pgrep -x dunst ; then
|
||||||
echo "dunst already running"
|
echo dunst already running
|
||||||
else
|
else
|
||||||
dunst &
|
dunst
|
||||||
disown
|
disown
|
||||||
fi
|
fi
|
||||||
#+end_src
|
#+end_src
|
||||||
|
@ -7995,27 +7995,6 @@ standard keybindings.
|
|||||||
(add-to-list 'global-mode-string '("" mode-line-keycast " ")))
|
(add-to-list 'global-mode-string '("" mode-line-keycast " ")))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
*** Mediawiki front-end
|
|
||||||
:PROPERTIES:
|
|
||||||
:CUSTOM_ID: Packages-Configuration-Misc-Mediawiki-front-end-szfhri000dj0
|
|
||||||
:END:
|
|
||||||
#+begin_src emacs-lisp
|
|
||||||
(use-package mediawiki
|
|
||||||
:defer t
|
|
||||||
:straight (:build t)
|
|
||||||
:config
|
|
||||||
(setq mediawiki-site-alist `(("WikiPhundrak"
|
|
||||||
"https://wiki.phundrak.com/"
|
|
||||||
"phundrak"
|
|
||||||
,(funcall
|
|
||||||
(plist-get (car (auth-source-search
|
|
||||||
:max 1
|
|
||||||
:host "wiki.phundrak.com"))
|
|
||||||
:secret))
|
|
||||||
nil
|
|
||||||
"Main Page"))))
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
*** SICP
|
*** SICP
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:CUSTOM_ID: Packages-Configuration-Misc-SICP-96u6ukz0l4j0
|
:CUSTOM_ID: Packages-Configuration-Misc-SICP-96u6ukz0l4j0
|
||||||
|
@ -62,7 +62,7 @@ Now, there is only one function I modify when it comes to the appearance of fish
|
|||||||
when I’m the one using it: the ~fish_greeting~ function. I use it to display the output of [[https://labs.phundrak.com/phundrak/pumo-system-info][a utility I wrote]].
|
when I’m the one using it: the ~fish_greeting~ function. I use it to display the output of [[https://labs.phundrak.com/phundrak/pumo-system-info][a utility I wrote]].
|
||||||
#+BEGIN_SRC fish
|
#+BEGIN_SRC fish
|
||||||
function fish_greeting
|
function fish_greeting
|
||||||
which pumo-system-info 2&> /dev/null && pumo-system-info || df -H | grep -v Filesystem | sort -rk 5
|
which pumo-system-info 2&> /dev/null && pumo-system-info
|
||||||
end
|
end
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
@ -554,19 +554,20 @@ of a directory. Notice also the =--preserve-root= which will prevent me from
|
|||||||
accidentally removing the root folder. I added the same option to =chgrp=,
|
accidentally removing the root folder. I added the same option to =chgrp=,
|
||||||
=chmod=, and =chown=.
|
=chmod=, and =chown=.
|
||||||
#+NAME: sec-abbr
|
#+NAME: sec-abbr
|
||||||
| abbreviation | command |
|
| abbreviation | command |
|
||||||
|--------------+--------------------------|
|
|--------------+---------------------------|
|
||||||
| cp | cp -i |
|
| cp | cp -i |
|
||||||
| ln | ln -i |
|
| rsync | rsync -ruvtEhl --progress |
|
||||||
| lns | ln -si |
|
| ln | ln -i |
|
||||||
| mv | mv -i |
|
| lns | ln -si |
|
||||||
| rm | rm -Iv |
|
| mv | mv -i |
|
||||||
| rmd | rm --preserve-root -Irv |
|
| rm | rm -Iv |
|
||||||
| rmdf | rm --preserve-root -Irfv |
|
| rmd | rm --preserve-root -Irv |
|
||||||
| rmf | rm --preserve-root -Ifv |
|
| rmdf | rm --preserve-root -Irfv |
|
||||||
| chgrp | chgrp --preserve-root -v |
|
| rmf | rm --preserve-root -Ifv |
|
||||||
| chmod | chmod --preserve-root -v |
|
| chgrp | chgrp --preserve-root -v |
|
||||||
| chown | chown --preserve-root -v |
|
| chmod | chmod --preserve-root -v |
|
||||||
|
| chown | chown --preserve-root -v |
|
||||||
|
|
||||||
Here is the corresponding fish configuration:
|
Here is the corresponding fish configuration:
|
||||||
#+BEGIN_SRC fish
|
#+BEGIN_SRC fish
|
||||||
|
Loading…
x
Reference in New Issue
Block a user