From a8d5376491185f123fea10d925fe45520d6238a4 Mon Sep 17 00:00:00 2001 From: sefidel Date: Sun, 23 Jul 2023 23:15:54 +0900 Subject: feat(home/base): nag before poweroff * apparently HHKB supports sending XF86PowerOff with Fn+Esc, and I've triggered it 3 times today. --- home/profiles/base/config/sway.nix | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'home') diff --git a/home/profiles/base/config/sway.nix b/home/profiles/base/config/sway.nix index be98600..5e4de04 100644 --- a/home/profiles/base/config/sway.nix +++ b/home/profiles/base/config/sway.nix @@ -3,6 +3,9 @@ with neotheme.colors; '' + # disable power key + exec systemd-inhibit --what=handle-power-key --who="sway" --why="Sway manages power key behaviour" sleep infinity + exec autotiling # set modifiers @@ -156,6 +159,9 @@ with neotheme.colors; # Exit bindsym $mod+Shift+q exec swaynag -t warning -m 'Do you really want to exit sway?' -b 'Yes, exit sway' 'swaymsg exit' + # Power + bindsym XF86PowerOff exec swaynag -t error -m 'Confirm poweroff?' -b 'Confirm' 'shutdown now' + # Aesthetics default_border pixel 3 hide_edge_borders --i3 smart -- cgit 1.4.1