From 803ace98f7891d2f884d6e65844e1c895d7a2223 Mon Sep 17 00:00:00 2001 From: Alexander Oakman Date: Sat, 17 Aug 2024 19:45:06 +0300 Subject: [PATCH 1/5] Fix regex in rule for Firefox The rule was not used for windows, the title of which began with the uppercase letter. Now this is fixed. --- etc/sway/config.d/30-applications-defaults.conf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/etc/sway/config.d/30-applications-defaults.conf b/etc/sway/config.d/30-applications-defaults.conf index 1b36773..bb32ea5 100644 --- a/etc/sway/config.d/30-applications-defaults.conf +++ b/etc/sway/config.d/30-applications-defaults.conf @@ -1,5 +1,5 @@ # set floating mode for specific application -for_window [app_id="firefox" title="^Library$"] floating enable, border pixel 1, sticky enable +for_window [app_id="[Ff]irefox" title="^Library$"] floating enable, border pixel 1, sticky enable for_window [app_id="thunderbird" title=".*Reminder"] floating enable for_window [app_id="floating_shell_portrait"] floating enable, border pixel 1, sticky enable, resize set width 30 ppt height 40 ppt for_window [app_id="floating_shell"] floating enable, border pixel 1, sticky enable, resize set width 50 ppt height 60 ppt @@ -22,7 +22,7 @@ for_window [class="calamares"] floating enable for_window [app_id="calamares"] floating enable for_window [app_id="sway-input-config"] floating enable for_window [title="Save File"] floating enable -for_window [title="Firefox .*— Sharing Indicator"] floating enable, sticky enable, move to scratchpad +for_window [title="[Ff]irefox .*— Sharing Indicator"] floating enable, sticky enable, move to scratchpad for_window [app_id="" title=".* is sharing your screen."] floating enable # set floating mode for generated windows @@ -48,7 +48,7 @@ for_window [class="Brave-browser"] mark Browser for_window [class="firefox"] mark Browser for_window [app_id="Chromium-browser"] mark Browser for_window [app_id="brave-browser"] mark Browser -for_window [app_id="firefox"] mark Browser +for_window [app_id="[Ff]irefox"] mark Browser # inhibit scrensaver for fullscreen browser windows for_window [con_mark="Browser"] { From 5baec8d64cef54808e9a6cdca55a45450aa4f99f Mon Sep 17 00:00:00 2001 From: Alexander Oakman Date: Sat, 17 Aug 2024 19:47:59 +0300 Subject: [PATCH 2/5] Disable sticky mode for Firefox Library windows This forces firefox's library windows to stay in the same workspace as the parent firefox window. Moving a child window across all workspaces is strange behavior. --- etc/sway/config.d/30-applications-defaults.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/sway/config.d/30-applications-defaults.conf b/etc/sway/config.d/30-applications-defaults.conf index bb32ea5..8482d95 100644 --- a/etc/sway/config.d/30-applications-defaults.conf +++ b/etc/sway/config.d/30-applications-defaults.conf @@ -1,5 +1,5 @@ # set floating mode for specific application -for_window [app_id="[Ff]irefox" title="^Library$"] floating enable, border pixel 1, sticky enable +for_window [app_id="[Ff]irefox" title="^Library$"] floating enable, border pixel 1 for_window [app_id="thunderbird" title=".*Reminder"] floating enable for_window [app_id="floating_shell_portrait"] floating enable, border pixel 1, sticky enable, resize set width 30 ppt height 40 ppt for_window [app_id="floating_shell"] floating enable, border pixel 1, sticky enable, resize set width 50 ppt height 60 ppt From 1b7c96ee507013f2aec04f8aeace4da30d57b20d Mon Sep 17 00:00:00 2001 From: Alexander Oakman Date: Sat, 17 Aug 2024 19:52:03 +0300 Subject: [PATCH 3/5] Add librewolf window rules --- etc/sway/config.d/30-applications-defaults.conf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/etc/sway/config.d/30-applications-defaults.conf b/etc/sway/config.d/30-applications-defaults.conf index 8482d95..c38e7f9 100644 --- a/etc/sway/config.d/30-applications-defaults.conf +++ b/etc/sway/config.d/30-applications-defaults.conf @@ -1,5 +1,6 @@ # set floating mode for specific application for_window [app_id="[Ff]irefox" title="^Library$"] floating enable, border pixel 1 +for_window [app_id="[Ll]ibrewolf" title="^Library$"] floating enable, border pixel 1 for_window [app_id="thunderbird" title=".*Reminder"] floating enable for_window [app_id="floating_shell_portrait"] floating enable, border pixel 1, sticky enable, resize set width 30 ppt height 40 ppt for_window [app_id="floating_shell"] floating enable, border pixel 1, sticky enable, resize set width 50 ppt height 60 ppt @@ -46,9 +47,11 @@ for_window [title="Confirm to replace files"] move position center for_window [class="Chromium-browser"] mark Browser for_window [class="Brave-browser"] mark Browser for_window [class="firefox"] mark Browser +for_window [class="librewolf"] mark Browser for_window [app_id="Chromium-browser"] mark Browser for_window [app_id="brave-browser"] mark Browser for_window [app_id="[Ff]irefox"] mark Browser +for_window [app_id="[Ll]ibrewolf"] mark Browser # inhibit scrensaver for fullscreen browser windows for_window [con_mark="Browser"] { From 938d9d7eda00bf42a33f46e93118859e49425fad Mon Sep 17 00:00:00 2001 From: Alexander Oakman Date: Sat, 17 Aug 2024 19:53:08 +0300 Subject: [PATCH 4/5] Add a rule for Choose an Application dialog Forces the dialog to open in floating mode. --- etc/sway/config.d/30-applications-defaults.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/etc/sway/config.d/30-applications-defaults.conf b/etc/sway/config.d/30-applications-defaults.conf index c38e7f9..0cc3abe 100644 --- a/etc/sway/config.d/30-applications-defaults.conf +++ b/etc/sway/config.d/30-applications-defaults.conf @@ -42,6 +42,7 @@ for_window [title="Copy Files"] floating enable; for_window [title="Copy Files"] resize set 600 400 for_window [title="Confirm to replace files"] floating enable; for_window [title="Confirm to replace files"] move position center +for_window [title="Choose an Application"] floating enable # apply mark for Xwayland and wayland native browser windows for_window [class="Chromium-browser"] mark Browser From ce28901167ab34f59bc5143c1dde4169c9048efd Mon Sep 17 00:00:00 2001 From: Alexander Oakman Date: Sat, 17 Aug 2024 19:54:37 +0300 Subject: [PATCH 5/5] Add a rule for Removable medium dialog Forces the dialog to open in floating mode. --- etc/sway/config.d/30-applications-defaults.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/etc/sway/config.d/30-applications-defaults.conf b/etc/sway/config.d/30-applications-defaults.conf index 0cc3abe..24a3400 100644 --- a/etc/sway/config.d/30-applications-defaults.conf +++ b/etc/sway/config.d/30-applications-defaults.conf @@ -43,6 +43,7 @@ for_window [title="Copy Files"] resize set 600 400 for_window [title="Confirm to replace files"] floating enable; for_window [title="Confirm to replace files"] move position center for_window [title="Choose an Application"] floating enable +for_window [title="Removable medium is inserted"] floating enable # apply mark for Xwayland and wayland native browser windows for_window [class="Chromium-browser"] mark Browser