From 4e12afae12612eeee4add901d7e41172a36d4fde Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Sat, 30 May 2026 22:17:03 -0400 Subject: use mustache for more templating --- flake.nix | 6 + home/apps/rofi/default.nix | 2 +- home/apps/rofi/theme.nix | 27 - home/apps/rofi/theme.rasi.mustache | 13 + home/apps/waybar/default.nix | 2 +- home/apps/waybar/style.css.mustache | 90 + home/apps/waybar/style.nix | 107 - home/apps/wofi/default.nix | 2 +- home/apps/wofi/style.css.mustache | 59 + home/apps/wofi/style.nix | 73 - home/gtk/default.nix | 39 +- home/gtk/gtk.css | 115 - home/gtk/gtk.css.mustache | 138 + home/qt/default.nix | 5 +- home/qt/kvconfig.nix | 513 -- home/qt/svg.nix | 9522 ----------------------------------- home/qt/theme.kvconfig.mustache | 497 ++ home/qt/theme.svg.mustache | 9512 ++++++++++++++++++++++++++++++++++ lib/system.nix | 1 + pkgs/astal/default.nix | 48 +- pkgs/astal/theme.nix | 26 - pkgs/astal/vars.scss.mustache | 22 + 22 files changed, 10387 insertions(+), 10432 deletions(-) delete mode 100644 home/apps/rofi/theme.nix create mode 100644 home/apps/rofi/theme.rasi.mustache create mode 100644 home/apps/waybar/style.css.mustache delete mode 100644 home/apps/waybar/style.nix create mode 100644 home/apps/wofi/style.css.mustache delete mode 100644 home/apps/wofi/style.nix delete mode 100644 home/gtk/gtk.css create mode 100644 home/gtk/gtk.css.mustache delete mode 100644 home/qt/kvconfig.nix delete mode 100644 home/qt/svg.nix create mode 100644 home/qt/theme.kvconfig.mustache create mode 100644 home/qt/theme.svg.mustache create mode 100644 lib/system.nix delete mode 100644 pkgs/astal/theme.nix create mode 100644 pkgs/astal/vars.scss.mustache diff --git a/flake.nix b/flake.nix index b96c4b4..0398b11 100644 --- a/flake.nix +++ b/flake.nix @@ -57,10 +57,13 @@ ) systems); + # merge nixpkgs lib with our extensions mkLib = system: let pkgs = import nixpkgs {inherit system;}; in nixpkgs.lib.extend (_: lib: import ./lib {inherit lib pkgs;}); + + # createt a system configuration mkSystem = hostDir: system: let lib = mkLib system; in @@ -73,6 +76,9 @@ hostDir ]; }; + + # create a home configuration with a system configuration + # as its base mkHome = hostDir: system: let hostModule = mkSystem hostDir system; lib = (mkLib system) // home-manager.lib; diff --git a/home/apps/rofi/default.nix b/home/apps/rofi/default.nix index 80c88a2..de492a6 100644 --- a/home/apps/rofi/default.nix +++ b/home/apps/rofi/default.nix @@ -17,7 +17,7 @@ in { home.file = { ".config/rofi/config.rasi".source = ./config.rasi; - ".config/rofi/theme.rasi".text = import ./theme.nix {inherit theme;}; + ".config/rofi/theme.rasi".text = lib.template.mustache ./theme.rasi.mustache theme; }; }; } diff --git a/home/apps/rofi/theme.nix b/home/apps/rofi/theme.nix deleted file mode 100644 index 891b5a3..0000000 --- a/home/apps/rofi/theme.nix +++ /dev/null @@ -1,27 +0,0 @@ -{theme}: let - text = "#${theme.colors.text}"; - base = "#${theme.colors.base}"; - surface = "#${theme.colors.surface}"; - primary = "#${theme.colors.primary}"; - error = "#${theme.colors.error}"; - outerGap = "${toString theme.outerGap}px"; - innerGap = "${toString theme.innerGap}px"; - outerRadius = "${toString theme.outerRadius}px"; - innerRadius = "${toString theme.innerRadius}px"; - borderWidth = "${toString theme.borderWidth}px"; - wallpaper = theme.wallpaper; -in '' - * { - primary: ${primary}; - error: ${error}; - base: ${base}; - surface: ${surface}; - text: ${text}; - inner-radius: ${innerRadius}; - outer-radius: ${outerRadius}; - inner-gap: ${innerGap}; - outer-gap: ${outerGap}; - border-width: ${borderWidth}; - background: url("${wallpaper}", height); - } -'' diff --git a/home/apps/rofi/theme.rasi.mustache b/home/apps/rofi/theme.rasi.mustache new file mode 100644 index 0000000..eed44b2 --- /dev/null +++ b/home/apps/rofi/theme.rasi.mustache @@ -0,0 +1,13 @@ +* { + primary: #{{colors.primary}}; + error: #{{colors.error}}; + base: #{{cplors.base}}; + surface: #{{colors.surface}}; + text: #{{colors.text}}; + inner-radius: {{innerRadius}}; + outer-radius: {{outerRadius}}; + inner-gap: {{innerGap}}; + outer-gap: {{outerGap}}; + border-width: {{borderWidth}}; + background: url("{{wallpaper}}", height); +} diff --git a/home/apps/waybar/default.nix b/home/apps/waybar/default.nix index 25acb8f..b881091 100644 --- a/home/apps/waybar/default.nix +++ b/home/apps/waybar/default.nix @@ -79,7 +79,7 @@ in { } ]; - style = import ./style.nix {theme = config.theme;}; + style = lib.template.mustache ./style.css.mustache config.theme; }; }; } diff --git a/home/apps/waybar/style.css.mustache b/home/apps/waybar/style.css.mustache new file mode 100644 index 0000000..d7e4c3e --- /dev/null +++ b/home/apps/waybar/style.css.mustache @@ -0,0 +1,90 @@ +/** Base */ + +* { + all: unset; +} + +window#waybar { + font-family: "{{font.regular}}", "{{font.icon}}", "{{font.monospace}}"; + font-size: {{font.size}}px; + color: #{{colors.text}}; + background-color: #{{colors.base}}; +} + +/** Workspaces */ + +#workspaces { + margin-left: {{outerGap}}px; +} + +#workspaces button { + border-radius: {{innerRadius}}px; + margin: 4px 2px; + padding: 0px 7px; + background: #{{colors.surface}}; + color: #{{colors.text}}; +} + +#workspaces button.focused, +#workspaces button.active { + background: #{{colors.primary}}; + color: #{{colors.base}}; +} + +#workspaces button.urgent { + background: #{{colors.error}}; +} + +/** Tray */ + +#tray { + border: none; + margin-right: {{outerGap}}px; +} + +#tray > .passive { + -gtk-icon-effect: dim; +} + +#tray > .needs-attention { + -gtk-icon-effect: highlight; +} + +/** Right modules */ + +#battery, +#wireplumber, +#network { + padding: 0 {{outerGap}}px; +} + +/** Battery */ + +#battery.charging { + color: #{{colors.success}}; +} + +#battery.warning:not(.charging) { + color: #{{colors.warning}}; +} + +#battery.critical:not(.charging) { + color: #{{colors.error}}; +} + +/** Wireplumber */ + +#wireplumber.muted { + color: #{{colors.error}}; +} + +/** Network */ + +#network.wifi, +#network.ethernet { + color: #{{colors.success}}; +} + +#network.disconnected { + color: #{{colors.error}}; +} diff --git a/home/apps/waybar/style.nix b/home/apps/waybar/style.nix deleted file mode 100644 index 21a8de5..0000000 --- a/home/apps/waybar/style.nix +++ /dev/null @@ -1,107 +0,0 @@ -{theme}: let - text = "#${theme.colors.text}"; - base = "#${theme.colors.base}"; - surface = "#${theme.colors.surface}"; - primary = "#${theme.colors.primary}"; - success = "#${theme.colors.success}"; - warning = "#${theme.colors.warning}"; - error = "#${theme.colors.error}"; - fontSize = "${toString theme.font.size}px"; - outerGap = "${toString theme.outerGap}px"; - innerGap = "${toString theme.innerGap}px"; - outerRadius = "${toString theme.outerRadius}px"; - innerRadius = "${toString theme.innerRadius}px"; - borderWidth = "${toString theme.borderWidth}px"; -in '' - /** Base */ - - * { - all: unset; - } - - window#waybar { - font-family: "${theme.font.regular}", "${theme.font.icon}", "${theme.font.monospace}"; - font-size: ${fontSize}; - color: ${text}; - background-color: ${base}; - } - - /** Workspaces */ - - #workspaces { - margin-left: ${outerGap}; - } - - #workspaces button { - border-radius: ${innerRadius}; - margin: 4px 2px; - padding: 0px 7px; - background: ${surface}; - color: ${text}; - } - - #workspaces button.focused, - #workspaces button.active { - background: ${primary}; - color: ${base}; - } - - #workspaces button.urgent { - background: ${error}; - } - - /** Tray */ - - #tray { - border: none; - margin-right: ${outerGap}; - } - - #tray > .passive { - -gtk-icon-effect: dim; - } - - #tray > .needs-attention { - -gtk-icon-effect: highlight; - } - - /** Right modules */ - - #battery, - #wireplumber, - #network { - padding: 0 ${outerGap}; - } - - /** Battery */ - - #battery.charging { - color: ${success}; - } - - #battery.warning:not(.charging) { - color: ${warning}; - } - - #battery.critical:not(.charging) { - color: ${error}; - } - - /** Wireplumber */ - - #wireplumber.muted { - color: ${error}; - } - - /** Network */ - - #network.wifi, - #network.ethernet { - color: ${success}; - } - - #network.disconnected { - color: ${error}; - } - -'' diff --git a/home/apps/wofi/default.nix b/home/apps/wofi/default.nix index b528f65..417a2c2 100644 --- a/home/apps/wofi/default.nix +++ b/home/apps/wofi/default.nix @@ -21,7 +21,7 @@ in { hide_scroll = true; }; - style = import ./style.nix {theme = config.theme;}; + style = lib.template.mustache ./style.css.mustache config.theme; }; }; } diff --git a/home/apps/wofi/style.css.mustache b/home/apps/wofi/style.css.mustache new file mode 100644 index 0000000..ba4945f --- /dev/null +++ b/home/apps/wofi/style.css.mustache @@ -0,0 +1,59 @@ +* { + font-family: "{{font.monospace}}"; + font-size: {{font.size}}px; +} + +/* Window */ +window { + margin: 0px; + border: none; + border-radius: {{outerRadius}}px; + background-color: #{{colors.base}}; +} + +/* Outer Box */ +#outer-box { + padding: {{outerGap}}px; +} + +/* Scroll */ +#scroll { + margin: 0px; + padding: {{innerGap}}px; + border: none; +} + +/* Input */ +#input { + margin: {{innerGap}}px; + padding: {{innerGap}}px; + border: none; + color: #{{colors.text}}; + background-color: #{{colors.surface}}; + border-radius: {{outerRadius}}px; +} + +#input:focus, +#input:active { + border: {{borderWidth}}px solid #{{colors.primary}}; + box-shadow: none; + outline: none; +} + +/* Text */ +#text { + margin: {{innerGap}}px; + padding: {{innerGap}}px; + border: none; + color: #{{colors.text}}; +} + +/* Selected Entry */ +#entry:selected { + background-color: #{{colors.primary}}; + border-radius: {{outerRadius}}px; +} + +#entry:selected #text { + color: #{{colors.base}}; +} diff --git a/home/apps/wofi/style.nix b/home/apps/wofi/style.nix deleted file mode 100644 index 8d1fb75..0000000 --- a/home/apps/wofi/style.nix +++ /dev/null @@ -1,73 +0,0 @@ -{theme}: let - text = "#${theme.colors.text}"; - base = "#${theme.colors.base}"; - surface = "#${theme.colors.surface}"; - primary = "#${theme.colors.primary}"; - fontSize = "${toString theme.font.size}px"; - outerGap = "${toString theme.outerGap}px"; - innerGap = "${toString theme.innerGap}px"; - outerRadius = "${toString theme.outerRadius}px"; - innerRadius = "${toString theme.innerRadius}px"; - borderWidth = "${toString theme.borderWidth}px"; -in '' - * { - font-family: ${theme.font.monospace}; - font-size: ${fontSize}; - } - - /* Window */ - window { - margin: 0px; - border: none; - border-radius: ${outerRadius}; - background-color: ${base}; - } - - /* Outer Box */ - #outer-box { - padding: ${outerGap}; - } - - /* Scroll */ - #scroll { - margin: 0px; - padding: ${innerGap}; - border: none; - } - - /* Input */ - #input { - margin: ${innerGap}; - padding: ${innerGap}; - border: none; - color: ${text}; - background-color: ${surface}; - border-radius: ${outerRadius}; - } - - #input:focus, - #input:active { - border: ${borderWidth} solid ${primary}; - box-shadow: none; - outline: none; - } - - /* Text */ - #text { - margin: ${innerGap}; - padding: ${innerGap}; - border: none; - color: ${text}; - } - - /* Selected Entry */ - #entry:selected { - background-color: ${primary}; - border-radius: ${outerRadius}; - } - - #entry:selected #text { - color: ${base}; - } - -'' diff --git a/home/gtk/default.nix b/home/gtk/default.nix index 98ae399..517155f 100644 --- a/home/gtk/default.nix +++ b/home/gtk/default.nix @@ -3,36 +3,7 @@ lib, pkgs, ... -}: let - baseCss = '' - @define-color text #${config.theme.colors.text}; - @define-color subtext #${config.theme.colors.subtext}; - - @define-color base #${config.theme.colors.base}; - @define-color surface #${config.theme.colors.surface}; - @define-color overlay #${config.theme.colors.overlay}; - - @define-color primary #${config.theme.colors.primary}; - @define-color success #${config.theme.colors.success}; - @define-color warning #${config.theme.colors.warning}; - @define-color error #${config.theme.colors.error}; - - @define-color black #${config.theme.colors.bright.black}; - @define-color red #${config.theme.colors.bright.red}; - @define-color green #${config.theme.colors.bright.green}; - @define-color yellow #${config.theme.colors.bright.yellow}; - @define-color blue #${config.theme.colors.bright.blue}; - @define-color magenta #${config.theme.colors.bright.magenta}; - @define-color cyan #${config.theme.colors.bright.cyan}; - @define-color white #${config.theme.colors.bright.white}; - @define-color pink #${config.theme.colors.bright.pink}; - @define-color orange #${config.theme.colors.bright.orange}; - ''; - finalCss = pkgs.runCommandLocal "gtk.css" {} '' - echo ${lib.escapeShellArg baseCss} >>$out - cat ${./gtk.css} >>$out - ''; -in { +}: { gtk = { enable = true; theme = { @@ -47,8 +18,10 @@ in { gtk3.extraConfig.gtk-application-prefer-dark-theme = 1; }; - xdg.configFile = { - "gtk-3.0/gtk.css".source = finalCss; - "gtk-4.0/gtk.css".source = finalCss; + xdg.configFile = let + css = lib.template.mustache ./gtk.css.mustache config.theme.colors; + in { + "gtk-3.0/gtk.css".source = css; + "gtk-4.0/gtk.css".source = css; }; } diff --git a/home/gtk/gtk.css b/home/gtk/gtk.css deleted file mode 100644 index af50b02..0000000 --- a/home/gtk/gtk.css +++ /dev/null @@ -1,115 +0,0 @@ -@define-color accent_color @primary; -@define-color accent_bg_color @base; -@define-color accent_fg_color @text; - -@define-color destructive_color @error; -@define-color destructive_bg_color @error; -@define-color destructive_fg_color @text; - -@define-color success_color @success; -@define-color success_bg_color @success; -@define-color success_fg_color @text; - -@define-color warning_color @warning; -@define-color warning_bg_color @warning; -@define-color warning_fg_color @text; - -@define-color error_color @error; -@define-color error_bg_color @error; -@define-color error_fg_color @text; - -@define-color window_bg_color @base; -@define-color window_fg_color @text; - -@define-color view_bg_color @base; -@define-color view_fg_color @text; - -@define-color headerbar_bg_color @base; -@define-color headerbar_fg_color @text; -@define-color headerbar_border_color @base; -@define-color headerbar_backdrop_color @base; -@define-color headerbar_shade_color @base; -@define-color headerbar_darker_shade_color @base; - -@define-color sidebar_bg_color @base; -@define-color sidebar_fg_color @text; -@define-color sidebar_border_color @base; -@define-color sidebar_backdrop_color @base; -@define-color sidebar_shade_color @base; - -@define-color secondary_sidebar_bg_color @base; -@define-color secondary_sidebar_fg_color @text; -@define-color secondary_sidebar_border_color @base; -@define-color secondary_sidebar_backdrop_color @base; -@define-color secondary_sidebar_shade_color @base; - -@define-color card_bg_color @base; -@define-color card_fg_color @text; -@define-color card_shade_color @base; - -@define-color dialog_bg_color @base; -@define-color dialog_fg_color @text; - -@define-color popover_bg_color @base; -@define-color popover_fg_color @text; -@define-color popover_shade_color @base; - -@define-color thumbnail_bg_color @base; -@define-color thumbnail_fg_color @text; - -@define-color shade_color @base; -@define-color scrollbar_outline_color @base; - -@define-color blue_1 @blue; -@define-color blue_2 @blue; -@define-color blue_3 @blue; -@define-color blue_4 @blue; -@define-color blue_5 @blue; - -@define-color green_1 @green; -@define-color green_2 @green; -@define-color green_3 @green; -@define-color green_4 @green; -@define-color green_5 @green; - -@define-color yellow_1 @yellow; -@define-color yellow_2 @yellow; -@define-color yellow_3 @yellow; -@define-color yellow_4 @yellow; -@define-color yellow_5 @yellow; - -@define-color orange_1 @orange; -@define-color orange_2 @orange; -@define-color orange_3 @orange; -@define-color orange_4 @orange; -@define-color orange_5 @orange; - -@define-color red_1 @red; -@define-color red_2 @red; -@define-color red_3 @red; -@define-color red_4 @red; -@define-color red_5 @red; - -@define-color purple_1 @magenta; -@define-color purple_2 @magenta; -@define-color purple_3 @magenta; -@define-color purple_4 @magenta; -@define-color purple_5 @magenta; - -@define-color brown_1 @orange; -@define-color brown_2 @orange; -@define-color brown_3 @orange; -@define-color brown_4 @orange; -@define-color brown_5 @orange; - -@define-color light_1 @base; -@define-color light_2 @base; -@define-color light_3 @base; -@define-color light_4 @base; -@define-color light_5 @base; - -@define-color dark_1 @base; -@define-color dark_2 @base; -@define-color dark_3 @base; -@define-color dark_4 @base; -@define-color dark_5 @base; diff --git a/home/gtk/gtk.css.mustache b/home/gtk/gtk.css.mustache new file mode 100644 index 0000000..725e5de --- /dev/null +++ b/home/gtk/gtk.css.mustache @@ -0,0 +1,138 @@ +@define-color text #{{text}}; +@define-color subtext #{{subtext}}; + +@define-color base #{{base}}; +@define-color surface #{{surface}}; +@define-color overlay #{{overlay}}; + +@define-color primary #{{primary}}; +@define-color success #{{success}}; +@define-color warning #{{warning}}; +@define-color error #{{error}}; + +@define-color black #{{bright.black}}; +@define-color red #{{bright.red}}; +@define-color green #{{bright.green}}; +@define-color yellow #{{bright.yellow}}; +@define-color blue #{{bright.blue}}; +@define-color magenta #{{bright.magenta}}; +@define-color cyan #{{bright.cyan}}; +@define-color white #{{bright.white}}; +@define-color pink #{{bright.pink}}; +@define-color orange #{{bright.orange}}; + +@define-color accent_color @primary; +@define-color accent_bg_color @base; +@define-color accent_fg_color @text; + +@define-color destructive_color @error; +@define-color destructive_bg_color @error; +@define-color destructive_fg_color @text; + +@define-color success_color @success; +@define-color success_bg_color @success; +@define-color success_fg_color @text; + +@define-color warning_color @warning; +@define-color warning_bg_color @warning; +@define-color warning_fg_color @text; + +@define-color error_color @error; +@define-color error_bg_color @error; +@define-color error_fg_color @text; + +@define-color window_bg_color @base; +@define-color window_fg_color @text; + +@define-color view_bg_color @base; +@define-color view_fg_color @text; + +@define-color headerbar_bg_color @base; +@define-color headerbar_fg_color @text; +@define-color headerbar_border_color @base; +@define-color headerbar_backdrop_color @base; +@define-color headerbar_shade_color @base; +@define-color headerbar_darker_shade_color @base; + +@define-color sidebar_bg_color @base; +@define-color sidebar_fg_color @text; +@define-color sidebar_border_color @base; +@define-color sidebar_backdrop_color @base; +@define-color sidebar_shade_color @base; + +@define-color secondary_sidebar_bg_color @base; +@define-color secondary_sidebar_fg_color @text; +@define-color secondary_sidebar_border_color @base; +@define-color secondary_sidebar_backdrop_color @base; +@define-color secondary_sidebar_shade_color @base; + +@define-color card_bg_color @base; +@define-color card_fg_color @text; +@define-color card_shade_color @base; + +@define-color dialog_bg_color @base; +@define-color dialog_fg_color @text; + +@define-color popover_bg_color @base; +@define-color popover_fg_color @text; +@define-color popover_shade_color @base; + +@define-color thumbnail_bg_color @base; +@define-color thumbnail_fg_color @text; + +@define-color shade_color @base; +@define-color scrollbar_outline_color @base; + +@define-color blue_1 @blue; +@define-color blue_2 @blue; +@define-color blue_3 @blue; +@define-color blue_4 @blue; +@define-color blue_5 @blue; + +@define-color green_1 @green; +@define-color green_2 @green; +@define-color green_3 @green; +@define-color green_4 @green; +@define-color green_5 @green; + +@define-color yellow_1 @yellow; +@define-color yellow_2 @yellow; +@define-color yellow_3 @yellow; +@define-color yellow_4 @yellow; +@define-color yellow_5 @yellow; + +@define-color orange_1 @orange; +@define-color orange_2 @orange; +@define-color orange_3 @orange; +@define-color orange_4 @orange; +@define-color orange_5 @orange; + +@define-color red_1 @red; +@define-color red_2 @red; +@define-color red_3 @red; +@define-color red_4 @red; +@define-color red_5 @red; + +@define-color purple_1 @magenta; +@define-color purple_2 @magenta; +@define-color purple_3 @magenta; +@define-color purple_4 @magenta; +@define-color purple_5 @magenta; + +@define-color brown_1 @orange; +@define-color brown_2 @orange; +@define-color brown_3 @orange; +@define-color brown_4 @orange; +@define-color brown_5 @orange; + +@define-color light_1 @base; +@define-color light_2 @base; +@define-color light_3 @base; +@define-color light_4 @base; +@define-color light_5 @base; + +@define-color dark_1 @base; +@define-color dark_2 @base; +@define-color dark_3 @base; +@define-color dark_4 @base; +@define-color dark_5 @base; diff --git a/home/qt/default.nix b/home/qt/default.nix index 3071bf4..e8e8376 100644 --- a/home/qt/default.nix +++ b/home/qt/default.nix @@ -31,9 +31,8 @@ in { "Kvantum/kvantum.kvconfig".text = lib.generators.toINI {} { General.theme = "theme"; }; - "Kvantum/theme/theme.svg".text = import ./svg.nix {inherit config;}; - "Kvantum/theme/theme.kvconfig".text = import ./kvconfig.nix {inherit config;}; - + "Kvantum/theme/theme.svg".source = lib.template.mustache ./theme.svg.mustache config.theme.colors; + "Kvantum/theme/theme.kvconfig".source = lib.template.mustache ./theme.kvconfig.mustache config.theme; "qt5ct/qt5ct.conf".text = mkQtctConf ''"${font},-1,5,50,0,0,0,0,0"''; "qt6ct/qt6ct.conf".text = mkQtctConf ''"${font},-1,5,400,0,0,0,0,0,0,0,0,0,0,1,Regular"''; }; diff --git a/home/qt/kvconfig.nix b/home/qt/kvconfig.nix deleted file mode 100644 index 83b189c..0000000 --- a/home/qt/kvconfig.nix +++ /dev/null @@ -1,513 +0,0 @@ -{config}: let - theme = config.theme; - inherit - (theme.colors) - base - surface - text - subtext - primary - ; - link = theme.colors.normal.blue; - visited = theme.colors.normal.magenta; - innerGap = toString theme.innerGap; - outerGap = toString theme.outerGap; -in '' - [%General] - author=Keystistic - comment=Breeze for Kvantum, based on Breeze Plasma theme and color scheme & Monochrome KDE Kvantum theme - x11drag=menubar_and_primary_toolbar - alt_mnemonic=true - left_tabs=true - attach_active_tab=true - mirror_doc_tabs=true - group_toolbar_buttons=false - toolbar_item_spacing=1 - toolbar_interior_spacing=3 - spread_progressbar=true - composite=true - menu_shadow_depth=5 - menu_separator_height=6 - tooltip_shadow_depth=6 - splitter_width=4 - scroll_width=6 - scroll_arrows=false - scroll_min_extent=60 - slider_width=5 - slider_handle_width=18 - slider_handle_length=18 - center_toolbar_handle=true - check_size=16 - textless_progressbar=false - progressbar_thickness=6 - menubar_mouse_tracking=true - toolbutton_style=1 - double_click=false - translucent_windows=false - blurring=true - popup_blurring=true - vertical_spin_indicators=true - spin_button_width=32 - fill_rubberband=false - merge_menubar_with_toolbar=true - small_icon_size=16 - large_icon_size=32 - button_icon_size=22 - toolbar_icon_size=22 - combo_as_lineedit=true - animate_states=false - button_contents_shift=true - combo_menu=true - hide_combo_checkboxes=true - combo_focus_rect=true - groupbox_top_label=true - inline_spin_indicators=false - joined_inactive_tabs=false - layout_spacing=${innerGap} - layout_margin=${innerGap} - scrollbar_in_view=true - transient_scrollbar=true - transient_groove=false - submenu_overlap=0 - tooltip_delay=-1 - tree_branch_line=true - dark_titlebar=true - opaque=QMPlay2,kaffeine,kmplayer,subtitlecomposer,vlc,avidemux,avidemux2_qt4,avidemux3_qt4,avidemux3_qt5,kamoso,QtCreator,VirtualBox,trojita,dragon,digikam - reduce_window_opacity=0 - scrollable_menu=false - submenu_delay=250 - no_inactiveness=false - no_window_pattern=false - reduce_menu_opacity=0 - respect_DE=true - click_behavior=0 - contrast=1.30 - dialog_button_layout=0 - drag_from_buttons=false - intensity=1.10 - saturation=1.20 - shadowless_popup=false - - [GeneralColors] - window.color=#${base} - base.color=#${surface} - alt.base.color=#${surface} - button.color=#${surface} - light.color=#${surface} - mid.light.color=#${base} - dark.color=#1e1e1e - mid.color=#${base} - highlight.color=#${primary} - inactive.highlight.color=#${primary} - text.color=#${text} - window.text.color=#${text} - button.text.color=#${text} - disabled.text.color=#${subtext}70 - tooltip.text.color=#${text} - highlight.text.color=#${base} - link.color=#${link} - link.visited.color=#${visited} - progress.indicator.text.color=#${text} - - [Hacks] - transparent_ktitle_label=false - transparent_dolphin_view=false - transparent_pcmanfm_sidepane=false - blur_translucent=true - transparent_menutitle=false - transparent_arrow_button=false - respect_darkness=true - kcapacitybar_as_progressbar=true - force_size_grip=true - iconless_pushbutton=false - iconless_menu=false - disabled_icon_opacity=100 - lxqtmainmenu_iconsize=22 - normal_default_pushbutton=true - single_top_toolbar=true - tint_on_mouseover=0 - transparent_pcmanfm_view=false - middle_click_scroll=false - no_selection_tint=false - opaque_colors=false - centered_forms=false - kinetic_scrolling=false - noninteger_translucency=false - - [PanelButtonCommand] - frame=true - frame.element=button - frame.top=${innerGap} - frame.bottom=${innerGap} - frame.left=${innerGap} - frame.right=${innerGap} - interior=true - interior.element=button - indicator.size=8 - text.normal.color=#${text} - text.focus.color=white - text.press.color=#${base} - text.toggle.color=white - text.shadow=0 - text.margin=1 - text.iconspacing=4 - indicator.element=arrow - text.margin.top=${innerGap} - text.margin.bottom=${innerGap} - text.margin.left=${innerGap} - text.margin.right=${innerGap} - min_width=+0.3font - min_height=+0.3font - frame.expansion=8 - - [PanelButtonTool] - inherits=PanelButtonCommand - - [Dock] - inherits=PanelButtonCommand - interior.element=dock - frame.element=dock - frame.top=1 - frame.bottom=1 - frame.left=1 - frame.right=1 - text.normal.color=#${text} - - [DockTitle] - inherits=PanelButtonCommand - frame=false - interior=false - text.normal.color=#${text} - text.focus.color=#${subtext} - text.bold=false - - [IndicatorSpinBox] - inherits=PanelButtonCommand - frame=true - interior=true - frame.left=1 - indicator.element=spin - indicator.size=10 - text.normal.color=#${text} - - [RadioButton] - inherits=PanelButtonCommand - frame=false - interior.element=radio - text.normal.color=#${text} - text.focus.color=#${subtext} - - [CheckBox] - inherits=PanelButtonCommand - frame=false - interior.element=checkbox - text.normal.color=#${text} - text.focus.color=#${subtext} - - [Focus] - inherits=PanelButtonCommand - frame=true - frame.element=focus - frame.top=1 - frame.bottom=1 - frame.left=1 - frame.right=1 - frame.patternsize=${innerGap}0 - - [GenericFrame] - inherits=PanelButtonCommand - frame=true - interior=false - frame.element=common - interior.element=common - frame.top=1 - frame.bottom=1 - frame.left=1 - frame.right=1 - - [LineEdit] - inherits=PanelButtonCommand - frame.element=lineedit - interior.element=lineedit - text.margin.left=0 - text.margin.right=0 - - [DropDownButton] - inherits=PanelButtonCommand - indicator.element=arrow-down - - [IndicatorArrow] - indicator.element=arrow - indicator.size=8 - - [ToolboxTab] - inherits=PanelButtonCommand - text.normal.color=#${text} - text.focus.color=#${subtext} - text.press.color=#${subtext} - - [Tab] - inherits=PanelButtonCommand - interior.element=tab - text.margin.left=${outerGap} - text.margin.right=${outerGap} - text.margin.top=${innerGap} - text.margin.bottom=${innerGap} - frame.element=tab - indicator.element=tab - indicator.size=16 - frame.top=${innerGap} - frame.bottom=${innerGap} - frame.left=${innerGap} - frame.right=${innerGap} - text.normal.color=#${text} - text.focus.color=#${text} - text.toggle.color=#${text} - frame.expansion=0 - - [TabFrame] - inherits=PanelButtonCommand - frame.element=tabframe - interior.element=tabframe - frame.top=${innerGap} - frame.bottom=${innerGap} - frame.left=${innerGap} - frame.right=${innerGap} - - [TreeExpander] - inherits=PanelButtonCommand - indicator.size=12 - indicator.element=tree - - [HeaderSection] - inherits=PanelButtonCommand - interior.element=header - frame.element=header - frame.top=1 - frame.bottom=1 - frame.left=1 - frame.right=1 - text.bold=false - text.normal.color=#${text} - text.focus.color=#${subtext} - text.press.color=#${base} - text.toggle.color=#${text} - frame.expansion=0 - - [SizeGrip] - indicator.element=resize-grip - / - [Toolbar] - inherits=PanelButtonCommand - indicator.element=toolbar - indicator.size=5 - text.margin=0 - frame=true - interior.element=menubar - frame.element=menubar - text.normal.color=#${text} - text.focus.color=#${subtext} - frame.left=0 - frame.right=0 - frame.top=0 - frame.bottom=1 - frame.expansion=0 - - [Slider] - inherits=PanelButtonCommand - frame.element=slider - interior.element=slider - frame.top=${innerGap} - frame.bottom=${innerGap} - frame.left=${innerGap} - frame.right=${innerGap} - - [SliderCursor] - inherits=PanelButtonCommand - frame=false - interior.element=slidercursor - - [Progressbar] - inherits=PanelButtonCommand - frame.element=progress - interior.element=progress - text.margin=0 - text.normal.color=#${text} - text.focus.color=#${subtext} - text.press.color=#${base} - text.toggle.color=#${text} - text.bold=false - frame.expansion=${innerGap} - - [ProgressbarContents] - inherits=PanelButtonCommand - frame=true - frame.element=progress-pattern - interior.element=progress-pattern - - [ItemView] - inherits=PanelButtonCommand - text.margin=0 - frame.element=itemview - interior.element=itemview - frame.top=${innerGap} - frame.bottom=${innerGap} - frame.left=${innerGap} - frame.right=${innerGap} - text.margin.top=${innerGap} - text.margin.bottom=${innerGap} - text.margin.left=${innerGap} - text.margin.right=${innerGap} - text.normal.color=#${text} - text.focus.color=#${subtext} - text.press.color=#${base} - text.toggle.color=#${text} - min_width=+0.3font - min_height=+0.3font - frame.expansion=0 - - [Splitter] - indicator.size=48 - - [Scrollbar] - inherits=PanelButtonCommand - indicator.element=arrow - indicator.size=8 - - [ScrollbarSlider] - inherits=PanelButtonCommand - interior.element=scrollbarslider - interior=true - frame=false - frame.expansion=${innerGap}8 - - [ScrollbarGroove] - inherits=PanelButtonCommand - interior.element=scrollbargroove - interior=true - frame=false - frame.expansion=${innerGap}8 - - [MenuItem] - inherits=PanelButtonCommand - frame=true - frame.element=menuitem - interior.element=menuitem - indicator.element=menuitem - text.normal.color=#${text} - text.focus.color=#${base} - text.margin.top=1 - text.margin.bottom=1 - text.margin.left=${innerGap} - text.margin.right=${innerGap} - frame.top=${innerGap} - frame.bottom=${innerGap} - frame.left=${innerGap} - frame.right=${innerGap} - text.bold=false - min_width=+0.3font - min_height=+0.3font - frame.expansion=0 - - [MenuBar] - inherits=PanelButtonCommand - frame.element=menubar - interior.element=menubar - text.normal.color=#${text} - frame.bottom=0 - frame.expansion=0 - - [MenuBarItem] - inherits=PanelButtonCommand - interior=true - interior.element=menubaritem - frame.element=menubaritem - frame.top=${innerGap} - frame.bottom=${innerGap} - frame.left=${innerGap} - frame.right=${innerGap} - text.margin.left=${innerGap} - text.margin.right=${innerGap} - text.margin.top=0 - text.margin.bottom=0 - text.normal.color=#${text} - text.focus.color=#${base} - frame.expansion=0 - - [TitleBar] - inherits=PanelButtonCommand - frame=false - text.margin.top=${innerGap} - text.margin.bottom=${innerGap} - text.margin.left=${innerGap} - text.margin.right=${innerGap} - interior.element=titlebar - indicator.size=16 - indicator.element=mdi - text.normal.color=#${text} - text.focus.color=#${subtext} - text.bold=true - text.italic=false - frame.expansion=0 - - [ComboBox] - inherits=PanelButtonCommand - interior.element=combo - frame.element=combo - text.press.color=#${subtext} - indicator.element=carrow - - [Menu] - inherits=PanelButtonCommand - frame.top=1 - frame.bottom=1 - frame.left=1 - frame.right=1 - frame.element=menu - interior.element=menu - text.normal.color=#${text} - text.shadow=false - frame.expansion=0 - - [GroupBox] - inherits=GenericFrame - frame=false - text.shadow=0 - text.margin=0 - text.normal.color=#${text} - text.focus.color=#${subtext} - text.bold=true - frame.expansion=0 - - [TabBarFrame] - inherits=GenericFrame - frame=true - frame.element=tabBarFrame - interior=false - frame.top=${innerGap} - frame.bottom=${innerGap} - frame.left=${innerGap} - frame.right=${innerGap} - - [ToolTip] - inherits=GenericFrame - frame.top=${innerGap} - frame.bottom=${innerGap} - frame.left=${innerGap} - frame.right=${innerGap} - interior=true - text.shadow=0 - text.margin=0 - interior.element=tooltip - frame.element=tooltip - frame.expansion=0 - - [StatusBar] - inherits=GenericFrame - frame=false - interior=false - - [Window] - interior=true - interior.element=window -'' diff --git a/home/qt/svg.nix b/home/qt/svg.nix deleted file mode 100644 index d393232..0000000 --- a/home/qt/svg.nix +++ /dev/null @@ -1,9522 +0,0 @@ -{config}: let - theme = config.theme; - inherit - (theme.colors) - base - surface - primary - ; -in '' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Invisible elements here - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -'' diff --git a/home/qt/theme.kvconfig.mustache b/home/qt/theme.kvconfig.mustache new file mode 100644 index 0000000..30f7973 --- /dev/null +++ b/home/qt/theme.kvconfig.mustache @@ -0,0 +1,497 @@ +[%General] +author=Keystistic +comment=Breeze for Kvantum, based on Breeze Plasma theme and color scheme & Monochrome KDE Kvantum theme +x11drag=menubar_and_primary_toolbar +alt_mnemonic=true +left_tabs=true +attach_active_tab=true +mirror_doc_tabs=true +group_toolbar_buttons=false +toolbar_item_spacing=1 +toolbar_interior_spacing=3 +spread_progressbar=true +composite=true +menu_shadow_depth=5 +menu_separator_height=6 +tooltip_shadow_depth=6 +splitter_width=4 +scroll_width=6 +scroll_arrows=false +scroll_min_extent=60 +slider_width=5 +slider_handle_width=18 +slider_handle_length=18 +center_toolbar_handle=true +check_size=16 +textless_progressbar=false +progressbar_thickness=6 +menubar_mouse_tracking=true +toolbutton_style=1 +double_click=false +translucent_windows=false +blurring=true +popup_blurring=true +vertical_spin_indicators=true +spin_button_width=32 +fill_rubberband=false +merge_menubar_with_toolbar=true +small_icon_size=16 +large_icon_size=32 +button_icon_size=22 +toolbar_icon_size=22 +combo_as_lineedit=true +animate_states=false +button_contents_shift=true +combo_menu=true +hide_combo_checkboxes=true +combo_focus_rect=true +groupbox_top_label=true +inline_spin_indicators=false +joined_inactive_tabs=false +layout_spacing={{innerGap}} +layout_margin={{innerGap}} +scrollbar_in_view=true +transient_scrollbar=true +transient_groove=false +submenu_overlap=0 +tooltip_delay=-1 +tree_branch_line=true +dark_titlebar=true +opaque=QMPlay2,kaffeine,kmplayer,subtitlecomposer,vlc,avidemux,avidemux2_qt4,avidemux3_qt4,avidemux3_qt5,kamoso,QtCreator,VirtualBox,trojita,dragon,digikam +reduce_window_opacity=0 +scrollable_menu=false +submenu_delay=250 +no_inactiveness=false +no_window_pattern=false +reduce_menu_opacity=0 +respect_DE=true +click_behavior=0 +contrast=1.30 +dialog_button_layout=0 +drag_from_buttons=false +intensity=1.10 +saturation=1.20 +shadowless_popup=false + +[GeneralColors] +window.color=#{{colors.base}} +base.color=#{{colors.surface}} +alt.base.color=#{{colors.surface}} +button.color=#{{colors.surface}} +light.color=#{{colors.surface}} +mid.light.color=#{{colors.base}} +dark.color=#1e1e1e +mid.color=#{{colors.base}} +highlight.color=#{{colors.primary}} +inactive.highlight.color=#{{colors.primary}} +text.color=#{{colors.text}} +window.text.color=#{{colors.text}} +button.text.color=#{{colors.text}} +disabled.text.color=#{{colors.subtext}}70 +tooltip.text.color=#{{colors.text}} +highlight.text.color=#{{colors.base}} +link.color=#{{colors.normal.blue}} +link.visited.color=#{{colors.normal.magenta}} +progress.indicator.text.color=#{{colors.text}} + +[Hacks] +transparent_ktitle_label=false +transparent_dolphin_view=false +transparent_pcmanfm_sidepane=false +blur_translucent=true +transparent_menutitle=false +transparent_arrow_button=false +respect_darkness=true +kcapacitybar_as_progressbar=true +force_size_grip=true +iconless_pushbutton=false +iconless_menu=false +disabled_icon_opacity=100 +lxqtmainmenu_iconsize=22 +normal_default_pushbutton=true +single_top_toolbar=true +tint_on_mouseover=0 +transparent_pcmanfm_view=false +middle_click_scroll=false +no_selection_tint=false +opaque_colors=false +centered_forms=false +kinetic_scrolling=false +noninteger_translucency=false + +[PanelButtonCommand] +frame=true +frame.element=button +frame.top={{innerGap}} +frame.bottom={{innerGap}} +frame.left={{innerGap}} +frame.right={{innerGap}} +interior=true +interior.element=button +indicator.size=8 +text.normal.color=#{{colors.text}} +text.focus.color=white +text.press.color=#{{colors.base}} +text.toggle.color=white +text.shadow=0 +text.margin=1 +text.iconspacing=4 +indicator.element=arrow +text.margin.top={{innerGap}} +text.margin.bottom={{innerGap}} +text.margin.left={{innerGap}} +text.margin.right={{innerGap}} +min_width=+0.3font +min_height=+0.3font +frame.expansion=8 + +[PanelButtonTool] +inherits=PanelButtonCommand + +[Dock] +inherits=PanelButtonCommand +interior.element=dock +frame.element=dock +frame.top=1 +frame.bottom=1 +frame.left=1 +frame.right=1 +text.normal.color=#{{colors.text}} + +[DockTitle] +inherits=PanelButtonCommand +frame=false +interior=false +text.normal.color=#{{colors.text}} +text.focus.color=#{{colors.subtext}} +text.bold=false + +[IndicatorSpinBox] +inherits=PanelButtonCommand +frame=true +interior=true +frame.left=1 +indicator.element=spin +indicator.size=10 +text.normal.color=#{{colors.text}} + +[RadioButton] +inherits=PanelButtonCommand +frame=false +interior.element=radio +text.normal.color=#{{colors.text}} +text.focus.color=#{{colors.subtext}} + +[CheckBox] +inherits=PanelButtonCommand +frame=false +interior.element=checkbox +text.normal.color=#{{colors.text}} +text.focus.color=#{{colors.subtext}} + +[Focus] +inherits=PanelButtonCommand +frame=true +frame.element=focus +frame.top=1 +frame.bottom=1 +frame.left=1 +frame.right=1 +frame.patternsize={{innerGap}}0 + +[GenericFrame] +inherits=PanelButtonCommand +frame=true +interior=false +frame.element=common +interior.element=common +frame.top=1 +frame.bottom=1 +frame.left=1 +frame.right=1 + +[LineEdit] +inherits=PanelButtonCommand +frame.element=lineedit +interior.element=lineedit +text.margin.left=0 +text.margin.right=0 + +[DropDownButton] +inherits=PanelButtonCommand +indicator.element=arrow-down + +[IndicatorArrow] +indicator.element=arrow +indicator.size=8 + +[ToolboxTab] +inherits=PanelButtonCommand +text.normal.color=#{{colors.text}} +text.focus.color=#{{colors.subtext}} +text.press.color=#{{colors.subtext}} + +[Tab] +inherits=PanelButtonCommand +interior.element=tab +text.margin.left={{outerGap}} +text.margin.right={{outerGap}} +text.margin.top={{innerGap}} +text.margin.bottom={{innerGap}} +frame.element=tab +indicator.element=tab +indicator.size=16 +frame.top={{innerGap}} +frame.bottom={{innerGap}} +frame.left={{innerGap}} +frame.right={{innerGap}} +text.normal.color=#{{colors.text}} +text.focus.color=#{{colors.text}} +text.toggle.color=#{{colors.text}} +frame.expansion=0 + +[TabFrame] +inherits=PanelButtonCommand +frame.element=tabframe +interior.element=tabframe +frame.top={{innerGap}} +frame.bottom={{innerGap}} +frame.left={{innerGap}} +frame.right={{innerGap}} + +[TreeExpander] +inherits=PanelButtonCommand +indicator.size=12 +indicator.element=tree + +[HeaderSection] +inherits=PanelButtonCommand +interior.element=header +frame.element=header +frame.top=1 +frame.bottom=1 +frame.left=1 +frame.right=1 +text.bold=false +text.normal.color=#{{colors.text}} +text.focus.color=#{{colors.subtext}} +text.press.color=#{{colors.base}} +text.toggle.color=#{{colors.text}} +frame.expansion=0 + +[SizeGrip] +indicator.element=resize-grip +/ +[Toolbar] +inherits=PanelButtonCommand +indicator.element=toolbar +indicator.size=5 +text.margin=0 +frame=true +interior.element=menubar +frame.element=menubar +text.normal.color=#{{colors.text}} +text.focus.color=#{{colors.subtext}} +frame.left=0 +frame.right=0 +frame.top=0 +frame.bottom=1 +frame.expansion=0 + +[Slider] +inherits=PanelButtonCommand +frame.element=slider +interior.element=slider +frame.top={{innerGap}} +frame.bottom={{innerGap}} +frame.left={{innerGap}} +frame.right={{innerGap}} + +[SliderCursor] +inherits=PanelButtonCommand +frame=false +interior.element=slidercursor + +[Progressbar] +inherits=PanelButtonCommand +frame.element=progress +interior.element=progress +text.margin=0 +text.normal.color=#{{colors.text}} +text.focus.color=#{{colors.subtext}} +text.press.color=#{{colors.base}} +text.toggle.color=#{{colors.text}} +text.bold=false +frame.expansion={{innerGap}} + +[ProgressbarContents] +inherits=PanelButtonCommand +frame=true +frame.element=progress-pattern +interior.element=progress-pattern + +[ItemView] +inherits=PanelButtonCommand +text.margin=0 +frame.element=itemview +interior.element=itemview +frame.top={{innerGap}} +frame.bottom={{innerGap}} +frame.left={{innerGap}} +frame.right={{innerGap}} +text.margin.top={{innerGap}} +text.margin.bottom={{innerGap}} +text.margin.left={{innerGap}} +text.margin.right={{innerGap}} +text.normal.color=#{{colors.text}} +text.focus.color=#{{colors.subtext}} +text.press.color=#{{colors.base}} +text.toggle.color=#{{colors.text}} +min_width=+0.3font +min_height=+0.3font +frame.expansion=0 + +[Splitter] +indicator.size=48 + +[Scrollbar] +inherits=PanelButtonCommand +indicator.element=arrow +indicator.size=8 + +[ScrollbarSlider] +inherits=PanelButtonCommand +interior.element=scrollbarslider +interior=true +frame=false +frame.expansion={{innerGap}}8 + +[ScrollbarGroove] +inherits=PanelButtonCommand +interior.element=scrollbargroove +interior=true +frame=false +frame.expansion={{innerGap}}8 + +[MenuItem] +inherits=PanelButtonCommand +frame=true +frame.element=menuitem +interior.element=menuitem +indicator.element=menuitem +text.normal.color=#{{colors.text}} +text.focus.color=#{{colors.base}} +text.margin.top=1 +text.margin.bottom=1 +text.margin.left={{innerGap}} +text.margin.right={{innerGap}} +frame.top={{innerGap}} +frame.bottom={{innerGap}} +frame.left={{innerGap}} +frame.right={{innerGap}} +text.bold=false +min_width=+0.3font +min_height=+0.3font +frame.expansion=0 + +[MenuBar] +inherits=PanelButtonCommand +frame.element=menubar +interior.element=menubar +text.normal.color=#{{colors.text}} +frame.bottom=0 +frame.expansion=0 + +[MenuBarItem] +inherits=PanelButtonCommand +interior=true +interior.element=menubaritem +frame.element=menubaritem +frame.top={{innerGap}} +frame.bottom={{innerGap}} +frame.left={{innerGap}} +frame.right={{innerGap}} +text.margin.left={{innerGap}} +text.margin.right={{innerGap}} +text.margin.top=0 +text.margin.bottom=0 +text.normal.color=#{{colors.text}} +text.focus.color=#{{colors.base}} +frame.expansion=0 + +[TitleBar] +inherits=PanelButtonCommand +frame=false +text.margin.top={{innerGap}} +text.margin.bottom={{innerGap}} +text.margin.left={{innerGap}} +text.margin.right={{innerGap}} +interior.element=titlebar +indicator.size=16 +indicator.element=mdi +text.normal.color=#{{colors.text}} +text.focus.color=#{{colors.subtext}} +text.bold=true +text.italic=false +frame.expansion=0 + +[ComboBox] +inherits=PanelButtonCommand +interior.element=combo +frame.element=combo +text.press.color=#{{colors.subtext}} +indicator.element=carrow + +[Menu] +inherits=PanelButtonCommand +frame.top=1 +frame.bottom=1 +frame.left=1 +frame.right=1 +frame.element=menu +interior.element=menu +text.normal.color=#{{colors.text}} +text.shadow=false +frame.expansion=0 + +[GroupBox] +inherits=GenericFrame +frame=false +text.shadow=0 +text.margin=0 +text.normal.color=#{{colors.text}} +text.focus.color=#{{colors.subtext}} +text.bold=true +frame.expansion=0 + +[TabBarFrame] +inherits=GenericFrame +frame=true +frame.element=tabBarFrame +interior=false +frame.top={{innerGap}} +frame.bottom={{innerGap}} +frame.left={{innerGap}} +frame.right={{innerGap}} + +[ToolTip] +inherits=GenericFrame +frame.top={{innerGap}} +frame.bottom={{innerGap}} +frame.left={{innerGap}} +frame.right={{innerGap}} +interior=true +text.shadow=0 +text.margin=0 +interior.element=tooltip +frame.element=tooltip +frame.expansion=0 + +[StatusBar] +inherits=GenericFrame +frame=false +interior=false + +[Window] +interior=true +interior.element=window diff --git a/home/qt/theme.svg.mustache b/home/qt/theme.svg.mustache new file mode 100644 index 0000000..0ed3c9e --- /dev/null +++ b/home/qt/theme.svg.mustache @@ -0,0 +1,9512 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Invisible elements here + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/system.nix b/lib/system.nix new file mode 100644 index 0000000..4e316cd --- /dev/null +++ b/lib/system.nix @@ -0,0 +1 @@ +{lib} diff --git a/pkgs/astal/default.nix b/pkgs/astal/default.nix index d076f07..7432166 100644 --- a/pkgs/astal/default.nix +++ b/pkgs/astal/default.nix @@ -1,27 +1,55 @@ { + stdenvNoCC, astal, callPackage, dart-sass, networkmanager, runCommand, + mustache-go, writeShellApplication, # System theme must be passed in theme ? null, ... }: let - vars = import ./theme.nix {inherit theme;}; + # template the vars.scss file with + # the passed in theme to the package + vars = stdenvNoCC.mkDerivation { + name = "vars.scss"; + nativeBuildInputs = [mustache-go]; + + passAsFile = ["jsonData"]; + jsonData = builtins.toJSON theme; + + dontUnpack = true; + + buildPhase = '' + mustache "$jsonDataPath" "${./vars.scss.mustache}" > rendered_config + ''; + + installPhase = '' + cp rendered_config $out + ''; + }; + + # build the astal source + # tree + mkSrc = file: + runCommand "src" {} '' + # copy lua + mkdir -p $out + cp -r ${./src}/{*.lua,widget} $out/ + cp $out/${file}.lua $out/init.lua + + # build css + cp -r ${./src}/style/* . + cat ${vars} style.scss widget/* > main.scss + ${dart-sass}/bin/sass main.scss $out/main.css + ''; + mkAstal = file: callPackage ./builder.nix { - src = runCommand "src" {} '' - mkdir -p $out - cp -r ${./src}/{*.lua,widget} $out/ - cp $out/${file}.lua $out/init.lua - cp -r ${./src}/style/* . - echo '${vars}' > theme.scss - cat theme.scss style.scss widget/* > main.scss - ${dart-sass}/bin/sass main.scss $out/main.css - ''; name = "astal-${file}"; + src = mkSrc file; extraPackages = (with astal; [ apps diff --git a/pkgs/astal/theme.nix b/pkgs/astal/theme.nix deleted file mode 100644 index b76864c..0000000 --- a/pkgs/astal/theme.nix +++ /dev/null @@ -1,26 +0,0 @@ -{theme, ...}: '' - - $text: #${theme.colors.text}; - $subtext: #${theme.colors.subtext}; - - $base: #${theme.colors.base}; - $surface: #${theme.colors.surface}; - $overlay: #${theme.colors.overlay}; - - $primary: #${theme.colors.primary}; - $success: #${theme.colors.success}; - $warning: #${theme.colors.warning}; - $error: #${theme.colors.error}; - - $border: ${toString theme.borderWidth}px; - - $inner-radius: ${toString theme.innerRadius}px; - $outer-radius: ${toString theme.outerRadius}px; - - $inner-gap: ${toString theme.innerGap}px; - $outer-gap: ${toString theme.outerGap}px; - - $font-name: "${theme.font.regular}", "${theme.font.monospace}"; - $font-size: ${toString theme.font.size}px; - -'' diff --git a/pkgs/astal/vars.scss.mustache b/pkgs/astal/vars.scss.mustache new file mode 100644 index 0000000..ef0d7aa --- /dev/null +++ b/pkgs/astal/vars.scss.mustache @@ -0,0 +1,22 @@ +$text: #{{colors.text}}; +$subtext: #{{colors.subtext}}; + +$base: #{{colors.base}}; +$surface: #{{colors.surface}}; +$overlay: #{{colors.overlay}}; + +$primary: #{{colors.primary}}; +$success: #{{colors.success}}; +$warning: #{{colors.warning}}; +$error: #{{colors.error}}; + +$border: {{borderWidth}}px; + +$inner-radius: {{innerRadius}}px; +$outer-radius: {{outerRadius}}px; + +$inner-gap: {{innerGap}}px; +$outer-gap: {{outerGap}}px; + +$font-name: "{{font.regular}}", "{{font.monospace}}"; +$font-size: {{font.size}}px; -- cgit v1.3.1-freya