From 72f1b5f9f3a99b143c7b6bd7058aa64353e95a4c Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Sat, 24 Aug 2024 10:59:37 -0400 Subject: [PATCH] sway: improve borders for floating windows with CSDs --- homeManagerModules/desktop/sway/settings.nix | 5 +++++ homeManagerModules/theme.nix | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/homeManagerModules/desktop/sway/settings.nix b/homeManagerModules/desktop/sway/settings.nix index 293cf7db..84fee3c1 100644 --- a/homeManagerModules/desktop/sway/settings.nix +++ b/homeManagerModules/desktop/sway/settings.nix @@ -166,7 +166,12 @@ in { window = { titlebar = false; + commands = [ + { + command = "border pixel 4"; # Workaround for libadwaita + CSD apps not having borders when floating. + criteria = {all = true;}; + } { command = "floating enable; sticky toggle; resize 35ppt 10ppt"; criteria = { diff --git a/homeManagerModules/theme.nix b/homeManagerModules/theme.nix index dd95c167..7d0b92eb 100644 --- a/homeManagerModules/theme.nix +++ b/homeManagerModules/theme.nix @@ -49,7 +49,6 @@ in { margin-bottom: 50px; margin-top: -100px; - background: transparent; padding: 0; border: 0; min-height: 0; @@ -57,6 +56,12 @@ in { box-shadow: none; } + .titlebar, + .titlebar .background + { + border-radius: 0; + } + /* rm -rf window shadows */ window.csd, /* gtk4? */ window.csd decoration { /* gtk3 */