.dotfiles/sway/behaviours

80 lines
3.0 KiB
Bash

# vim: ft=sh
################################################################################
# Default workspaces
################################################################################
# ` - Grave
assign [app_id="Alacritty-grave"] grave
# 0 - HUD
assign [app_id="chrome-papillon.john.me.tz__-Default"] 0
# 1 - Chat
assign [class="Mattermost"] 1
assign [app_id="Mattermost"] 1
assign [class="Rocket.Chat"] 1
assign [app_id="Rocket.Chat"] 1
# 2 - Mail
assign [class="Thunderbird"] 2
assign [class="thunderbird-default"] 2
assign [app_id="thunderbird"] 2
# 3 - Secondary Browser
assign [class="Chromium"] 3
# 4 - Git
assign [app_id="com.github.gittyup.Gittyup"] 4
# 5 - Phone (TODO: pick something more useful)
assign [class="linphone"] 5
# 6 - Terminals (not auto-assigned since they are needed elsewhere)
# 7 - Browser
assign [class="firefox"] 7
assign [app_id="firefox"] 7
# 8 - IDE
assign [app_id="neovide"] 8
assign [app_id="code-oss-url-handler"] 8
# 9 - Music
assign [app_id="argos"] 9
# Don't use VNC viewer anymore. I've defaulted to running virt-manager on this workspace because it's similar
#assign [class="Vncviewer"] 9
################################################################################
# Floating windows
################################################################################
for_window [app_id="Alacritty-grave"] floating enable, resize set height 600px, resize set width 800px, move position 990px 400px
# Gnome software doesn't get correct dimensions
for_window [app_id="org.gnome.Software"] floating enable
# SSH auth dialog
for_window [title="SSH Passphrase"] floating enable
# Picture-in-picture firefox
for_window [title="^Picture-in-Picture$"] floating enable
# Also make Picture-in-picture windows stick to active workspace
for_window [title="Picture-in-Picture"] sticky enable
# Picture-in-Picture
for_window [shell="xdg_shell"] sticky enable
for_window [instance="Download"] floating enable
for_window [window_role="plugin_ui"] floating enable
for_window [title="Menu Update"] floating enable
for_window [title="___"] floating enable
for_window [title="todotxt-machine"] floating enable, resize set height 600px, resize set width 800px, move position 990px 400px
for_window [class="Tlpui"] floating enable
for_window [title="XTerm"] floating enable
for_window [class="Gvim"] floating enable
for_window [class="Orage"] floating enable
for_window [class="Claws-mail"] layout stacking
for_window [class="Vncviewer"] fullscreen enable
################################################################################
# Window titles
################################################################################
# Mark legacy windows running in Xwayland
for_window [shell="."] title_format "%title (%app_id)"
for_window [shell="xwayland"] title_format "%title [XWayland]"
################################################################################
# Misc behaviour
################################################################################
# Maintain 'urgency' for 1 second
force_display_urgency_hint 1000 ms