From 7a76dd3bf74a526d0c7a077aff0f512a7c9df879 Mon Sep 17 00:00:00 2001 From: John Mertz Date: Sat, 23 Jul 2022 04:04:25 -0400 Subject: [PATCH] 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) --- sway/behaviours | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/sway/behaviours b/sway/behaviours index 19db82feb..9d851cc52 100644 --- a/sway/behaviours +++ b/sway/behaviours @@ -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