From 1fc0ce29c32c1a648860841c964535334acb6457 Mon Sep 17 00:00:00 2001 From: Alexander Oakman Date: Mon, 19 Aug 2024 22:40:56 +0300 Subject: [PATCH] Add a keybinding to toggle shortcuts inhibitor --- etc/sway/modes/default.conf | 3 +++ etc/sway/variables | 3 +++ 2 files changed, 6 insertions(+) diff --git a/etc/sway/modes/default.conf b/etc/sway/modes/default.conf index c91ecf1..a00b386 100644 --- a/etc/sway/modes/default.conf +++ b/etc/sway/modes/default.conf @@ -124,6 +124,9 @@ $bindsym $mod+Shift+n exec /usr/share/sway/scripts/first-empty-workspace.py --mo ## Action // Move focused window to a new workspace and switch there ## $bindsym $mod+Shift+m exec /usr/share/sway/scripts/first-empty-workspace.py --move --switch +## Action // Toogle shortcuts inhibition // $mod + Control_R ## +$bindsym --inhibited $mod+Control_R exec $toggle_shorcuts_inhibitor + # # Layout stuff: # diff --git a/etc/sway/variables b/etc/sway/variables index 5ddcf7b..d687209 100644 --- a/etc/sway/variables +++ b/etc/sway/variables @@ -124,3 +124,6 @@ set $calendar_daemon 'calcurse --daemon' # Notifications from Swappy set $swappy_notify '[ -x "$(command -v swappy)" ] && /usr/share/sway/scripts/screenshot-notify.sh' + +# Toggle shortcuts inhibition mode for the current focused window +set $toggle_shorcuts_inhibitor 'swaymsg "seat - shortcuts_inhibitor toggle"'