Update behaviours

Identify XWayland windows in title.
Include app_id in title.
allow 'urgency' hint to linger
move cursor to center of container on changing to it
WIP: Tablet mode (not working)
This commit is contained in:
John Mertz 2022-07-23 04:04:25 -04:00
parent 0df21404d2
commit 7a76dd3bf7
1 changed files with 25 additions and 0 deletions

View File

@ -35,3 +35,28 @@ 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
# Move cursor to center of container when switching
mouse_warping container
# Restore display configuration on reload
bindswitch --reload lid:on /home/jpm/scripts/sway/displays.pl detached
# Rotate screen and toggle OSK on tablet mode change
bindswitch --reload tablet:on busctl call --user sm.puri.OSK0 /sm/puri/OSK0 sm.puri.OSK0 SetVisible b true; swaymsg output eDP-1 rotate 270
bindswitch --reload tablet:off busctl call --user sm.puri.OSK0 /sm/puri/OSK0 sm.puri.OSK0 SetVisible b false; swaymsg output eDP-1 rotate 0