diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/desktop/hyprland.nix | 20 | ||||
-rw-r--r-- | modules/desktop/hyprlock.nix | 12 | ||||
-rw-r--r-- | modules/desktop/mako.nix | 6 | ||||
-rw-r--r-- | modules/desktop/waybar/style.nix | 17 | ||||
-rw-r--r-- | modules/desktop/wofi/style.nix | 17 | ||||
-rw-r--r-- | modules/options.nix | 109 | ||||
-rw-r--r-- | modules/terminal/alacritty.nix | 57 | ||||
-rw-r--r-- | modules/terminal/kitty.nix | 23 |
8 files changed, 145 insertions, 116 deletions
diff --git a/modules/desktop/hyprland.nix b/modules/desktop/hyprland.nix index 13a1926..3b04a8c 100644 --- a/modules/desktop/hyprland.nix +++ b/modules/desktop/hyprland.nix @@ -10,10 +10,10 @@ hyprland-plugins = inputs.hyprland-plugins.packages.${system}; hy3 = inputs.hy3.packages.${system}; - fg = "rgb(${config.theme.colors.fg})"; - bg = "rgb(${config.theme.colors.bg})"; + text = "rgb(${config.theme.colors.text})"; + base = "rgb(${config.theme.colors.base})"; + surface = "rgb(${config.theme.colors.surface})"; primary = "rgb(${config.theme.colors.primary})"; - inactive = "rgb(${config.theme.colors.surface.bg})"; debug = false; @@ -103,7 +103,7 @@ in { extend_border_grab_area = 20; border_size = config.theme.borderWidth; "col.active_border" = "${primary}"; - "col.inactive_border" = "${inactive}"; + "col.inactive_border" = "${surface}"; }; # Gestures @@ -304,12 +304,12 @@ in { radius = config.theme.outerRadius; border_width = config.theme.borderWidth; - "col.active" = "${bg}"; - "col.active.border" = "${inactive}"; - "col.active.text" = "${fg}"; - "col.inactive" = "${bg}"; - "col.inactive.border" = "${inactive}"; - "col.inactive.text" = "${fg}"; + "col.active" = "${base}"; + "col.active.border" = "${primary}"; + "col.active.text" = "${text}"; + "col.inactive" = "${base}"; + "col.inactive.border" = "${surface}"; + "col.inactive.text" = "${text}"; }; autotile = { diff --git a/modules/desktop/hyprlock.nix b/modules/desktop/hyprlock.nix index da0621c..8be2856 100644 --- a/modules/desktop/hyprlock.nix +++ b/modules/desktop/hyprlock.nix @@ -3,8 +3,8 @@ lib, ... }: let - fg = "rgb(${config.theme.colors.fg})"; - bg = "rgb(${config.theme.colors.bg})"; + text = "rgb(${config.theme.colors.text})"; + base = "rgb(${config.theme.colors.base})"; error = "rgb(${config.theme.colors.error})"; trans = "rgba(0,0,0,0)"; @@ -21,7 +21,7 @@ in { settings = { background = { path = config.theme.lockscreen; - color = bg; + color = base; blur_passes = 0; blur_size = 2; noise = 0; @@ -41,7 +41,7 @@ in { dots_rounding = -1; outer_color = trans; inner_color = trans; - font_color = fg; + font_color = text; fade_on_empty = false; placeholder_text = "Enter Password"; hide_input = false; @@ -62,7 +62,7 @@ in { # Date { text = "cmd[update:1000] echo \"$(date +\"%A, %B %d\")\""; - color = fg; + color = text; font_size = 20; font_family = config.theme.font.header; position = "0, -100"; @@ -72,7 +72,7 @@ in { # Clock { text = "cmd[update:1000] echo \"$(date +\"%k:%M:%S\")\""; - color = fg; + color = text; font_size = 90; font_family = config.theme.font.header; position = "0, -130"; diff --git a/modules/desktop/mako.nix b/modules/desktop/mako.nix index 17ed94f..5a24e56 100644 --- a/modules/desktop/mako.nix +++ b/modules/desktop/mako.nix @@ -17,11 +17,11 @@ in { margin = toString config.theme.outerGap; padding = toString config.theme.innerGap; - background-color = "#${config.theme.colors.bg}"; + background-color = "#${config.theme.colors.base}"; progress-color = "#${config.theme.colors.primary}"; - text-color = "#${config.theme.colors.fg}"; + text-color = "#${config.theme.colors.text}"; - border-color = "#${config.theme.colors.fg}"; + border-color = "#${config.theme.colors.text}"; border-size = config.theme.borderWidth; border-radius = config.theme.outerRadius; diff --git a/modules/desktop/waybar/style.nix b/modules/desktop/waybar/style.nix index 33db673..21a8de5 100644 --- a/modules/desktop/waybar/style.nix +++ b/modules/desktop/waybar/style.nix @@ -1,8 +1,7 @@ {theme}: let - fg = "#${theme.colors.fg}"; - bg = "#${theme.colors.bg}"; - surface-fg = "#${theme.colors.surface.fg}"; - surface-bg = "#${theme.colors.surface.bg}"; + text = "#${theme.colors.text}"; + base = "#${theme.colors.base}"; + surface = "#${theme.colors.surface}"; primary = "#${theme.colors.primary}"; success = "#${theme.colors.success}"; warning = "#${theme.colors.warning}"; @@ -23,8 +22,8 @@ in '' window#waybar { font-family: "${theme.font.regular}", "${theme.font.icon}", "${theme.font.monospace}"; font-size: ${fontSize}; - color: ${fg}; - background-color: ${bg}; + color: ${text}; + background-color: ${base}; } /** Workspaces */ @@ -37,14 +36,14 @@ in '' border-radius: ${innerRadius}; margin: 4px 2px; padding: 0px 7px; - background: ${surface-bg}; - color: ${surface-fg}; + background: ${surface}; + color: ${text}; } #workspaces button.focused, #workspaces button.active { background: ${primary}; - color: ${bg}; + color: ${base}; } #workspaces button.urgent { diff --git a/modules/desktop/wofi/style.nix b/modules/desktop/wofi/style.nix index 27b7205..75a0a21 100644 --- a/modules/desktop/wofi/style.nix +++ b/modules/desktop/wofi/style.nix @@ -1,8 +1,7 @@ {theme}: let - fg = "#${theme.colors.fg}"; - bg = "#${theme.colors.bg}"; - surface-fg = "#${theme.colors.surface.fg}"; - surface-bg = "#${theme.colors.surface.bg}"; + 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"; @@ -21,7 +20,7 @@ in '' margin: 0px; border: ${borderWidth} solid ${primary}; border-radius: ${outerRadius}; - background-color: ${bg}; + background-color: ${base}; } /* Outer Box */ @@ -41,8 +40,8 @@ in '' margin: ${innerGap}; padding: ${innerGap}; border: none; - color: ${surface-fg}; - background-color: ${surface-bg}; + color: ${text}; + background-color: ${surface}; border-radius: ${outerRadius}; } @@ -58,7 +57,7 @@ in '' margin: ${innerGap}; padding: ${innerGap}; border: none; - color: ${fg}; + color: ${text}; } /* Selected Entry */ @@ -68,7 +67,7 @@ in '' } #entry:selected #text { - color: ${bg}; + color: ${base}; } '' diff --git a/modules/options.nix b/modules/options.nix index 62b4ae5..78b7776 100644 --- a/modules/options.nix +++ b/modules/options.nix @@ -41,36 +41,29 @@ with lib; let description = "Author of the theme"; }; - fg = mkOption { + text = mkOption { type = types.str; - description = "Text color"; + description = "Text color."; }; - bg = mkOption { + subtext = mkOption { type = types.str; - description = "Background color"; + description = "Subtext color."; }; - surface = { - fg = mkOption { - type = types.str; - description = "Surface text color"; - }; - bg = mkOption { - type = types.str; - description = "Surface background color"; - }; + base = mkOption { + type = types.str; + description = "Base background color."; }; - hover = { - fg = mkOption { - type = types.str; - description = "Hover text color"; - }; - bg = mkOption { - type = types.str; - description = "Hover background color"; - }; + surface = mkOption { + type = types.str; + description = "Surface (lighter) background color."; + }; + + overlay = mkOption { + type = types.str; + description = "Overlay (light) background color."; }; primary = mkOption { @@ -96,84 +89,104 @@ with lib; let normal = { black = mkOption { type = types.str; - description = "Terminal normal color"; + description = "Terminal black normal color"; }; - blue = mkOption { + red = mkOption { type = types.str; - description = "Terminal normal color"; + description = "Terminal red normal color"; }; - cyan = mkOption { + green = mkOption { type = types.str; - description = "Terminal normal color"; + description = "Terminal green normal color"; }; - green = mkOption { + yellow = mkOption { + type = types.str; + description = "Terminal yellow normal color"; + }; + + blue = mkOption { type = types.str; - description = "Terminal normal color"; + description = "Terminal blue normal color"; }; magenta = mkOption { type = types.str; - description = "Terminal normal color"; + description = "Terminal magenta normal color"; }; - red = mkOption { + cyan = mkOption { type = types.str; - description = "Terminal normal color"; + description = "Terminal cyan normal color"; }; white = mkOption { type = types.str; - description = "Terminal normal color"; + description = "Terminal white normal color"; }; - yellow = mkOption { + pink = mkOption { + type = types.str; + description = "Terminal pink (extended) normal color."; + }; + + orange = mkOption { type = types.str; - description = "Terminal normal color"; + description = "Terminal orange (extended) normal color."; }; }; bright = { black = mkOption { type = types.str; - description = "Terminal bright color"; + description = "Terminal black bright color"; }; - blue = mkOption { + red = mkOption { type = types.str; - description = "Terminal bright color"; + description = "Terminal red bright color"; }; - cyan = mkOption { + green = mkOption { type = types.str; - description = "Terminal bright color"; + description = "Terminal green bright color"; }; - green = mkOption { + yellow = mkOption { + type = types.str; + description = "Terminal yellow bright color"; + }; + + blue = mkOption { type = types.str; - description = "Terminal bright color"; + description = "Terminal blue bright color"; }; magenta = mkOption { type = types.str; - description = "Terminal bright color"; + description = "Terminal magenta bright color"; }; - red = mkOption { + cyan = mkOption { type = types.str; - description = "Terminal bright color"; + description = "Terminal cyan bright color"; }; white = mkOption { type = types.str; - description = "Terminal bright color"; + description = "Terminal white bright color"; }; - yellow = mkOption { + pink = mkOption { + type = types.str; + description = "Terminal pink (extended) bright color."; + }; + + orange = mkOption { type = types.str; - description = "Terminal bright color"; + description = "Terminal orange (extended) bright color."; }; }; }; diff --git a/modules/terminal/alacritty.nix b/modules/terminal/alacritty.nix index 7dd4456..7addff0 100644 --- a/modules/terminal/alacritty.nix +++ b/modules/terminal/alacritty.nix @@ -48,25 +48,46 @@ in { }; # Colors - colors = - (lib.attrsets.mapAttrs ( - group: colors: - lib.attrsets.mapAttrs (name: color: "#${color}") colors - ) {inherit (config.theme.colors) bright normal;}) - // { - cursor = { - background = "CellForeground"; - text = "CellBackground"; - }; - selection = { - background = "CellForeground"; - text = "CellBackground"; - }; - primary = { - foreground = "#${config.theme.colors.fg}"; - background = "#${config.theme.colors.bg}"; - }; + colors = { + normal = lib.attrsets.mapAttrs (name: color: "${color}") { + inherit (config.theme.colors.normal) + black + red + green + yellow + blue + magenta + cyan + white; }; + + bright = lib.attrsets.mapAttrs (name: color: "${color}") { + inherit (config.theme.colors.bright) + black + red + green + yellow + blue + magenta + cyan + white; + }; + + cursor = { + background = "CellForeground"; + text = "CellBackground"; + }; + + selection = { + background = "CellForeground"; + text = "CellBackground"; + }; + + primary = { + foreground = "#${config.theme.colors.text}"; + background = "#${config.theme.colors.base}"; + }; + }; }; }; }; diff --git a/modules/terminal/kitty.nix b/modules/terminal/kitty.nix index 88aa151..cee0e72 100644 --- a/modules/terminal/kitty.nix +++ b/modules/terminal/kitty.nix @@ -43,20 +43,17 @@ in { # Disable close prompt confirm_os_window_close = 0; - # colors - background = "#${config.theme.colors.bg}"; - foreground = "#${config.theme.colors.fg}"; - selection_background = "#${config.theme.colors.surface.bg}"; - selection_foreground = "#${config.theme.colors.surface.fg}"; + # selection + selection_background = "#${config.theme.colors.surface}"; + selection_foreground = "none"; + + # cursor url_color = "#${config.theme.colors.bright.yellow}"; - cursor = "#${config.theme.colors.fg}"; - active_border_color = "#${config.theme.colors.primary}"; - inactive_border_color = "#${config.theme.colors.bg}"; - active_tab_background = "#${config.theme.colors.bg}"; - active_tab_foreground = "#${config.theme.colors.fg}"; - inactive_tab_background = "#${config.theme.colors.bg}"; - inactive_tab_foreground = "#${config.theme.colors.fg}"; - tab_bar_background = "#${config.theme.colors.bg}"; + cursor = "#${config.theme.colors.text}"; + + # colors + background = "#${config.theme.colors.base}"; + foreground = "#${config.theme.colors.text}"; # normal color0 = "#${config.theme.colors.normal.black}"; |