diff --git a/home/user/.config/sway/bindings.conf b/home/user/.config/sway/bindings.conf index 88c22a6..2bf7fe7 100644 --- a/home/user/.config/sway/bindings.conf +++ b/home/user/.config/sway/bindings.conf @@ -38,7 +38,6 @@ bindsym --to-code $mod+Shift+r reload set $menu rofi -show drun -m -1 bindsym --to-code $mod+d exec $menu -bindsym $mod+o exec --no-startup-id slm_rofi # Change focus bindsym --to-code $mod+h focus left @@ -112,6 +111,8 @@ mode $exitmode { } bindsym --to-code $mod+x mode $exitmode +bindsym --to-code $mod+Shift+x exec --no-startup-id ~/.config/sway/scripts/power-menu.sh + # switch to workspace bindsym --to-code $mod+1 workspace number $ws1 bindsym --to-code $mod+2 workspace number $ws2 diff --git a/home/user/.config/sway/scripts/power-menu.sh b/home/user/.config/sway/scripts/power-menu.sh new file mode 100755 index 0000000..a329176 --- /dev/null +++ b/home/user/.config/sway/scripts/power-menu.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +choice=$(echo -e "Exit\nReboot\nShutdown\nSuspend\nLock\nBlack\nUEFI" | rofi -dmenu -p "Power Menu:" -i) + +case "${choice}" in + Exit) swaymsg exit ;; + Reboot) systemctl reboot ;; + Shutdown) shutdown -h now ;; + Suspend) ~/.config/sway/scripts/lock-telegram.sh && systemctl suspend ;; + Lock) ~/.config/sway/scripts/lock-telegram.sh && swaylock -f ;; + Black) magick canvas:none PNG:- | feh --class black -YFx - ;; + UEFI) systemctl reboot --firmware-setup ;; +esac