From 0861b724d1875f5186b29089a2d57d8e9a498303 Mon Sep 17 00:00:00 2001 From: Sravan Balaji Date: Thu, 2 May 2024 08:27:14 -0400 Subject: [PATCH] Switch from xfce4-notifyd to dunst --- .config/betterlockscreen/betterlockscreenrc | 4 +- .config/dwm-flexipatch | 2 +- .scripts/control-center.sh | 6 +-- .scripts/dunst.sh | 8 ++++ .scripts/game_exit.sh | 2 +- .scripts/game_launch.sh | 2 +- .scripts/startup.sh | 20 +++++----- README.org | 42 ++++++++++++--------- 8 files changed, 51 insertions(+), 35 deletions(-) diff --git a/.config/betterlockscreen/betterlockscreenrc b/.config/betterlockscreen/betterlockscreenrc index c72746b..95bafa1 100644 --- a/.config/betterlockscreen/betterlockscreenrc +++ b/.config/betterlockscreen/betterlockscreenrc @@ -32,10 +32,10 @@ modifcolor=ff5555ff bgcolor=282a36ff prelock() { - /home/sravan/.scripts/xfce4-notifyd.sh --pause + /home/sravan/.scripts/dunst.sh --pause } # custom postlock postlock() { - /home/sravan/.scripts/xfce4-notifyd.sh --unpause + /home/sravan/.scripts/dunst.sh --unpause } diff --git a/.config/dwm-flexipatch b/.config/dwm-flexipatch index 3268ba4..d50575e 160000 --- a/.config/dwm-flexipatch +++ b/.config/dwm-flexipatch @@ -1 +1 @@ -Subproject commit 3268ba41795233bdbd7a52056a3e96e9d78efaf0 +Subproject commit d50575e707fb49ffc7eac17f31426f3d425a3d97 diff --git a/.scripts/control-center.sh b/.scripts/control-center.sh index 23f2e72..8fcf1ec 100755 --- a/.scripts/control-center.sh +++ b/.scripts/control-center.sh @@ -13,7 +13,7 @@ rofi_menu() { declare -a options=( "󱕅 Compositor - picom" "󰍹 Display - brightness" - "󰂚 Notifications - xfce4-notifyd" + "󰂚 Notifications - dunst" " Media - playerctl" "󰕾 Volume - pactl" "󰁯 Backup - backup" @@ -50,8 +50,8 @@ main() { --brightness) /home/sravan/.scripts/brightness.sh --rofi ;; - --xfce4-notifyd) - /home/sravan/.scripts/xfce4-notifyd.sh --rofi + --dunst) + /home/sravan/.scripts/dunst.sh --rofi ;; --playerctl) /home/sravan/.scripts/playerctl.sh --rofi diff --git a/.scripts/dunst.sh b/.scripts/dunst.sh index 57efc66..0157a61 100755 --- a/.scripts/dunst.sh +++ b/.scripts/dunst.sh @@ -29,6 +29,8 @@ rofi_menu() { " Close Notification - close" " View History - history" "󰂠 Toggle Do Not Disturb - dnd" + " Pause Popup Notifications - pause" + " Unpause Popup Notifications - unpause" "󰌍 Back - back" "󰗼 Quit - quit" ) @@ -122,6 +124,12 @@ main() { --dnd) dunstctl set-paused toggle ;; + --pause) + dunstctl set-paused true + ;; + --unpause) + dunstctl set-paused false + ;; --rofi) rofi_menu ;; diff --git a/.scripts/game_exit.sh b/.scripts/game_exit.sh index f8890af..4086458 100755 --- a/.scripts/game_exit.sh +++ b/.scripts/game_exit.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash /home/sravan/.scripts/picom.sh --on & -/home/sravan/.scripts/xfce4-notifyd.sh --unpause & +/home/sravan/.scripts/dunst.sh --unpause & /home/sravan/.scripts/cpu-gpu.sh --cpu-profile-balanced & /home/sravan/.scripts/cpu-gpu.sh --gpu-profile-adaptive & /usr/bin/xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/presentation-mode -s false & diff --git a/.scripts/game_launch.sh b/.scripts/game_launch.sh index 6c43560..71bdf66 100755 --- a/.scripts/game_launch.sh +++ b/.scripts/game_launch.sh @@ -2,5 +2,5 @@ /home/sravan/.scripts/picom.sh --off & /home/sravan/.scripts/cpu-gpu.sh --cpu-profile-performance & /home/sravan/.scripts/cpu-gpu.sh --gpu-profile-performance & -/home/sravan/.scripts/xfce4-notifyd.sh --pause & +/home/sravan/.scripts/dunst.sh --pause & /usr/bin/xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/presentation-mode -s true & diff --git a/.scripts/startup.sh b/.scripts/startup.sh index 2f3006d..376ac66 100755 --- a/.scripts/startup.sh +++ b/.scripts/startup.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash declare -a startup_array=(\ # Background Processes - "/usr/lib64/xfce4/notifyd/xfce4-notifyd" \ # XFCE Notification Daemon + "bash /home/sravan/.scripts/dunst.sh --on" \ # Dunst Notification Daemon "bash /home/sravan/.scripts/picom.sh --on" \ # Picom Compositor "/usr/bin/greenclip daemon" \ # Greenclip Clipboard Manager "/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1" \ # GNOME Polkit Authentication Agent @@ -14,15 +14,15 @@ declare -a startup_array=(\ declare -a kill_startup_array=(\ # Background Processes - "pkill xfce4-notifyd" \ # XFCE Notification Daemon - "pkill picom" \ # Picom Compositor - "pkill greenclip" \ # Greenclip Clipboard Manager - "pkill polkit" \ # GNOME Polkit Authentication Agent - "pkill xss-lock" \ # Session Lock Utility - "pkill kdeconnectd" \ # KDE Connect Daemon - "pkill redshift" \ # Redshift Blue Light Filter - "pkill unclutter" \ # Hide Mouse Cursor - "pkill easyeffects" \ # Easy Effects PipeWire Plugins + "bash /home/sravan/.scripts/dunst.sh --off" \ # Dunst Notification Daemon + "bash /home/sravan/.scripts/picom.sh --off" \ # Picom Compositor + "pkill greenclip" \ # Greenclip Clipboard Manager + "pkill polkit" \ # GNOME Polkit Authentication Agent + "pkill xss-lock" \ # Session Lock Utility + "pkill kdeconnectd" \ # KDE Connect Daemon + "pkill redshift" \ # Redshift Blue Light Filter + "pkill unclutter" \ # Hide Mouse Cursor + "pkill easyeffects" \ # Easy Effects PipeWire Plugins ) declare -a delay_array=(\ diff --git a/README.org b/README.org index 727ebb6..3a887f7 100644 --- a/README.org +++ b/README.org @@ -887,6 +887,8 @@ rofi_menu() { " Close Notification - close" " View History - history" "󰂠 Toggle Do Not Disturb - dnd" + " Pause Popup Notifications - pause" + " Unpause Popup Notifications - unpause" "󰌍 Back - back" "󰗼 Quit - quit" ) @@ -980,6 +982,12 @@ main() { --dnd) dunstctl set-paused toggle ;; + --pause) + dunstctl set-paused true + ;; + --unpause) + dunstctl set-paused false + ;; --rofi) rofi_menu ;; @@ -3847,7 +3855,7 @@ bgcolor=282a36ff #+BEGIN_SRC conf :tangle .config/betterlockscreen/betterlockscreenrc prelock() { - /home/sravan/.scripts/xfce4-notifyd.sh --pause + /home/sravan/.scripts/dunst.sh --pause } #+END_SRC @@ -3856,7 +3864,7 @@ prelock() { #+BEGIN_SRC conf :tangle .config/betterlockscreen/betterlockscreenrc # custom postlock postlock() { - /home/sravan/.scripts/xfce4-notifyd.sh --unpause + /home/sravan/.scripts/dunst.sh --unpause } #+END_SRC @@ -8406,7 +8414,7 @@ These are scripts that should be run from Lutris when launching or exiting a gam /home/sravan/.scripts/picom.sh --off & /home/sravan/.scripts/cpu-gpu.sh --cpu-profile-performance & /home/sravan/.scripts/cpu-gpu.sh --gpu-profile-performance & -/home/sravan/.scripts/xfce4-notifyd.sh --pause & +/home/sravan/.scripts/dunst.sh --pause & /usr/bin/xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/presentation-mode -s true & #+END_SRC @@ -8416,7 +8424,7 @@ These are scripts that should be run from Lutris when launching or exiting a gam #+BEGIN_SRC shell :shebang #!/usr/bin/env bash :tangle .scripts/game_exit.sh /home/sravan/.scripts/picom.sh --on & -/home/sravan/.scripts/xfce4-notifyd.sh --unpause & +/home/sravan/.scripts/dunst.sh --unpause & /home/sravan/.scripts/cpu-gpu.sh --cpu-profile-balanced & /home/sravan/.scripts/cpu-gpu.sh --gpu-profile-adaptive & /usr/bin/xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/presentation-mode -s false & @@ -9717,7 +9725,7 @@ Xcursor.size: CURSOR_SIZE #+BEGIN_SRC shell :shebang #!/usr/bin/env bash :tangle .scripts/startup.sh declare -a startup_array=(\ # Background Processes - "/usr/lib64/xfce4/notifyd/xfce4-notifyd" \ # XFCE Notification Daemon + "bash /home/sravan/.scripts/dunst.sh --on" \ # Dunst Notification Daemon "bash /home/sravan/.scripts/picom.sh --on" \ # Picom Compositor "/usr/bin/greenclip daemon" \ # Greenclip Clipboard Manager "/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1" \ # GNOME Polkit Authentication Agent @@ -9730,15 +9738,15 @@ declare -a startup_array=(\ declare -a kill_startup_array=(\ # Background Processes - "pkill xfce4-notifyd" \ # XFCE Notification Daemon - "pkill picom" \ # Picom Compositor - "pkill greenclip" \ # Greenclip Clipboard Manager - "pkill polkit" \ # GNOME Polkit Authentication Agent - "pkill xss-lock" \ # Session Lock Utility - "pkill kdeconnectd" \ # KDE Connect Daemon - "pkill redshift" \ # Redshift Blue Light Filter - "pkill unclutter" \ # Hide Mouse Cursor - "pkill easyeffects" \ # Easy Effects PipeWire Plugins + "bash /home/sravan/.scripts/dunst.sh --off" \ # Dunst Notification Daemon + "bash /home/sravan/.scripts/picom.sh --off" \ # Picom Compositor + "pkill greenclip" \ # Greenclip Clipboard Manager + "pkill polkit" \ # GNOME Polkit Authentication Agent + "pkill xss-lock" \ # Session Lock Utility + "pkill kdeconnectd" \ # KDE Connect Daemon + "pkill redshift" \ # Redshift Blue Light Filter + "pkill unclutter" \ # Hide Mouse Cursor + "pkill easyeffects" \ # Easy Effects PipeWire Plugins ) declare -a delay_array=(\ @@ -10448,7 +10456,7 @@ rofi_menu() { declare -a options=( "󱕅 Compositor - picom" "󰍹 Display - brightness" - "󰂚 Notifications - xfce4-notifyd" + "󰂚 Notifications - dunst" " Media - playerctl" "󰕾 Volume - pactl" "󰁯 Backup - backup" @@ -10485,8 +10493,8 @@ main() { --brightness) /home/sravan/.scripts/brightness.sh --rofi ;; - --xfce4-notifyd) - /home/sravan/.scripts/xfce4-notifyd.sh --rofi + --dunst) + /home/sravan/.scripts/dunst.sh --rofi ;; --playerctl) /home/sravan/.scripts/playerctl.sh --rofi