sway tweaks

This commit is contained in:
Henrik Bakken
2026-10-07 13:28:46 +02:00
parent 43edbad2f6
commit 13382f42fa
2 changed files with 33 additions and 28 deletions
+4 -6
View File
@@ -69,7 +69,7 @@ set $powermenu ~/.config/sway/scripts/power_menu.sh
# ------------------------------------------ # ------------------------------------------
# Launch the terminal # Launch the terminal
bindsym $mod+Return exec $term bindsym $mod+Return exec $term
bindsym Mod4+Shift+Return exec foot bash bindsym $mod+Shift+Return exec foot bash
# Kill focused window # Kill focused window
bindsym $mod+Shift+q kill bindsym $mod+Shift+q kill
# Lock screen # Lock screen
@@ -294,11 +294,10 @@ exec hash dbus-update-activation-environment 2>/dev/null && \
# Idle configuration # Idle configuration
exec swayidle -w \ exec swayidle -w \
timeout 1200 'pgrep -x gtklock || gtklock -d' \ timeout 1200 'gtklock -d' \
timeout 2400 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \ timeout 2400 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \
before-sleep 'pgrep -x gtklock || gtklock -d' \ timeout 10 'if pgrep -x gtklock; then swaymsg "output * power off"; fi' \
after-resume 'swaymsg reload' \ before-sleep 'gtklock -d'
idlehint 240
# Start foot server # Start foot server
exec systemctl --user enable --now foot-server.service exec systemctl --user enable --now foot-server.service
@@ -393,4 +392,3 @@ input type:mouse {
accel_profile "flat" accel_profile "flat"
pointer_accel 0.5 pointer_accel 0.5
} }
+29 -22
View File
@@ -1,6 +1,7 @@
#!/bin/bash #!/bin/bash
SELECTION="$(printf "󰌾 Lock\n󰤄 Suspend\n󰍃 Log out\n Reboot\n Reboot to UEFI\n󰐥 Shutdown" | fuzzel --dmenu -a top-right -l 6 -w 18 -p "Select an option: ")" SELECTION="$(printf "󰌾 Lock\n󰤄 Suspend\n󰍃 Log out\n Reboot\n Reboot to UEFI\n󰐥 Shutdown" | fuzzel --dmenu -a top-right -l 6 -w 18 -p "Select an option: ")"
[[ -z "$SELECTION" ]] && exit 0
confirm_action() { confirm_action() {
local action="$1" local action="$1"
@@ -9,26 +10,32 @@ confirm_action() {
} }
case $SELECTION in case $SELECTION in
*"󰌾 Lock"*) *"󰌾 Lock"*)
gtklock;; gtklock
*"󰤄 Suspend"*) ;;
if confirm_action "Suspend"; then *"󰤄 Suspend"*)
systemctl suspend-then-hibernate if confirm_action "Suspend"; then
fi;; systemctl suspend-then-hibernate
*"󰍃 Log out"*) fi
if confirm_action "Log out"; then ;;
swaymsg exit *"󰍃 Log out"*)
fi;; if confirm_action "Log out"; then
*" Reboot"*) swaymsg exit
if confirm_action "Reboot"; then fi
systemctl reboot ;;
fi;; *" Reboot"*)
*" Reboot to UEFI"*) if confirm_action "Reboot"; then
if confirm_action "Reboot to UEFI"; then systemctl reboot
systemctl reboot --firmware-setup fi
fi;; ;;
*"󰐥 Shutdown"*) *" Reboot to UEFI"*)
if confirm_action "Shutdown"; then if confirm_action "Reboot to UEFI"; then
systemctl poweroff systemctl reboot --firmware-setup
fi;; fi
;;
*"󰐥 Shutdown"*)
if confirm_action "Shutdown"; then
systemctl poweroff
fi
;;
esac esac