diff --git a/flake.lock b/flake.lock index a8ab67b52..3376449a0 100644 --- a/flake.lock +++ b/flake.lock @@ -34,30 +34,14 @@ "type": "github" } }, - "base16-foot": { - "flake": false, - "locked": { - "lastModified": 1696725948, - "narHash": "sha256-65bz2bUL/yzZ1c8/GQASnoiGwaF8DczlxJtzik1c0AU=", - "owner": "tinted-theming", - "repo": "base16-foot", - "rev": "eedbcfa30de0a4baa03e99f5e3ceb5535c2755ce", - "type": "github" - }, - "original": { - "owner": "tinted-theming", - "repo": "base16-foot", - "type": "github" - } - }, "base16-helix": { "flake": false, "locked": { - "lastModified": 1720809814, - "narHash": "sha256-numb3xigRGnr/deF7wdjBwVg7fpbTH7reFDkJ75AJkY=", + "lastModified": 1725860795, + "narHash": "sha256-Z2o8VBPW3I+KKTSfe25kskz0EUj7MpUh8u355Z1nVsU=", "owner": "tinted-theming", "repo": "base16-helix", - "rev": "34f41987bec14c0f3f6b2155c19787b1f6489625", + "rev": "7f795bf75d38e0eea9fed287264067ca187b88a9", "type": "github" }, "original": { @@ -66,38 +50,6 @@ "type": "github" } }, - "base16-kitty": { - "flake": false, - "locked": { - "lastModified": 1665001328, - "narHash": "sha256-aRaizTYPpuWEcvoYE9U+YRX+Wsc8+iG0guQJbvxEdJY=", - "owner": "kdrag0n", - "repo": "base16-kitty", - "rev": "06bb401fa9a0ffb84365905ffbb959ae5bf40805", - "type": "github" - }, - "original": { - "owner": "kdrag0n", - "repo": "base16-kitty", - "type": "github" - } - }, - "base16-tmux": { - "flake": false, - "locked": { - "lastModified": 1696725902, - "narHash": "sha256-wDPg5elZPcQpu7Df0lI5O8Jv4A3T6jUQIVg63KDU+3Q=", - "owner": "tinted-theming", - "repo": "base16-tmux", - "rev": "c02050bebb60dbb20cb433cd4d8ce668ecc11ba7", - "type": "github" - }, - "original": { - "owner": "tinted-theming", - "repo": "base16-tmux", - "type": "github" - } - }, "base16-vim": { "flake": false, "locked": { @@ -223,17 +175,17 @@ "inputs": { "base16": "base16", "base16-fish": "base16-fish", - "base16-foot": "base16-foot", "base16-helix": "base16-helix", - "base16-kitty": "base16-kitty", - "base16-tmux": "base16-tmux", "base16-vim": "base16-vim", "flake-compat": "flake-compat", "flake-utils": "flake-utils", "gnome-shell": "gnome-shell", "home-manager": "home-manager", "nixpkgs": "nixpkgs", - "systems": "systems" + "systems": "systems", + "tinted-foot": "tinted-foot", + "tinted-kitty": "tinted-kitty", + "tinted-tmux": "tinted-tmux" } }, "systems": { @@ -250,6 +202,55 @@ "repo": "default", "type": "github" } + }, + "tinted-foot": { + "flake": false, + "locked": { + "lastModified": 1696725948, + "narHash": "sha256-65bz2bUL/yzZ1c8/GQASnoiGwaF8DczlxJtzik1c0AU=", + "owner": "tinted-theming", + "repo": "tinted-foot", + "rev": "eedbcfa30de0a4baa03e99f5e3ceb5535c2755ce", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "tinted-foot", + "type": "github" + } + }, + "tinted-kitty": { + "flake": false, + "locked": { + "lastModified": 1716423189, + "narHash": "sha256-2xF3sH7UIwegn+2gKzMpFi3pk5DlIlM18+vj17Uf82U=", + "owner": "tinted-theming", + "repo": "tinted-kitty", + "rev": "eb39e141db14baef052893285df9f266df041ff8", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "tinted-kitty", + "rev": "eb39e141db14baef052893285df9f266df041ff8", + "type": "github" + } + }, + "tinted-tmux": { + "flake": false, + "locked": { + "lastModified": 1696725902, + "narHash": "sha256-wDPg5elZPcQpu7Df0lI5O8Jv4A3T6jUQIVg63KDU+3Q=", + "owner": "tinted-theming", + "repo": "tinted-tmux", + "rev": "c02050bebb60dbb20cb433cd4d8ce668ecc11ba7", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "tinted-tmux", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index d79c0071d..66f9f6dc1 100644 --- a/flake.nix +++ b/flake.nix @@ -5,26 +5,11 @@ url = "github:tomyun/base16-fish"; }; - base16-foot = { - flake = false; - url = "github:tinted-theming/base16-foot"; - }; - base16-helix = { flake = false; url = "github:tinted-theming/base16-helix"; }; - base16-tmux = { - flake = false; - url = "github:tinted-theming/base16-tmux"; - }; - - base16-kitty = { - flake = false; - url = "github:kdrag0n/base16-kitty"; - }; - base16-vim = { flake = false; url = "github:tinted-theming/base16-vim"; @@ -61,6 +46,29 @@ # Interface flake systems. systems.url = "github:nix-systems/default"; + + tinted-foot = { + flake = false; + url = "github:tinted-theming/tinted-foot"; + }; + + tinted-tmux = { + flake = false; + url = "github:tinted-theming/tinted-tmux"; + }; + + tinted-kitty = { + flake = false; + + # Lock the tinted-kitty input to prevent upstream breaking changes. + # + # Considering that Stylix eventually re-implements this input's + # functionality [1], it might be easiest to lock this input to avoid + # wasted maintenance effort. + # + # [1]: https://github.com/danth/stylix/issues/534 + url = "github:tinted-theming/tinted-kitty/eb39e141db14baef052893285df9f266df041ff8"; + }; }; outputs = diff --git a/modules/bat/base16-stylix.mustache b/modules/bat/base16-stylix.mustache index cdcd941f3..13591549d 100644 --- a/modules/bat/base16-stylix.mustache +++ b/modules/bat/base16-stylix.mustache @@ -134,7 +134,7 @@ name Classes scope - support.class, entity.name.class, entity.name.type.class + support.class, entity.name.class, entity.name.type.class, entity.name settings foreground @@ -299,7 +299,7 @@ name Headings scope - markup.heading punctuation.definition.heading, entity.name.section + markup.heading, punctuation.definition.heading, entity.name.section settings fontStyle diff --git a/modules/foot/hm.nix b/modules/foot/hm.nix index d9e191dee..8fa04af43 100644 --- a/modules/foot/hm.nix +++ b/modules/foot/hm.nix @@ -4,7 +4,7 @@ let cfg = config.stylix.targets.foot; theme = config.lib.stylix.colors { - templateRepo = config.lib.stylix.templates.base16-foot; + templateRepo = config.lib.stylix.templates.tinted-foot; }; in { diff --git a/modules/forge/hm.nix b/modules/forge/hm.nix new file mode 100644 index 000000000..3c5cab506 --- /dev/null +++ b/modules/forge/hm.nix @@ -0,0 +1,13 @@ +{ config, lib, ... }: + +{ + options.stylix.targets.forge.enable = + config.lib.stylix.mkEnableTarget "Forge" true; + + config = lib.mkIf (config.stylix.enable && config.stylix.targets.forge.enable) { + xdg.configFile."forge/stylesheet/forge/stylesheet.css".source = config.lib.stylix.colors { + template = ./stylesheet.css.mustache; + extension = ".css"; + }; + }; +} diff --git a/modules/forge/stylesheet.css.mustache b/modules/forge/stylesheet.css.mustache new file mode 100644 index 000000000..25a9608d9 --- /dev/null +++ b/modules/forge/stylesheet.css.mustache @@ -0,0 +1,140 @@ +.tiled { + color: #{{base0D-hex}}; + opacity: 1; + border-width: 3px; +} + +.split { + color: #{{base0D-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: #{{base0D-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; +} diff --git a/modules/fuzzel/hm.nix b/modules/fuzzel/hm.nix index 62ce2d6b7..6b4547cc1 100644 --- a/modules/fuzzel/hm.nix +++ b/modules/fuzzel/hm.nix @@ -14,16 +14,19 @@ in { colors = { background = "${base00-hex}${opacity}"; text = "${base05-hex}ff"; + placeholder = "${base03-hex}ff"; + prompt = "${base05-hex}ff"; + input = "${base05-hex}ff"; match = "${base0A-hex}ff"; selection = "${base03-hex}ff"; selection-text = "${base05-hex}ff"; selection-match = "${base0A-hex}ff"; + counter = "${base06-hex}ff"; border = "${base0D-hex}ff"; }; main = { font = "${config.stylix.fonts.sansSerif.name}:size=${toString config.stylix.fonts.sizes.popups}"; - dpi-aware = "no"; }; }; } diff --git a/modules/i3status-rust/hm.nix b/modules/i3status-rust/hm.nix new file mode 100644 index 000000000..47fbd727d --- /dev/null +++ b/modules/i3status-rust/hm.nix @@ -0,0 +1,22 @@ +{ config, lib, ... }: + +let + colors = config.lib.stylix.colors.withHashtag; +in +{ + # Merge this with your bar's theme's overrides with //config.lib.stylix.i3status-rust.bar + config.lib.stylix.i3status-rust.bar = with colors; { + idle_bg = base00; + idle_fg = base05; + info_bg = base09; + info_fg = base00; + good_bg = base01; + good_fg = base05; + warning_bg = base0A; + warning_fg = base00; + critical_bg = base08; + critical_fg = base00; + separator_bg = base00; + separator_fg = base05; + }; +} diff --git a/modules/kitty/hm.nix b/modules/kitty/hm.nix index 5c82e8d38..afd517682 100644 --- a/modules/kitty/hm.nix +++ b/modules/kitty/hm.nix @@ -3,7 +3,7 @@ let cfg = config.stylix.targets.kitty; theme = config.lib.stylix.colors { - templateRepo = config.lib.stylix.templates.base16-kitty; + templateRepo = config.lib.stylix.templates.tinted-kitty; target = if cfg.variant256Colors then "default-256" else "default"; }; in { diff --git a/modules/nixvim/nixvim.nix b/modules/nixvim/nixvim.nix index dbc1da661..2c7c8a0ff 100644 --- a/modules/nixvim/nixvim.nix +++ b/modules/nixvim/nixvim.nix @@ -14,15 +14,28 @@ }; imports = [ - # Added: 2024-08-06 - (lib.mkRenamedOptionModule - [ "stylix" "targets" "nixvim" "transparent_bg" "main" ] - [ "stylix" "targets" "nixvim" "transparentBackground" "main" ]) + ( + lib.mkRenamedOptionModuleWith { + from = [ "stylix" "targets" "nixvim" "transparent_bg" "main" ]; + sinceRelease = 2411; + to = [ "stylix" "targets" "nixvim" "transparentBackground" "main" ]; + } + ) - # Added: 2024-08-06 - (lib.mkRenamedOptionModule - [ "stylix" "targets" "nixvim" "transparent_bg" "sign_column" ] - [ "stylix" "targets" "nixvim" "transparentBackground" "signColumn" ]) + ( + lib.mkRenamedOptionModuleWith { + from = [ "stylix" "targets" "nixvim" "transparent_bg" "sign_column" ]; + sinceRelease = 2411; + + to = [ + "stylix" + "targets" + "nixvim" + "transparentBackground" + "signColumn" + ]; + } + ) ]; config = lib.mkIf (config.stylix.enable && config.stylix.targets.nixvim.enable && (config.programs ? nixvim)) ( diff --git a/modules/regreet/nixos.nix b/modules/regreet/nixos.nix new file mode 100644 index 000000000..a9c76da35 --- /dev/null +++ b/modules/regreet/nixos.nix @@ -0,0 +1,33 @@ +{ + pkgs, + config, + lib, + ... +}: + +{ + options.stylix.targets.regreet.enable = config.lib.stylix.mkEnableTarget "ReGreet" true; + + config = + lib.mkIf + (config.stylix.enable && config.stylix.targets.regreet.enable && pkgs.stdenv.hostPlatform.isLinux) + { + programs.regreet = { + settings.background.path = config.stylix.image; + font = { + inherit (config.stylix.fonts.sansSerif) name package; + }; + cursorTheme = { + inherit (config.stylix.cursor) name package; + }; + theme = { + package = pkgs.adw-gtk3; + name = "adw-gtk3"; + }; + extraCss = config.lib.stylix.colors { + template = ./../gtk/gtk.mustache; + extension = "css"; + }; + }; + }; +} diff --git a/modules/spicetify/hm.nix b/modules/spicetify/hm.nix new file mode 100644 index 000000000..0b3c9d456 --- /dev/null +++ b/modules/spicetify/hm.nix @@ -0,0 +1 @@ +import ./spicetify.nix diff --git a/modules/spicetify/nixos.nix b/modules/spicetify/nixos.nix new file mode 100644 index 000000000..0b3c9d456 --- /dev/null +++ b/modules/spicetify/nixos.nix @@ -0,0 +1 @@ +import ./spicetify.nix diff --git a/modules/spicetify/spicetify.nix b/modules/spicetify/spicetify.nix new file mode 100644 index 000000000..2b73b4caf --- /dev/null +++ b/modules/spicetify/spicetify.nix @@ -0,0 +1,45 @@ +{ config, options, lib, pkgs, ... }: + +{ + options.stylix.targets.spicetify.enable = + config.lib.stylix.mkEnableTarget "Spicetify" true; + + config = lib.mkIf (config.stylix.enable && config.stylix.targets.spicetify.enable && (config.programs?spicetify)) ( + lib.optionalAttrs (builtins.hasAttr "spicetify" options.programs) { + programs.spicetify = { + theme = { + name = "stylix"; + src = pkgs.writeTextFile { + name = "color.ini"; + destination = "/color.ini"; + text = with config.lib.stylix.colors; '' + [base] + text = ${base05} + subtext = ${base05} + main = ${base00} + main-elevated = ${base02} + highlight = ${base02} + highlight-elevated = ${base03} + sidebar = ${base01} + player = ${base05} + card = ${base04} + shadow = ${base00} + selected-row = ${base05} + button = ${base05} + button-active = ${base05} + button-disabled = ${base04} + tab-active = ${base02} + notification = ${base02} + notification-error = ${base08} + equalizer = ${base0B} + misc = ${base02} + ''; + }; + # Sidebar configuration is incompatible with the default navigation bar + sidebarConfig = false; + }; + colorScheme = "base"; + }; + } + ); +} diff --git a/modules/tmux/hm.nix b/modules/tmux/hm.nix index 16d839c87..1eca043ab 100644 --- a/modules/tmux/hm.nix +++ b/modules/tmux/hm.nix @@ -2,7 +2,7 @@ let theme = config.lib.stylix.colors { - templateRepo = config.lib.stylix.templates.base16-tmux; + templateRepo = config.lib.stylix.templates.tinted-tmux; }; in { diff --git a/modules/vesktop/hm.nix b/modules/vesktop/hm.nix index 81241a734..6ffdb68f8 100644 --- a/modules/vesktop/hm.nix +++ b/modules/vesktop/hm.nix @@ -9,8 +9,6 @@ in options.stylix.targets.vesktop.enable = config.lib.stylix.mkEnableTarget "Vesktop" true; config = lib.mkIf (config.stylix.enable && config.stylix.targets.vesktop.enable) { - home.file."${config.xdg.configHome}/vesktop/themes/stylix.theme.css" = { - source = themeFile; - }; + xdg.configFile."vesktop/themes/stylix.theme.css".source = themeFile; }; } diff --git a/modules/wezterm/hm.nix b/modules/wezterm/hm.nix index 230613e88..ab0deea5a 100644 --- a/modules/wezterm/hm.nix +++ b/modules/wezterm/hm.nix @@ -58,9 +58,6 @@ in { local stylix_base_config = wezterm.config_builder() local stylix_user_config = stylix_wrapped_config() stylix_base_config = { - -- Set due to the default fancy tabs not respecting colorschemes - -- See https://github.com/wez/wezterm/issues/2615 - use_fancy_tab_bar = false, color_scheme = "stylix", font = wezterm.font_with_fallback { "${monospace.name}", @@ -86,6 +83,32 @@ in { inactive_titlebar_fg = "${base05}", inactive_titlebar_border_bottom = "${base03}", }, + colors = { + tab_bar = { + background = "${base01}", + inactive_tab_edge = "${base01}", + active_tab = { + bg_color = "${base00}", + fg_color = "${base05}", + }, + inactive_tab = { + bg_color = "${base03}", + fg_color = "${base05}", + }, + inactive_tab_hover = { + bg_color = "${base05}", + fg_color = "${base00}", + }, + new_tab = { + bg_color = "${base03}", + fg_color = "${base05}", + }, + new_tab_hover = { + bg_color = "${base05}", + fg_color = "${base00}", + }, + }, + }, command_palette_bg_color = "${base01}", command_palette_fg_color = "${base05}", command_palette_font_size = ${builtins.toString sizes.popups}, diff --git a/modules/wofi/hm.nix b/modules/wofi/hm.nix index f8268fc15..a614935fe 100644 --- a/modules/wofi/hm.nix +++ b/modules/wofi/hm.nix @@ -13,7 +13,7 @@ in { programs.wofi.style = with colors; '' window { font-family: "${monospace.name}"; - font-size: ${toString sizes.popups}; + font-size: ${toString sizes.popups}pt; background-color: ${base00}; color: ${base05}; diff --git a/stylix/palette.nix b/stylix/palette.nix index a6ae3da13..7fe9600a5 100644 --- a/stylix/palette.nix +++ b/stylix/palette.nix @@ -21,57 +21,6 @@ let generatedScheme = lib.importJSON paletteJSON; in { - # TODO link to doc on how to do instead - imports = [ - # Added: 2023-02-02 - (lib.mkRemovedOptionModule [ "stylix" "palette" "base00" ] "Using stylix.palette to override scheme is not supported anymore") - - # Added: 2023-02-02 - (lib.mkRemovedOptionModule [ "stylix" "palette" "base01" ] "Using stylix.palette to override scheme is not supported anymore") - - # Added: 2023-02-02 - (lib.mkRemovedOptionModule [ "stylix" "palette" "base02" ] "Using stylix.palette to override scheme is not supported anymore") - - # Added: 2023-02-02 - (lib.mkRemovedOptionModule [ "stylix" "palette" "base03" ] "Using stylix.palette to override scheme is not supported anymore") - - # Added: 2023-02-02 - (lib.mkRemovedOptionModule [ "stylix" "palette" "base04" ] "Using stylix.palette to override scheme is not supported anymore") - - # Added: 2023-02-02 - (lib.mkRemovedOptionModule [ "stylix" "palette" "base05" ] "Using stylix.palette to override scheme is not supported anymore") - - # Added: 2023-02-02 - (lib.mkRemovedOptionModule [ "stylix" "palette" "base06" ] "Using stylix.palette to override scheme is not supported anymore") - - # Added: 2023-02-02 - (lib.mkRemovedOptionModule [ "stylix" "palette" "base07" ] "Using stylix.palette to override scheme is not supported anymore") - - # Added: 2023-02-02 - (lib.mkRemovedOptionModule [ "stylix" "palette" "base08" ] "Using stylix.palette to override scheme is not supported anymore") - - # Added: 2023-02-02 - (lib.mkRemovedOptionModule [ "stylix" "palette" "base09" ] "Using stylix.palette to override scheme is not supported anymore") - - # Added: 2023-02-02 - (lib.mkRemovedOptionModule [ "stylix" "palette" "base0A" ] "Using stylix.palette to override scheme is not supported anymore") - - # Added: 2023-02-02 - (lib.mkRemovedOptionModule [ "stylix" "palette" "base0B" ] "Using stylix.palette to override scheme is not supported anymore") - - # Added: 2023-02-02 - (lib.mkRemovedOptionModule [ "stylix" "palette" "base0C" ] "Using stylix.palette to override scheme is not supported anymore") - - # Added: 2023-02-02 - (lib.mkRemovedOptionModule [ "stylix" "palette" "base0D" ] "Using stylix.palette to override scheme is not supported anymore") - - # Added: 2023-02-02 - (lib.mkRemovedOptionModule [ "stylix" "palette" "base0E" ] "Using stylix.palette to override scheme is not supported anymore") - - # Added: 2023-02-02 - (lib.mkRemovedOptionModule [ "stylix" "palette" "base0F" ] "Using stylix.palette to override scheme is not supported anymore") - ]; - options.stylix = { polarity = lib.mkOption { type = lib.types.enum [ "either" "light" "dark" ]; diff --git a/stylix/templates.nix b/stylix/templates.nix index 8b8b9b159..a3457d0de 100644 --- a/stylix/templates.nix +++ b/stylix/templates.nix @@ -3,12 +3,12 @@ inputs: config.lib.stylix.templates = { inherit (inputs) base16-fish - base16-foot base16-helix - base16-kitty - base16-tmux base16-vim gnome-shell + tinted-foot + tinted-kitty + tinted-tmux ; }; }