From 6e007861d44c0fe3231c006477a7eeac3172aef4 Mon Sep 17 00:00:00 2001 From: bricked Date: Tue, 24 Sep 2024 17:27:37 +0200 Subject: [PATCH] stylix(forge): add forge styling --- modules/home/stylix/default.nix | 2 + modules/home/stylix/forge/default.nix | 18 +++ .../home/stylix/forge/stylesheet.css.mustache | 140 ++++++++++++++++++ 3 files changed, 160 insertions(+) create mode 100644 modules/home/stylix/forge/default.nix create mode 100644 modules/home/stylix/forge/stylesheet.css.mustache diff --git a/modules/home/stylix/default.nix b/modules/home/stylix/default.nix index cc476c1..fc777e8 100644 --- a/modules/home/stylix/default.nix +++ b/modules/home/stylix/default.nix @@ -8,6 +8,8 @@ with lib; let cfg = config.stylix; in { + imports = [./forge]; + config = mkIf cfg.enable { stylix = { image = wallpaper; diff --git a/modules/home/stylix/forge/default.nix b/modules/home/stylix/forge/default.nix new file mode 100644 index 0000000..30b42c0 --- /dev/null +++ b/modules/home/stylix/forge/default.nix @@ -0,0 +1,18 @@ +{ + config, + lib, + ... +}: +with lib; let + cfg = config.stylix.targets.forge; +in { + options.stylix.targets.forge.enable = + config.lib.stylix.mkEnableTarget "Forge Gnome extension" true; + + config = mkIf (config.stylix.enable && cfg.enable) { + xdg.configFile."forge/stylesheet/forge/stylesheet.css".source = config.lib.stylix.colors { + template = ./stylesheet.css.mustache; + extension = ".css"; + }; + }; +} diff --git a/modules/home/stylix/forge/stylesheet.css.mustache b/modules/home/stylix/forge/stylesheet.css.mustache new file mode 100644 index 0000000..0a64491 --- /dev/null +++ b/modules/home/stylix/forge/stylesheet.css.mustache @@ -0,0 +1,140 @@ +.tiled { + color: #{{base0D-hex}}; + opacity: 1; + border-width: 3px; +} + +.split { + color: #{{base08-hex}}; + opacity: 1; + border-width: 3px; +} + +.stacked { + color: #{{base0D-hex}}; + opacity: 1; + border-width: 3px; +} + +.tabbed { + color: #{{base0D-hex}}; + opacity: 1; + border-width: 3px; +} + +.floated { + color: #{{base0D-hex}}; + border-width: 3px; + opacity: 1; +} + +.window-tiled-border { + border-width: 3px; + border-color: #{{base0D-hex}}; + border-style: solid; + border-radius: 14px; +} + +.window-split-border { + border-width: 3px; + border-color: #{{base08-hex}}; + border-style: solid; + border-radius: 14px; +} + +.window-split-horizontal { + border-left-width: 0; + border-top-width: 0; + border-bottom-width: 0; +} + +.window-split-vertical { + border-left-width: 0; + border-top-width: 0; + border-right-width: 0; +} + +.window-stacked-border { + border-width: 3px; + border-color: #{{base0D-hex}}; + border-style: solid; + border-radius: 14px; +} + +.window-tabbed-border { + border-width: 3px; + border-color: #{{base0D-hex}}; + border-style: solid; + border-radius: 14px; +} + +.window-tabbed-bg { + border-radius: 8px; +} + +.window-tabbed-tab { + background-color: rgba(54, 47, 45, 1); + border-color: #{{base0D-hex}}9A; + border-width: 1px; + border-radius: 8px; + color: white; + margin: 1px; + box-shadow: 0 0 0 1px rgba(1px 0, 0, 0, 0.2); +} + +.window-tabbed-tab-active { + background-color: #{{base0D-hex}}; + color: black; + box-shadow: 0 0 0 1px rgba(1px 0, 0, 0, 0.2); +} + +.window-tabbed-tab-close { + padding: 3px; + margin: 4px; + border-radius: 16px; + width: 16px; + background-color: #{{base08-hex}}; +} + +.window-tabbed-tab-icon { + margin: 3px; +} + +.window-floated-border { + border-width: 3px; + border-color: #{{base0D-hex}}; + border-style: solid; + border-radius: 14px; +} + +.window-tilepreview-tiled { + border-width: 1px; + border-color: #{{base0D-hex}}4D; + border-style: solid; + border-radius: 14px; + background-color: #{{base0D-hex}}33; +} + +.window-tilepreview-stacked { + border-width: 1px; + border-color: #{{base0D-hex}}66; + border-style: solid; + border-radius: 14px; + background-color: #{{base0D-hex}}4D; +} + +.window-tilepreview-swap { + border-width: 1px; + border-color: #{{base0D-hex}}4D; + border-style: solid; + border-radius: 14px; + background-color: #{{base0D-hex}}4D; +} + +.window-tilepreview-tabbed { + border-width: 1px; + border-color: #{{base0D-hex}}4D; + border-style: solid; + border-radius: 14px; + background-color: #{{base0D-hex}}4D; +}