From de78e16bd99594e81b1be32c7123d208bcd21c3b Mon Sep 17 00:00:00 2001 From: Lucien Cartier-Tilet Date: Thu, 10 Mar 2022 22:25:56 +0100 Subject: [PATCH] =?UTF-8?q?[StumpWM,=20Bin]=20Replace=20StumpWM=E2=80=99s?= =?UTF-8?q?=20notification=20manager=20with=20Dunst?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- org/config/bin.org | 36 ++++++++++++++++++++++-------------- org/config/stumpwm.org | 22 ---------------------- 2 files changed, 22 insertions(+), 36 deletions(-) diff --git a/org/config/bin.org b/org/config/bin.org index 38a59b6..7f40b13 100644 --- a/org/config/bin.org +++ b/org/config/bin.org @@ -42,33 +42,35 @@ of said command running. | ~xwallpaper~ | ~--zoom "$(cat "$HOME"/.cache/wallpaper)"~ | no | | ~xss-lock~ | ~plock~ | yes | | ~/usr/lib/kdeconnectd~ | | yes | +| ~dunst~ | | yes | #+NAME: autostart-gen #+header: :wrap "src bash :exports code" #+BEGIN_SRC emacs-lisp :var table=autostart-table :cache yes (mapconcat (lambda (start-command) - (let ((command (replace-regexp-in-string (regexp-quote "~") "" (nth 0 start-command))) - (arguments (replace-regexp-in-string (regexp-quote "~") "" (nth 1 start-command))) - (oncep (string= "yes" (nth 2 start-command)))) + (let* ((command (replace-regexp-in-string (regexp-quote "~") "" (nth 0 start-command))) + (arguments (replace-regexp-in-string (regexp-quote "~") "" (nth 1 start-command))) + (oncep (string= "yes" (nth 2 start-command))) + (full-command (replace-regexp-in-string " +" + " " + (format "%s %s &" command arguments)))) (if oncep (format (concat "if pgrep -x %s ; then\n" " echo \"%s already running\"\n" "else\n" - " %s &\n" + " %s\n" " disown\n" "fi") command command - (replace-regexp-in-string " +" " " (format "%s %s" - command - arguments))) - (format "%s %s &" command arguments)))) + full-command) + full-command))) table "\n") #+END_SRC -#+RESULTS[7f5adf8d562e118b8e468d7c62c94a8708d32d9e]: autostart-gen +#+RESULTS[97a97fceb694333615e59599d7c2d7fac52c5e8d]: autostart-gen #+begin_src bash :exports code pactl load-module module-switch-on-connect & mpc stop & @@ -79,7 +81,7 @@ else picom --experimental-backends & disown fi -set-screens & +set-screens & if pgrep -x numlockx ; then echo "numlockx already running" else @@ -89,19 +91,19 @@ fi if pgrep -x pumopm ; then echo "pumopm already running" else - pumopm & + pumopm & disown fi if pgrep -x xfce-polkit ; then echo "xfce-polkit already running" else - xfce-polkit & + xfce-polkit & disown fi if pgrep -x nm-applet ; then echo "nm-applet already running" else - nm-applet & + nm-applet & disown fi xwallpaper --zoom "$(cat "$HOME"/.cache/wallpaper)" & @@ -114,7 +116,13 @@ fi if pgrep -x /usr/lib/kdeconnectd ; then echo "/usr/lib/kdeconnectd already running" else - /usr/lib/kdeconnectd & + /usr/lib/kdeconnectd & + disown +fi +if pgrep -x dunst ; then + echo "dunst already running" +else + dunst & disown fi #+end_src diff --git a/org/config/stumpwm.org b/org/config/stumpwm.org index 91e9afd..19def6f 100644 --- a/org/config/stumpwm.org +++ b/org/config/stumpwm.org @@ -1112,28 +1112,6 @@ paru -S libfixposix --noconfirm <> #+end_src -** Notifications -:PROPERTIES: -:CUSTOM_ID: Utilities-Notifications-g7rj2qu0z9j0 -:END: -No need for ~dunst~ or something like that, the contrib modules of -StumpWM have got us covered! Simply load the module and toggle the -server on. -#+begin_src lisp -(load-module "notify") - -(notify:notify-server-toggle) - -#+end_src - -I don’t like the default colors of the notifications though, let’s change that. -#+begin_src lisp -(load "~/.stumpwm.d/colors.lisp") - -(setf notify:*notify-server-title-color* "^2" - notify:*notify-server-body-color* "^7") -#+end_src - ** Pinentry :PROPERTIES: :CUSTOM_ID: Utilities-Pinentry-o6v95fu0z9j0