Merge branch 'user/okmans/shortcus_inhibition' into 'master'

Improve the shortcuts inhibition

See merge request tile-os/tileos-settings-sway!12
This commit is contained in:
Aleksey Samoilov 2024-08-20 14:48:47 +00:00
commit fc3b2472aa
3 changed files with 15 additions and 0 deletions

View file

@ -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

View file

@ -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:
#

View file

@ -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"'