From a4005d8a2b4ba8fd42c2489b92eb1fdbf6fc44af Mon Sep 17 00:00:00 2001 From: Fabio Scotto di Santolo Date: Sun, 27 Jul 2025 16:09:27 +0200 Subject: [PATCH] Modify Sway windows configuration --- sway/.config/sway/conf.d/window.conf | 71 ++++++++++++++++++++++++---- 1 file changed, 61 insertions(+), 10 deletions(-) diff --git a/sway/.config/sway/conf.d/window.conf b/sway/.config/sway/conf.d/window.conf index c087a2b..e283d84 100644 --- a/sway/.config/sway/conf.d/window.conf +++ b/sway/.config/sway/conf.d/window.conf @@ -1,15 +1,66 @@ -### Window configurations +#-----------------------# +# Windows configuration # +# ----------------------# + bindsym $mod+shift+g exec swaymsg gaps outer all set 0 && swaymsg gaps inner all set 5 + bindsym $mod+g exec swaymsg gaps outer all set 0 && swaymsg gaps inner all set 0 -gaps inner 5 -gaps outer 5 + # No gaps when there is a single window + #smart_gaps on -# No gaps when there is a single window -#smart_gaps on + # Activate smart borders (always) + #smart_borders on -# Remove title bar -default_border pixel 2 + default_border pixel 3 + default_floating_border pixel 3 + gaps inner 5 + gaps outer 5 -for_window [window_type="dialog"] floating enable -for_window [window_role="dialog"] floating enable -for_window [shell="xwayland"] title_format "[XWayland] %title" +#------------------------------# +# Always float certain windows # +#------------------------------# + for_window [app_id="pop-up"] floating enable + for_window [app_id="bubble"] floating enable + for_window [app_id="task_dialog"] floating enable + for_window [app_id="Preferences"] floating enable + for_window [app_id="dialog"] floating enable + for_window [app_id="menu"] floating enable + for_window [app_id="Organizer"] floating enable + for_window [app_id="About"] floating enable + for_window [app_id="toolbox"] floating enable + for_window [app_id="page-info"] floating enable + for_window [app_id="webconsole"] floating enable + for_window [app_id="Authy"] floating enable + for_window [app_id="termfloat"] floating enable + for_window [app_id="termfloat"] resize set height 540 + for_window [app_id="termfloat"] resize set width 960 + for_window [app_id="mpv"] floating enable + for_window [app_id="mpv"] resize set height 540 + for_window [app_id="mpv"] resize set width 960 +#-------------------------------------------------------# +# Sticky floating windows(sticky enable|disable|toggle) # +#-------------------------------------------------------# + for_window [app_id="danmufloat"] floating enable + for_window [app_id="danmufloat"] sticky enable + for_window [app_id="danmufloat"] resize set height 540 + for_window [app_id="danmufloat"] resize set width 960 + +#-----------------# +# Program Opacity # +#-----------------# + for_window [app_id="telegram"] opacity 1.00 + +#------------------------------------------# +# Placing software in a specific workspace # +#------------------------------------------# + assign [app_id="foot"]: workspace number 1 + for_window [app_id="foot"]: focus + assign [app_id="firefox"]: workspace number 2 + for_window [app_id="firefox"] focus + assign [app_id="telegram"]: workspace number 5 + for_window [app_id="telegram"] focus + +#---------------------# +# Focus follows mouse # +#---------------------# + focus_follows_mouse no