nix/module/sway/module/ScratchPad.nix

43 lines
1.1 KiB
Nix
Raw Normal View History

2024-04-06 03:03:58 +03:00
{ key, ... }: {
text = ''
# Sway has a "scratchpad", which is a bag of holding for windows.
# You can send windows there and get them back later.
# NOTE: Get id with `swaymsg -t get_tree`.
# Move the currently focused window to the scratchpad
bindsym $mod+shift+${key.action.seek} move scratchpad
# Show the next scratchpad window or hide the focused scratchpad window.
# If there are multiple scratchpad windows, this command cycles through them.
bindsym $mod+${key.action.hide} scratchpad show
# Fix for a goddamn Firefox WebRTC indicator.
for_window [app_id="firefox" title="Firefox Sharing Indicator"] {
kill
}
# NetworkManager.
for_window [app_id="nm-connection-editor"] {
move scratchpad
scratchpad show
}
# Bluetooth.
for_window [app_id=".blueman-manager-wrapped"] {
move scratchpad
scratchpad show
}
# Sound.
for_window [app_id="pavucontrol"] {
move scratchpad
scratchpad show
}
# Android emulator controls.
for_window [title="Emulator" window_type="utility"] {
move scratchpad
}
'';
}