From 4e765c57ff8e10fcad7e978f2fb02ee4cd024e12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Jane=C5=BEi=C4=8D?= Date: Thu, 12 Mar 2026 17:44:05 +0100 Subject: [PATCH] feat(sway): update for new components --- sway/config.d/10-variables.conf | 2 +- sway/config.d/50-keybind.conf | 14 ++++++++++++-- sway/config.d/80-autostart.conf | 5 ++++- sway/scripts/power-menu.sh | 13 +++++++++++++ 4 files changed, 30 insertions(+), 4 deletions(-) create mode 100755 sway/scripts/power-menu.sh diff --git a/sway/config.d/10-variables.conf b/sway/config.d/10-variables.conf index 4ffdd91..8e5f6f2 100644 --- a/sway/config.d/10-variables.conf +++ b/sway/config.d/10-variables.conf @@ -8,7 +8,7 @@ set $right l # programs set $term ghostty -set $menu wofi --show drun -iIG -w 2 +set $menu fuzzel set $browser google-chrome-stable set $lockscreen swaylock diff --git a/sway/config.d/50-keybind.conf b/sway/config.d/50-keybind.conf index 3574de8..23ff348 100644 --- a/sway/config.d/50-keybind.conf +++ b/sway/config.d/50-keybind.conf @@ -1,6 +1,6 @@ # sway bindsym $mod+Shift+c reload -bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit' +bindsym $mod+Shift+e exec ~/.config/sway/scripts/power-menu.sh floating_modifier $mod normal # programs @@ -10,6 +10,16 @@ bindsym $mod+u exec $lockscreen bindsym $mod+Shift+Ctrl+Alt+space exec 1password --quick-access bindsym Print exec flameshot gui +# notifications +bindsym $mod+n exec swaync-client -t -sw +bindsym $mod+Shift+n exec swaync-client -C -sw + +# clipboard +bindsym $mod+c exec cliphist list | fuzzel -d | cliphist decode | wl-copy + +# eww popups +bindsym $mod+Escape exec ~/.config/eww/scripts/popup.sh close-all + # window bindsym $mod+Shift+q kill @@ -80,7 +90,7 @@ bindsym $mod+Shift+minus move scratchpad bindsym $mod+minus scratchpad show # xf86-volume -bindsym --locked XF86AudioMute exec pamixer -t && pamixer --get-volume > $wobs +bindsym --locked XF86AudioMute exec pamixer -t && ( pamixer --get-mute && echo 0 > $wobs || pamixer --get-volume > $wobs ) bindsym --locked XF86AudioLowerVolume exec pamixer -d 5 && pamixer --get-volume > $wobs bindsym --locked XF86AudioRaiseVolume exec pamixer -i 5 && pamixer --get-volume > $wobs bindsym --locked F16 exec pamixer --default-source -t diff --git a/sway/config.d/80-autostart.conf b/sway/config.d/80-autostart.conf index 73cf2d8..739e2a9 100644 --- a/sway/config.d/80-autostart.conf +++ b/sway/config.d/80-autostart.conf @@ -1,7 +1,10 @@ # daemon -exec swayidle -w +exec eww daemon +exec swayidle -w exec wlsunset -l 46.1 -L 14.5 exec pkill -x wob; rm -f $wobs && mkfifo $wobs && tail -f $wobs | wob +exec swaync +exec wl-paste --watch cliphist store exec protonmail-bridge -n # traditional "start when os starts" programs diff --git a/sway/scripts/power-menu.sh b/sway/scripts/power-menu.sh new file mode 100755 index 0000000..cf4649d --- /dev/null +++ b/sway/scripts/power-menu.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +# power menu via fuzzel + +choice=$(printf "lock\nlogout\nsuspend\nreboot\nshutdown" | fuzzel -d -p "power: ") + +case "$choice" in + lock) swaylock ;; + logout) swaymsg exit ;; + suspend) systemctl suspend ;; + reboot) systemctl reboot ;; + shutdown) systemctl poweroff ;; +esac