From 14325f1a4a2b340eded3eeda2e4d6a107d9eade9 Mon Sep 17 00:00:00 2001 From: Charlotte Van Petegem Date: Mon, 5 Feb 2024 15:00:02 +0100 Subject: [PATCH] Add some CSS to make GTK CSD less annoying --- modules/graphical/theme/default.nix | 42 +++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/modules/graphical/theme/default.nix b/modules/graphical/theme/default.nix index e380cc59..d7da8979 100644 --- a/modules/graphical/theme/default.nix +++ b/modules/graphical/theme/default.nix @@ -65,6 +65,48 @@ gtk-cursor-theme-name = "Catppuccin-Latte-Light-Cursors"; gtk-cursor-theme-size = 24; }; + extraCss = '' + /* No (default) titlebar on wayland */ + headerbar.titlebar.default-decoration { + background: transparent; + padding: 0; + margin: 0 0 -17px 0; + border: 0; + min-height: 0; + font-size: 0; + box-shadow: none; + } + + /* rm -rf window shadows */ + window.csd, /* gtk4? */ + window.csd decoration { /* gtk3 */ + box-shadow: none; + } + ''; + }; + gtk4 = { + extraConfig = { + gtk-cursor-theme-name = "Catppuccin-Latte-Light-Cursors"; + gtk-cursor-theme-size = 24; + }; + extraCss = '' + /* No (default) titlebar on wayland */ + headerbar.titlebar.default-decoration { + background: transparent; + padding: 0; + margin: 0 0 -17px 0; + border: 0; + min-height: 0; + font-size: 0; + box-shadow: none; + } + + /* rm -rf window shadows */ + window.csd, /* gtk4? */ + window.csd decoration { /* gtk3 */ + box-shadow: none; + } + ''; }; iconTheme = { package = pkgs.libsForQt5.breeze-icons;