From 92164a525cae360f9094ea8b1f15311be03dcfac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Tue, 20 Sep 2022 12:20:50 +0200 Subject: [PATCH] Use sway notification center over mako --- symlinks/config/sway/conf.d/50_startup | 2 +- symlinks/config/sway/conf.d/90_makoctl | 4 -- symlinks/config/sway/conf.d/90_notifications | 5 ++ symlinks/config/waybar/config | 64 +++++++++++++------- 4 files changed, 47 insertions(+), 28 deletions(-) delete mode 100644 symlinks/config/sway/conf.d/90_makoctl create mode 100644 symlinks/config/sway/conf.d/90_notifications diff --git a/symlinks/config/sway/conf.d/50_startup b/symlinks/config/sway/conf.d/50_startup index 948b94c..520692c 100644 --- a/symlinks/config/sway/conf.d/50_startup +++ b/symlinks/config/sway/conf.d/50_startup @@ -1,5 +1,5 @@ # Start up notification manager -exec --no-startup-id mako +exec swaync exec kdeconnect-indicator exec ulauncher --hide-window exec libinput-gestures-setup start diff --git a/symlinks/config/sway/conf.d/90_makoctl b/symlinks/config/sway/conf.d/90_makoctl deleted file mode 100644 index 50accb3..0000000 --- a/symlinks/config/sway/conf.d/90_makoctl +++ /dev/null @@ -1,4 +0,0 @@ -# Mako control key bindings -bindsym --release control+space exec makoctl dismiss -bindsym --release control+space+period exec makoctl dismiss --all -bindsym --release control+space+o exec makoctl menu wofi -d diff --git a/symlinks/config/sway/conf.d/90_notifications b/symlinks/config/sway/conf.d/90_notifications new file mode 100644 index 0000000..8605a2d --- /dev/null +++ b/symlinks/config/sway/conf.d/90_notifications @@ -0,0 +1,5 @@ +# Mako control key bindings +bindsym --release control+space exec swaync-client --hide-latest +bindsym --release control+space+period exec swaync-client --close-all +bindsym --release control+space+o exec swaync-client --open-panel +bindsym --release $mod+v exec swaync-client -t -sw diff --git a/symlinks/config/waybar/config b/symlinks/config/waybar/config index 77b05b3..0f36b5f 100644 --- a/symlinks/config/waybar/config +++ b/symlinks/config/waybar/config @@ -27,6 +27,7 @@ "modules-center": [ "clock#date", "clock#time", + "custom/notification" ], "modules-right": [ "network", @@ -74,28 +75,28 @@ }, "clock#date": { - "interval": 10, - "format": " {:%e %b %Y}", // Icon: calendar-alt - "tooltip-format": "{:%e %B %Y}" + "interval": 10, + "format": " {:%e %b %Y}", // Icon: calendar-alt + "tooltip-format": "{:%e %B %Y}" }, "cpu": { "interval": 5, "format": " {usage}% ({load})", // Icon: microchip "states": { - "warning": 70, - "critical": 90 + "warning": 70, + "critical": 90 } }, "custom/keyboard-layout": { - "exec": "swaymsg -t get_inputs | grep -m1 'xkb_active_layout_name' | cut -d '\"' -f4", - // Interval set only as a fallback, as the value is updated by signal - "interval": 30, - "format": " {}", // Icon: keyboard - // Signal sent by Sway key binding (~/.config/sway/key-bindings) - "signal": 1, // SIGHUP - "tooltip": false + "exec": "swaymsg -t get_inputs | grep -m1 'xkb_active_layout_name' | cut -d '\"' -f4", + // Interval set only as a fallback, as the value is updated by signal + "interval": 30, + "format": " {}", // Icon: keyboard + // Signal sent by Sway key binding (~/.config/sway/key-bindings) + "signal": 1, // SIGHUP + "tooltip": false }, "memory": { @@ -160,17 +161,17 @@ }, "temperature": { - "critical-threshold": 80, - "interval": 5, - "format": "{icon} {temperatureC}°C", - "format-icons": [ - "", // Icon: temperature-empty - "", // Icon: temperature-quarter - "", // Icon: temperature-half - "", // Icon: temperature-three-quarters - "" // Icon: temperature-full - ], - "tooltip": true + "critical-threshold": 80, + "interval": 5, + "format": "{icon} {temperatureC}°C", + "format-icons": [ + "", // Icon: temperature-empty + "", // Icon: temperature-quarter + "", // Icon: temperature-half + "", // Icon: temperature-three-quarters + "" // Icon: temperature-full + ], + "tooltip": true }, "tray": { @@ -191,4 +192,21 @@ "format": "", "on-click": "wlogout" }, + + "custom/notification": { + "tooltip": false, + "format": "{icon}", + "format-icons": { + "notification": "", + "none": "", + "dnd-notification": "", + "dnd-none": "" + }, + "return-type": "json", + "exec-if": "which swaync-client", + "exec": "swaync-client -swb", + "on-click": "swaync-client -t -sw", + "on-click-right": "swaync-client -d -sw", + "escape": true + }, }