From 30b792dd762a3430bd3c81475fa6c084f6cb31fd Mon Sep 17 00:00:00 2001 From: Konstantin Koslowski Date: Tue, 28 Jun 2022 08:19:39 +0200 Subject: [PATCH] sway: group all notifications --- bin/start_swayidle.sh | 2 +- config | 47 ++++++++++++++++++++++--------------------- 2 files changed, 25 insertions(+), 24 deletions(-) diff --git a/bin/start_swayidle.sh b/bin/start_swayidle.sh index d683c70..4ec9660 100755 --- a/bin/start_swayidle.sh +++ b/bin/start_swayidle.sh @@ -11,7 +11,7 @@ SUS_CMD="$HOME/.config/sway/bin/sway_suspend" # 120 min suspend pkill -x swayidle swayidle -w \ - timeout 1500 "$TERM_CMD bash -c 'notify-send -u critical display\ will\ turn\ off\ soon'" \ + timeout 1500 "$TERM_CMD bash -c 'dunstify -r 123 -u critical display\ will\ turn\ off\ soon'" \ resume "$LOCK_CMD on" \ timeout 1800 "$LOCK_CMD off" \ timeout 2700 "$LOCK_CMD lockonly" \ diff --git a/config b/config index 5b4c106..e47bb45 100644 --- a/config +++ b/config @@ -24,6 +24,7 @@ set $idle_cmd $HOME/.config/sway/bin/start_swayidle.sh set $waybar_cmd $HOME/.config/sway/bin/start_waybar.sh set $move_cmd $HOME/.config/sway/bin/sway_move set $font Cascadia Code PL Regular 10 +set $notify_cmd dunstify -r 123 # Your preferred application launcher set $menu wofi --show drun --prompt applications @@ -267,35 +268,35 @@ mode "move" { bindsym $mod+k focus up bindsym $mod+l focus right # Return to default mode - bindsym Return exec notify-send "mode: default"; mode "default" - bindsym Escape exec notify-send "mode: default"; mode "default" + bindsym Return exec $notify_cmd "mode: default"; mode "default" + bindsym Escape exec $notify_cmd "mode: default"; mode "default" } mode "mark" { - bindsym a mark a - bindsym s mark s - bindsym d mark d - bindsym z mark z - bindsym x mark x - bindsym c mark c - bindsym Return exec notify-send "mode: default"; mode "default" - bindsym Escape exec notify-send "mode: default"; mode "default" + bindsym a exec $notify_cmd "mode: mark a"; mark a + bindsym s exec $notify_cmd "mode: mark s"; mark s + bindsym d exec $notify_cmd "mode: mark d"; mark d + bindsym z exec $notify_cmd "mode: mark z"; mark z + bindsym x exec $notify_cmd "mode: mark x"; mark x + bindsym c exec $notify_cmd "mode: mark c"; mark c + bindsym Return exec $notify_cmd "mode: default"; mode "default" + bindsym Escape exec $notify_cmd "mode: default"; mode "default" } # Move the focused workspace to another monitor mode "move-workspace" { - bindsym h move workspace to output left - bindsym j move workspace to output down - bindsym k move workspace to output up - bindsym l move workspace to output right - bindsym $mod+h focus left - bindsym $mod+j focus down - bindsym $mod+k focus up - bindsym $mod+l focus right - bindsym Return exec notify-send "mode: default"; mode "default" - bindsym Escape exec notify-send "mode: default"; mode "default" + bindsym h move workspace to output left + bindsym j move workspace to output down + bindsym k move workspace to output up + bindsym l move workspace to output right + bindsym $mod+h focus left + bindsym $mod+j focus down + bindsym $mod+k focus up + bindsym $mod+l focus right + bindsym Return exec $notify_cmd "mode: default"; mode "default" + bindsym Escape exec $notify_cmd "mode: default"; mode "default" } -bindsym $mod+m exec notify-send "mode: move"; mode "move" -bindsym $mod+Shift+a exec notify-send "mode: mark"; mode "mark" -bindsym $mod+o exec notify-send "mode: move-workspace"; mode "move-workspace" +bindsym $mod+m exec $notify_cmd "mode: move"; mode "move" +bindsym $mod+Shift+a exec $notify_cmd "mode: mark"; mode "mark" +bindsym $mod+o exec $notify_cmd "mode: move-workspace"; mode "move-workspace" # # Window Rules: