Compare commits

..

No commits in common. "dbafe01b1d2b3a30cdb66dea70a09afa5a0280d3" and "beaea0bd6634134a099b11ac87181a96e6affbe6" have entirely different histories.

3 changed files with 83 additions and 67 deletions

View File

@ -48,85 +48,81 @@ 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 "~" "" (nth 0 start-command))) (let* ((command (replace-regexp-in-string (regexp-quote "~") "" (nth 0 start-command)))
(arguments (replace-regexp-in-string "~" "" (nth 1 start-command))) (arguments (replace-regexp-in-string (regexp-quote "~") "" (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)))) (format "%s %s &" command arguments))))
(if oncep
(concat (format "which %s && %s" (format
command (concat "if pgrep -x %s ; then\n"
(if (not oncep) " echo \"%s already running\"\n"
full-command
(format (concat "if pgrep -x %s ; then\n"
" echo %s already running\n"
"else\n" "else\n"
" %s\n" " %s\n"
" disown\n" " disown\n"
"fi") "fi")
command command
command command
command full-command)
full-command)))))) full-command)))
table table
"\n") "\n")
#+END_SRC #+END_SRC
#+RESULTS[64fcf7c33f989171bc7582495cd508959f4030c3]: autostart-gen #+RESULTS[97a97fceb694333615e59599d7c2d7fac52c5e8d]: autostart-gen
#+begin_src bash :exports code #+begin_src bash :exports code
which pactl && pactl load-module module-switch-on-connect & pactl load-module module-switch-on-connect &
which mpc && mpc stop & mpc stop &
which xrdb && xrdb -merge "$HOME"/.Xresources & xrdb -merge "$HOME"/.Xresources &
which picom && if pgrep -x picom ; then if pgrep -x picom ; then
echo picom already running echo "picom already running"
else else
picom picom --experimental-backends &
disown disown
fi fi
which set-screens && set-screens & set-screens &
which numlockx && if pgrep -x numlockx ; then if pgrep -x numlockx ; then
echo numlockx already running echo "numlockx already running"
else else
numlockx numlockx on &
disown disown
fi fi
which pumopm && if pgrep -x pumopm ; then if pgrep -x pumopm ; then
echo pumopm already running echo "pumopm already running"
else else
pumopm pumopm &
disown disown
fi fi
which xfce-polkit && if pgrep -x xfce-polkit ; then 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
which nm-applet && if pgrep -x nm-applet ; then 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
which xwallpaper && xwallpaper --zoom "$(cat "$HOME"/.cache/wallpaper)" & xwallpaper --zoom "$(cat "$HOME"/.cache/wallpaper)" &
which xss-lock && if pgrep -x xss-lock ; then if pgrep -x xss-lock ; then
echo xss-lock already running echo "xss-lock already running"
else else
xss-lock xss-lock plock &
disown disown
fi fi
which /usr/lib/kdeconnectd && if pgrep -x /usr/lib/kdeconnectd ; then 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
which dunst && if pgrep -x dunst ; then 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

View File

@ -7995,6 +7995,27 @@ 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

View File

@ -62,7 +62,7 @@ Now, there is only one function I modify when it comes to the appearance of fish
when Im 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 Im 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 which pumo-system-info 2&> /dev/null && pumo-system-info || df -H | grep -v Filesystem | sort -rk 5
end end
#+END_SRC #+END_SRC
@ -555,9 +555,8 @@ 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 |
| rsync | rsync -ruvtEhl --progress |
| ln | ln -i | | ln | ln -i |
| lns | ln -si | | lns | ln -si |
| mv | mv -i | | mv | mv -i |