From 49ff7d39737f12403bd0400c0c2c6016a1eb3165 Mon Sep 17 00:00:00 2001 From: aristote Date: Mon, 25 Nov 2024 17:17:49 +0100 Subject: home: firefox: treestyletabs: fix colors --- .../home-manager/personal/programs/firefox/default.nix | 10 +++++----- .../firefox/userchrome/treestyletabs-colors.css | 13 ------------- .../programs/firefox/userchrome/treestyletabs-inner.css | 6 ++++++ .../programs/firefox/userchrome/treestyletabs-outer.css | 17 +++++++++++++++++ .../programs/firefox/userchrome/treestyletabs.css | 17 ----------------- 5 files changed, 28 insertions(+), 35 deletions(-) delete mode 100644 modules/home-manager/personal/programs/firefox/userchrome/treestyletabs-colors.css create mode 100644 modules/home-manager/personal/programs/firefox/userchrome/treestyletabs-inner.css create mode 100644 modules/home-manager/personal/programs/firefox/userchrome/treestyletabs-outer.css delete mode 100644 modules/home-manager/personal/programs/firefox/userchrome/treestyletabs.css (limited to 'modules/home-manager/personal/programs') diff --git a/modules/home-manager/personal/programs/firefox/default.nix b/modules/home-manager/personal/programs/firefox/default.nix index 8b38450..43e6070 100644 --- a/modules/home-manager/personal/programs/firefox/default.nix +++ b/modules/home-manager/personal/programs/firefox/default.nix @@ -12,17 +12,17 @@ with lib; let }; engines = import ./engines.nix {inherit lib pkgs;}; userchrome = let - userchromeTST = ./userchrome/treestyletabs.css; - userchromeTSTColors = config.lib.stylix.colors { - template = builtins.readFile ./userchrome/treestyletabs-colors.css; + userchromeTSTout = ./userchrome/treestyletabs-outer.css; + userchromeTSTin = config.lib.stylix.colors { + template = builtins.readFile ./userchrome/treestyletabs-inner.css; extension = ".css"; }; in '' - @import "${userchromeTST}"; + @import "${userchromeTSTout}"; '' + lib.optionalString (config.lib ? stylix) '' - @import "${userchromeTSTColors}"; + // @import "${userchromeTSTin}"; ''; webappsWithIds = (builtins.foldl' ({ diff --git a/modules/home-manager/personal/programs/firefox/userchrome/treestyletabs-colors.css b/modules/home-manager/personal/programs/firefox/userchrome/treestyletabs-colors.css deleted file mode 100644 index e11c8f8..0000000 --- a/modules/home-manager/personal/programs/firefox/userchrome/treestyletabs-colors.css +++ /dev/null @@ -1,13 +0,0 @@ -/* Not working. Paste this inside TST's extra CSS rules. */ -@-moz-document regexp("moz-extension://.+/sidebar/sidebar.html.*") { -/* Apply system-wide theme */ -:root { - --tab-surface-active: rgb( {{base02-rgb-r}}, {{base02-rgb-g}}, {{base02-rgb-b}}, 50%); - --tab-text-active: #{{base05-hex}}; - --tab-surface-regular: #{{base00-hex}}; - --tab-text-regular: #{{base05-hex}}; - --tab-surface-hover: rgb( {{base02-rgb-r}}, {{base02-rgb-g}}, {{base02-rgb-b}}, 50%); - --tab-surface-active-hover: rgb( {{base02-rgb-r}}, {{base02-rgb-g}}, {{base02-rgb-b}}, 50%); - --tab-border: #{{base00-hex}}; -} -} diff --git a/modules/home-manager/personal/programs/firefox/userchrome/treestyletabs-inner.css b/modules/home-manager/personal/programs/firefox/userchrome/treestyletabs-inner.css new file mode 100644 index 0000000..f6fca37 --- /dev/null +++ b/modules/home-manager/personal/programs/firefox/userchrome/treestyletabs-inner.css @@ -0,0 +1,6 @@ +/* Not working. Paste this inside TST's extra CSS rules. */ +@-moz-document regexp("moz-extension://.+/sidebar/sidebar.html.*") { + :root.sidebar #background { + background: #{{base00-hex}}; + } +} diff --git a/modules/home-manager/personal/programs/firefox/userchrome/treestyletabs-outer.css b/modules/home-manager/personal/programs/firefox/userchrome/treestyletabs-outer.css new file mode 100644 index 0000000..bee1acf --- /dev/null +++ b/modules/home-manager/personal/programs/firefox/userchrome/treestyletabs-outer.css @@ -0,0 +1,17 @@ +@-moz-document url(chrome://browser/content/browser.xul), url(chrome://browser/content/browser.xhtml) { + /* Hide main tabs toolbar */ + #TabsToolbar { + visibility: collapse; + } + + /* Sidebar min and max width removal */ + #sidebar { + max-width: none !important; + min-width: 0px !important; + } + + /* Hide sidebar header, when using Tree Style Tab. */ + #sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] #sidebar-header { + visibility: collapse; + } +} diff --git a/modules/home-manager/personal/programs/firefox/userchrome/treestyletabs.css b/modules/home-manager/personal/programs/firefox/userchrome/treestyletabs.css deleted file mode 100644 index bee1acf..0000000 --- a/modules/home-manager/personal/programs/firefox/userchrome/treestyletabs.css +++ /dev/null @@ -1,17 +0,0 @@ -@-moz-document url(chrome://browser/content/browser.xul), url(chrome://browser/content/browser.xhtml) { - /* Hide main tabs toolbar */ - #TabsToolbar { - visibility: collapse; - } - - /* Sidebar min and max width removal */ - #sidebar { - max-width: none !important; - min-width: 0px !important; - } - - /* Hide sidebar header, when using Tree Style Tab. */ - #sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] #sidebar-header { - visibility: collapse; - } -} -- cgit v1.2.3