diff --git a/etc/sway/config.d/30-applications-defaults.conf b/etc/sway/config.d/30-applications-defaults.conf index 5797646..c9ac1e3 100644 --- a/etc/sway/config.d/30-applications-defaults.conf +++ b/etc/sway/config.d/30-applications-defaults.conf @@ -49,3 +49,12 @@ for_window [title="Removable medium is inserted"] floating enable # keyboard. Chrome currently abuses this by enabling it for all "--app=..." # shortcuts. seat * shortcuts_inhibitor disable + +# mark applications for which shortcuts inhibition is allowed +for_window [class="[Vv]irt-"] mark Grabbing +for_window [class="[Rr]eminna"] mark Grabbing +for_window [app_id="[Vv]irt-"] mark Grabbing +for_window [app_id="[Rr]emmina"] mark Grabbing + +# inhibit keyboard shortcuts for marked applications +for_window [con_mark="Grabbing"] shortcuts_inhibitor enable 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"'