aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorLibravatar sommerfeld <sommerfeld@sommerfeld.dev>2026-05-13 13:43:40 +0100
committerLibravatar sommerfeld <sommerfeld@sommerfeld.dev>2026-05-13 13:43:40 +0100
commit09be56fb6b9bb0871aeef467cdc2d67db25649f0 (patch)
tree10e87eb29a7294fba7b8c4cc5e77af82d313f9e8
parent1c725c766ff467b98aa1fc9279cb45fc915274c6 (diff)
downloaddotfiles-09be56fb6b9bb0871aeef467cdc2d67db25649f0.tar.gz
dotfiles-09be56fb6b9bb0871aeef467cdc2d67db25649f0.tar.bz2
dotfiles-09be56fb6b9bb0871aeef467cdc2d67db25649f0.zip
feat(sway): refuse keyboard-shortcut inhibit from virt-viewer/manager
Spice/virt-viewer ask sway for keyboard-shortcuts-inhibit so they can forward the Super key to the guest. That swallows all $mod+... binds on the host while the VM window is focused. Refuse the inhibit for those three app_ids; sway forwards Super to the guest only when the keyboard is explicitly grabbed (click-into-VM + virt-viewer's own Ctrl+Alt toggle), not via the wm-bind shortcut.
-rw-r--r--dot_config/sway/config6
1 files changed, 6 insertions, 0 deletions
diff --git a/dot_config/sway/config b/dot_config/sway/config
index ac7acb3..3d4e075 100644
--- a/dot_config/sway/config
+++ b/dot_config/sway/config
@@ -53,6 +53,12 @@ for_window [class="Tor Browser"] floating enable
for_window [app_id="org.mozilla.Thunderbird" title=".*Mozilla Thunderbird$"] mark --add tb-main
for_window [shell=".*"] inhibit_idle fullscreen
+# virt-viewer / virt-manager grab the Mod key via the keyboard-shortcuts-inhibit
+# Wayland protocol. Refuse so $mod+... bindings keep working while the VM has focus.
+for_window [app_id="virt-viewer"] shortcuts_inhibitor disable
+for_window [app_id="remote-viewer"] shortcuts_inhibitor disable
+for_window [app_id="virt-manager"] shortcuts_inhibitor disable
+
# ── Standard keybinds (sway defaults) ─────────────────────────────────────────
bindsym $mod+Return exec $term
bindsym $mod+Shift+Return exec $term -e yazi