From f4774a6cae1ec90070b03985eb3859819da8b46a Mon Sep 17 00:00:00 2001 From: Chris Kruining Date: Tue, 20 Aug 2024 20:19:52 +0200 Subject: [PATCH] finish switch to stylix --- modules/desktop/browsers/firefox.nix | 2 +- modules/desktop/terminal/alacritty.nix | 101 +++-------- modules/shell/toolset/btop.nix | 88 +++++----- modules/shell/toolset/fzf.nix | 19 --- modules/shell/toolset/starship.nix | 28 ++- modules/shell/toolset/tmux.nix | 25 +-- modules/shell/zsh.nix | 97 ++++++----- modules/themes/default.nix | 225 +------------------------ modules/themes/everforest/default.nix | 187 ++++++++++---------- modules/themes/stylix.nix | 5 - 10 files changed, 229 insertions(+), 548 deletions(-) delete mode 100644 modules/themes/stylix.nix diff --git a/modules/desktop/browsers/firefox.nix b/modules/desktop/browsers/firefox.nix index fc20622..0b63a43 100644 --- a/modules/desktop/browsers/firefox.nix +++ b/modules/desktop/browsers/firefox.nix @@ -209,7 +209,7 @@ in { ''; }; - user-chome = mkIf (cfg.userChrome != "") { + user-chrome = mkIf (cfg.userChrome != "") { target = "${cfgPath}/${cfg.profileName}.default/chrome/userChrome.css"; text = cfg.userChrome; }; diff --git a/modules/desktop/terminal/alacritty.nix b/modules/desktop/terminal/alacritty.nix index c734261..a61f2e7 100644 --- a/modules/desktop/terminal/alacritty.nix +++ b/modules/desktop/terminal/alacritty.nix @@ -59,89 +59,42 @@ in { target = "alacritty/config/${active}.toml"; source = let inherit (config.modules.themes.font) mono sans; - inherit (config.modules.themes.colors.main) bright normal types; - tomlFormat = pkgs.formats.toml {}; - in - tomlFormat.generate "alacritty-theme" { - font = { - builtin_box_drawing = true; - size = mono.size; + in tomlFormat.generate "alacritty-theme" { + font = { + builtin_box_drawing = true; + size = mono.size; - normal = { - family = "${mono.family}"; - style = "${sans.weight}"; - }; - - italic = { - family = "${mono.family}"; - style = "${sans.weight} Italic"; - }; - - bold = { - family = "${mono.family}"; - style = "${mono.weight}"; - }; - - bold_italic = { - family = "${mono.family}"; - style = "${mono.weight} Italic"; - }; - - offset = { - x = 0; - y = 0; - }; - glyph_offset = { - x = 0; - y = 0; - }; + normal = { + family = "${mono.family}"; + style = "${sans.weight}"; }; - colors = { - primary = { - foreground = "${types.fg}"; - background = "${types.bg}"; - }; + italic = { + family = "${mono.family}"; + style = "${sans.weight} Italic"; + }; - cursor = { - text = "${types.bg}"; - cursor = "${normal.yellow}"; - }; + bold = { + family = "${mono.family}"; + style = "${mono.weight}"; + }; - vi_mode_cursor = { - text = "${types.bg}"; - cursor = "${normal.blue}"; - }; + bold_italic = { + family = "${mono.family}"; + style = "${mono.weight} Italic"; + }; - selection = { - text = "${types.bg}"; - background = "${types.highlight}"; - }; - - normal = { - black = "${normal.black}"; - red = "${normal.red}"; - green = "${normal.green}"; - yellow = "${normal.yellow}"; - blue = "${normal.blue}"; - magenta = "${normal.magenta}"; - cyan = "${normal.cyan}"; - white = "${normal.white}"; - }; - - bright = { - black = "${bright.black}"; - red = "${bright.red}"; - green = "${bright.green}"; - yellow = "${bright.yellow}"; - blue = "${bright.blue}"; - magenta = "${bright.magenta}"; - cyan = "${bright.cyan}"; - white = "${bright.white}"; - }; + offset = { + x = 0; + y = 0; + }; + glyph_offset = { + x = 0; + y = 0; }; }; + }; }; }; }; diff --git a/modules/shell/toolset/btop.nix b/modules/shell/toolset/btop.nix index e79baf3..7ea44ae 100644 --- a/modules/shell/toolset/btop.nix +++ b/modules/shell/toolset/btop.nix @@ -95,51 +95,49 @@ in in mkIf (active != null) { target = "btop/themes/${active}.theme"; - text = let - inherit (config.modules.themes.colors.main) bright types; - in '' - theme[main_bg]="${types.bg}" - theme[main_fg]="${types.fg}" - theme[title]="${types.fg}" - theme[hi_fg]="${types.highlight}" - theme[selected_bg]="${types.border}" - theme[selected_fg]="${types.bg}" - theme[inactive_fg]="${bright.black}" - theme[graph_text]="${bright.yellow}" - theme[meter_bg]="${bright.black}" - theme[proc_misc]="${bright.yellow}" - theme[cpu_box]="${bright.cyan}" - theme[mem_box]="${bright.green}" - theme[net_box]="${bright.magenta}" - theme[proc_box]="${bright.yellow}" - theme[div_line]="${bright.black}" - theme[temp_start]="${bright.yellow}" - theme[temp_mid]="${types.panelbg}" - theme[temp_end]="${bright.red}" - theme[cpu_start]="${bright.cyan}" - theme[cpu_mid]="${types.border}" - theme[cpu_end]="${bright.green}" - theme[free_start]="${bright.green}" - theme[free_mid]="${bright.green}" - theme[free_end]="${bright.green}" - theme[cached_start]="${bright.yellow}" - theme[cached_mid]="${bright.yellow}" - theme[cached_end]="${bright.magenta}" - theme[available_start]="${bright.yellow}" - theme[available_mid]="${bright.yellow}" - theme[available_end]="${bright.yellow}" - theme[used_start]="${types.panelbg}" - theme[used_mid]="${types.panelbg}" - theme[used_end]="${bright.red}" - theme[download_start]="${bright.blue}" - theme[download_mid]="${bright.blue}" - theme[download_end]="${bright.magenta}" - theme[upload_start]="${bright.blue}" - theme[upload_mid]="${bright.blue}" - theme[upload_end]="${bright.magenta}" - theme[process_start]="${bright.cyan}" - theme[process_mid]="${types.border}" - theme[process_end]="${bright.green}" + text = '' + theme[main_bg]="bg" + theme[main_fg]="fg" + theme[title]="fg" + theme[hi_fg]="highlight" + theme[selected_bg]="border" + theme[selected_fg]="bg" + theme[inactive_fg]="brightBlack" + theme[graph_text]="brightYellow" + theme[meter_bg]="brightblack" + theme[proc_misc]="brightYellow" + theme[cpu_box]="brightCyan" + theme[mem_box]="brightGreen" + theme[net_box]="brightMagenta" + theme[proc_box]="brightYellow" + theme[div_line]="brightblack" + theme[temp_start]="brightYellow" + theme[temp_mid]="panelbg" + theme[temp_end]="brightRed" + theme[cpu_start]="brightCyan" + theme[cpu_mid]="border" + theme[cpu_end]="brightGreen" + theme[free_start]="brightGreen" + theme[free_mid]="brightGreen" + theme[free_end]="brightGreen" + theme[cached_start]="brightYellow" + theme[cached_mid]="brightYellow" + theme[cached_end]="brightMagenta" + theme[available_start]="brightYellow" + theme[available_mid]="brightYellow" + theme[available_end]="brightYellow" + theme[used_start]="panelbg" + theme[used_mid]="panelbg" + theme[used_end]="brightRed" + theme[download_start]="brightBlue" + theme[download_mid]="brightBlue" + theme[download_end]="brightMagenta" + theme[upload_start]="brightBlue" + theme[upload_mid]="brightBlue" + theme[upload_end]="brightMagenta" + theme[process_start]="brightCyan" + theme[process_mid]="border" + theme[process_end]="brightGreen" ''; }; }; diff --git a/modules/shell/toolset/fzf.nix b/modules/shell/toolset/fzf.nix index 060c84e..65ba711 100644 --- a/modules/shell/toolset/fzf.nix +++ b/modules/shell/toolset/fzf.nix @@ -29,25 +29,6 @@ in fileWidgetCommand = "fd --type f"; fileWidgetOptions = ["--preview 'head {}'"]; historyWidgetOptions = ["--sort" "--exact"]; - - colors = let - inherit (config.modules.themes) active; - inherit (config.modules.themes.colors.main) normal types; - in - mkIf (active != null) { - bg = "${types.bg}"; - "bg+" = "${types.bg}"; - fg = "${types.border}"; - "fg+" = "${types.border}"; - hl = "${normal.red}"; - "hl+" = "${normal.red}"; - header = "${normal.red}"; - marker = "${normal.magenta}"; - info = "${normal.magenta}"; - prompt = "${types.border}"; - spinner = "${types.panelbg}"; - pointer = "${types.border}"; - }; }; }; } diff --git a/modules/shell/toolset/starship.nix b/modules/shell/toolset/starship.nix index 33e7187..5f529f9 100644 --- a/modules/shell/toolset/starship.nix +++ b/modules/shell/toolset/starship.nix @@ -10,17 +10,15 @@ in config = mkIf config.modules.shell.toolset.starship.enable { hm.programs.starship = { enable = true; - settings = let - inherit (config.modules.themes.colors.main) normal bright types; - in { + settings = { scan_timeout = 10; add_newline = true; line_break.disabled = true; format = "$username$hostname$nix_shell$git_branch$git_commit$git_state$git_status$directory$jobs$cmd_duration$character"; username = { - style_user = "${normal.blue} bold"; - style_root = "${normal.red} bold"; + style_user = "blue bold"; + style_root = "red bold"; format = "[$user]($style) "; disabled = false; show_always = true; @@ -29,7 +27,7 @@ in hostname = { ssh_only = false; ssh_symbol = "🌐 "; - format = "on [$hostname](bold ${normal.red}) "; + format = "on [$hostname](bold red) "; trim_at = ".local"; disabled = false; }; @@ -37,28 +35,28 @@ in nix_shell = { symbol = " "; format = "[$symbol$name]($style) "; - style = "${normal.magenta} bold"; + style = "magenta bold"; }; git_branch = { only_attached = true; format = "[$symbol$branch]($style) "; symbol = "שׂ"; - style = "${bright.yellow} bold"; + style = "brightYellow bold"; }; git_commit = { only_detached = true; format = "[ﰖ$hash]($style) "; - style = "${bright.yellow} bold"; + style = "brightYellow bold"; }; git_state = { - style = "${bright.magenta} bold"; + style = "brightMagenta bold"; }; git_status = { - style = "${bright.green} bold"; + style = "brightGreen bold"; }; directory = { @@ -68,16 +66,16 @@ in cmd_duration = { format = "[$duration]($style) "; - style = "${bright.blue}"; + style = "brightBlue"; }; jobs = { - style = "${bright.green} bold"; + style = "brightGreen bold"; }; character = { - success_symbol = "[\\$](${bright.green} bold)"; - error_symbol = "[\\$](${bright.red} bold)"; + success_symbol = "[\\$](brightGreen} bold)"; + error_symbol = "[\\$](brightRed bold)"; }; }; }; diff --git a/modules/shell/toolset/tmux.nix b/modules/shell/toolset/tmux.nix index ce6ef5d..7c1b3e8 100644 --- a/modules/shell/toolset/tmux.nix +++ b/modules/shell/toolset/tmux.nix @@ -42,9 +42,7 @@ in } ]; - extraConfig = let - inherit (config.modules.themes.colors.main) normal types; - in '' + extraConfig = '' # -------===[ Color Correction ]===------- # set-option -ga terminal-overrides ",*256col*:Tc" set-option -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q' @@ -78,27 +76,6 @@ in set-option -g status-left-length "40" set-option -g status-right-length "80" - # Messages: - set-option -g message-style fg="${types.bg}",bg="${types.highlight}",align="centre" - set-option -g message-command-style fg="${types.bg}",bg="${types.highlight}",align="centre" - - # Panes: - set-option -g pane-border-style fg="${types.fg}" - set-option -g pane-active-border-style fg="${types.border}" - - # Windows: - set-option -g window-status-format "#[fg=${types.fg}] #W/#{window_panes} " - set-option -g window-status-current-format "#{?client_prefix,#[fg=${types.bg}]#[bg=${normal.red}] #I:#W #[fg=${normal.red}]#[bg=default],#[fg=${types.bg}]#[bg=${normal.magenta}] #I:#W #[fg=${normal.magenta}]#[bg=default]}" - - # -------===[ Statusline ]===------- # - set-option -g status-left "#[fg=${types.bg}]#[bg=${normal.blue}]#[bold]  #[fg=${normal.blue}]#[bg=default]" - set-option -g status-bg default - set-option -g status-right "#[italics]∡ #H | %b %d, %H:%M #[fg=${types.bg},bg=${types.highlight},bold,italics] base-#S " - - # -------===[ Clock & Selection ]===------- # - set-window-option -g clock-mode-colour "${types.border}" - set-window-option -g mode-style "fg=${types.bg} bg=${types.highlight} bold" - # -------===[ Keybindings ]===------- # bind-key c clock-mode diff --git a/modules/shell/zsh.nix b/modules/shell/zsh.nix index e542f8c..2c0b781 100644 --- a/modules/shell/zsh.nix +++ b/modules/shell/zsh.nix @@ -87,75 +87,74 @@ in syntaxHighlighting = let inherit (config.modules.themes) active; - inherit (config.modules.themes.colors.main) normal bright types; in mkIf (active != null) { enable = true; highlighters = ["main" "brackets" "pattern" "cursor" "regexp" "root" "line"]; patterns = { - "sudo " = "fg=${normal.red},bold"; - "rm -rf *" = "fg=${normal.red},bold"; + "sudo " = "fg=red,bold"; + "rm -rf *" = "fg=red,bold"; }; styles = { # -------===[ Comments ]===------- # - comment = "fg=${normal.black}"; + comment = "fg=black"; # -------===[ Functions/Methods ]===------- # - alias = "fg=${normal.magenta}"; - "suffix-alias" = "fg=${normal.magenta}"; - "global-alias" = "fg=${normal.magenta}"; - function = "fg=${normal.blue}"; - command = "fg=${normal.green}"; - precommand = "fg=${normal.green},italic"; - autodirectory = "fg=${normal.yellow},italic"; - "single-hyphen-option" = "fg=${normal.yellow}"; - "double-hyphen-option" = "fg=${normal.yellow}"; - "back-quoted-argument" = "fg=${normal.magenta}"; + alias = "fg=magenta"; + "suffix-alias" = "fg=magenta"; + "global-alias" = "fg=magenta"; + function = "fg=blue"; + command = "fg=green"; + precommand = "fg=green,italic"; + autodirectory = "fg=yellow,italic"; + "single-hyphen-option" = "fg=yellow"; + "double-hyphen-option" = "fg=yellow"; + "back-quoted-argument" = "fg=magenta"; # -------===[ Built-ins ]===------- # - builtin = "fg=${normal.blue}"; - "reserved-word" = "fg=${normal.green}"; - "hashed-command" = "fg=${normal.green}"; + builtin = "fg=blue"; + "reserved-word" = "fg=green"; + "hashed-command" = "fg=green"; # -------===[ Punctuation ]===------- # - commandseparator = "fg=${bright.red}"; - "command-substitution-delimiter" = "fg=${types.border}"; - "command-substitution-delimiter-unquoted" = "fg=${types.border}"; - "process-substitution-delimiter" = "fg=${types.border}"; - "back-quoted-argument-delimiter" = "fg=${bright.red}"; - "back-double-quoted-argument" = "fg=${bright.red}"; - "back-dollar-quoted-argument" = "fg=${bright.red}"; + commandseparator = "fg=brightRed"; + "command-substitution-delimiter" = "fg=border"; + "command-substitution-delimiter-unquoted" = "fg=border"; + "process-substitution-delimiter" = "fg=border"; + "back-quoted-argument-delimiter" = "fg=brightRed"; + "back-double-quoted-argument" = "fg=brightRed"; + "back-dollar-quoted-argument" = "fg=brightRed"; # -------===[ Strings ]===------- # - "command-substitution-quoted" = "fg=${bright.yellow}"; - "command-substitution-delimiter-quoted" = "fg=${bright.yellow}"; - "single-quoted-argument" = "fg=${bright.yellow}"; - "single-quoted-argument-unclosed" = "fg=${normal.red}"; - "double-quoted-argument" = "fg=${bright.yellow}"; - "double-quoted-argument-unclosed" = "fg=${normal.red}"; - "rc-quote" = "fg=${bright.yellow}"; + "command-substitution-quoted" = "fg=brightYellow"; + "command-substitution-delimiter-quoted" = "fg=brightYellow"; + "single-quoted-argument" = "fg=brightYellow"; + "single-quoted-argument-unclosed" = "fg=red"; + "double-quoted-argument" = "fg=brightYellow"; + "double-quoted-argument-unclosed" = "fg=red"; + "rc-quote" = "fg=brightYellow"; # -------===[ Variables ]===------- # - "dollar-quoted-argument" = "fg=${types.highlight}"; - "dollar-quoted-argument-unclosed" = "fg=${bright.red}"; - "dollar-double-quoted-argument" = "fg=${types.highlight}"; - assign = "fg=${types.highlight}"; - "named-fd" = "fg=${types.highlight}"; - "numeric-fd" = "fg=${types.highlight}"; + "dollar-quoted-argument" = "fg=highlight"; + "dollar-quoted-argument-unclosed" = "fg=brightRed"; + "dollar-double-quoted-argument" = "fg=highlight"; + assign = "fg=highlight"; + "named-fd" = "fg=highlight"; + "numeric-fd" = "fg=highlight"; # -------===[ Non-Exclusive ]===------- # - "unknown-token" = "fg=${normal.red}"; - path = "fg=${types.highlight},underline"; - path_pathseparator = "fg=${bright.red},underline"; - path_prefix = "fg=${types.highlight},underline"; - path_prefix_pathseparator = "fg=${bright.red},underline"; - globbing = "fg=${types.highlight}"; - "history-expansion" = "fg=${normal.magenta}"; - "back-quoted-argument-unclosed" = "fg=${normal.red}"; - redirection = "fg=${types.highlight}"; - arg0 = "fg=${types.highlight}"; - default = "fg=${types.highlight}"; - cursor = "fg=${types.highlight}"; + "unknown-token" = "fg=red"; + path = "fg=highlight,underline"; + path_pathseparator = "fg=brightRed,underline"; + path_prefix = "fg=highlight,underline"; + path_prefix_pathseparator = "fg=brightRed,underline"; + globbing = "fg=highlight"; + "history-expansion" = "fg=magenta"; + "back-quoted-argument-unclosed" = "fg=red"; + redirection = "fg=highlight"; + arg0 = "fg=highlight"; + default = "fg=highlight"; + cursor = "fg=highlight"; }; }; }; diff --git a/modules/themes/default.nix b/modules/themes/default.nix index 4595ef4..2ae6789 100644 --- a/modules/themes/default.nix +++ b/modules/themes/default.nix @@ -142,229 +142,6 @@ in { }; config = mkIf (cfg.active != null) (mkMerge [ - { - # Allow HM to control GTK Theme: - programs.dconf.enable = true; - - hm.gtk = let - inherit (cfg.font) sans; - inherit (cfg) gtk iconTheme; - in { - enable = true; - font = { - name = sans.family; - size = sans.size; - }; - theme = { - name = gtk.name; - package = gtk.package; - }; - iconTheme = { - name = iconTheme.name; - package = iconTheme.package; - }; - gtk3.bookmarks = map (dir: "file://${config.user.home}/" + dir) [ - "data/Github/.files" - ]; - gtk4.extraConfig = { - gtk-cursor-blink = false; - gtk-recent-files-limit = 20; - }; - }; - - home.pointerCursor = let - inherit (cfg.pointer) name package size; - in { - name = name; - package = package; - size = size; - gtk.enable = true; - }; - - fonts = let - inherit (cfg.fontConfig) packages emoji mono sans; - in { - packages = packages; - fontconfig.defaultFonts = { - monospace = mono; - sansSerif = sans; - emoji = emoji; - }; - }; - - hm.programs.vscode.extensions = let - inherit (cfg.vscode.extension) name publisher version hash; - in - pkgs.vscode-utils.extensionsFromVscodeMarketplace [ - { - name = "${name}"; - publisher = "${publisher}"; - version = "${version}"; - hash = "${hash}"; - } - ]; - } - - (mkIf (desktop.type == "wayland") (mkMerge [ - { - programs.regreet.settings.GTK = let - inherit (cfg) pointer font iconTheme gtk; - in { - cursor_theme_name = "${pointer.name}"; - font_name = "${font.mono.family}"; - icon_theme_name = "${iconTheme.name}"; - theme_name = "${gtk.name}"; - }; - } - - (mkIf (cfg.wallpaper != null) { - user.packages = attrValues {inherit (pkgs) swww;}; - - hm.systemd.user.services = { - swww = { - Unit = { - Description = "Wallpaper daemon for wayland"; - After = ["graphical-session.target"]; - PartOf = ["graphical-session.target"]; - }; - Install.WantedBy = ["graphical-session.target"]; - Service = { - Type = "simple"; - ExecStart = "${pkgs.swww}/bin/swww-daemon"; - ExecStop = "${getExe pkgs.swww} kill"; - Restart = "on-failure"; - }; - }; - swww-wallpaper = { - Unit = { - Description = "Default swww wallpaper"; - After = ["swww.service"]; - PartOf = ["swww.service"]; - }; - Service = { - Type = "oneshot"; - ExecStart = '' - if [ -e "$XDG_DATA_HOME/wallpaper" ]; then - ${getExe pkgs.swww} \ - img $XDG_DATA_HOME/wallpaper \ - --transition-type random \ - --transition-fps 60 - fi - ''; - Restart = "on-failure"; - }; - Install.WantedBy = ["swww.service"]; - }; - }; - - create.dataFile = - mkIf (cfg.wallpaper != null) {"wallpaper".source = cfg.wallpaper;}; - }) - ])) - - (mkIf (desktop.type == "x11") (mkMerge [ - { - hm.xresources = { - path = "${config.user.home}/.Xresources"; - properties = let - inherit (cfg.colors.main) bright normal types; - in { - "*.foreground" = "${types.fg}"; - "*.background" = "${types.bg}"; - - "*.color0" = "${normal.black}"; - "*.color8" = "${bright.black}"; - - "*.color1" = "${normal.red}"; - "*.color9" = "${bright.red}"; - - "*.color2" = "${normal.green}"; - "*.color10" = "${bright.green}"; - - "*.color3" = "${normal.yellow}"; - "*.color11" = "${bright.yellow}"; - - "*.color4" = "${normal.blue}"; - "*.color12" = "${bright.blue}"; - - "*.color5" = "${normal.magenta}"; - "*.color13" = "${bright.magenta}"; - - "*.color6" = "${normal.cyan}"; - "*.color14" = "${bright.cyan}"; - - "*.color7" = "${normal.white}"; - "*.color15" = "${bright.white}"; - }; - }; - - home.pointerCursor.x11 = { - enable = true; - defaultCursor = "left_ptr"; - }; - } - - # Apply theme options -> lightdm-mini-greeter - (mkIf (cfg.loginWallpaper != null) { - services.xserver.displayManager.lightdm = { - greeters.mini.extraConfig = let - inherit (cfg.colors.main) normal types; - in '' - background-image = "${cfg.loginWallpaper}" - background-image-size = "100% 100%" - - text-color = "${types.bg}" - password-background-color = "${normal.black}" - window-color = "${types.border}" - border-color = "${types.border}" - ''; - }; - }) - - # Auto-set wallpaper to prevent $HOME pollution! - (mkIf (cfg.wallpaper != null) (let - wCfg = config.services.xserver.desktopManager.wallpaper; - command = '' - if [ -e "$XDG_DATA_HOME/wallpaper" ]; then - ${getExe pkgs.feh} --bg-${wCfg.mode} \ - ${optionalString wCfg.combineScreens "--no-xinerama"} \ - --no-fehbg \ - $XDG_DATA_HOME/wallpaper - fi - ''; - in { - modules.themes.onReload.wallpaper = command; - services.xserver.displayManager.sessionCommands = command; - - create.dataFile = - mkIf (cfg.wallpaper != null) {"wallpaper".source = cfg.wallpaper;}; - })) - - (mkIf (cfg.loginWallpaper != null) { - programs.regreet.settings.background = { - path = cfg.loginWallpaper; - fit = "Fill"; - }; - }) - - (mkIf (cfg.onReload != {}) (let - reloadTheme = let - inherit (pkgs) stdenv writeScriptBin; - in (writeScriptBin "reloadTheme" '' - #!${stdenv.shell} - echo "Reloading current theme: ${cfg.active}" - ${concatStringsSep "\n" (mapAttrsToList (name: script: '' - echo "[${name}]" - ${script} - '') - cfg.onReload)} - ''); - in { - user.packages = [reloadTheme]; - system.userActivationScripts.reloadTheme = '' - [ -z "$NORELOAD" ] && ${reloadTheme}/bin/reloadTheme - ''; - })) - ])) + (mkIf (desktop.type == "wayland") (mkMerge [])) ]); } diff --git a/modules/themes/everforest/default.nix b/modules/themes/everforest/default.nix index 55e6712..415a561 100644 --- a/modules/themes/everforest/default.nix +++ b/modules/themes/everforest/default.nix @@ -10,98 +10,101 @@ in { config = mkIf (cfg.active == "everforest") { - modules.themes = { - wallpaper = mkDefault ./assets/wallpaper.jpg; + stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/everforest.yaml"; + stylix.image = ./assets/wallpaper.jpg; - gtk = { - name = "Everforest-Dark-BL"; - package = pkgs.my.everforest-gtk; - }; - - iconTheme = { - name = "everforest-dark"; - package = pkgs.fluent-icon-theme.override { - colorVariants = []; - }; - }; - - pointer = { - name = "Bibata-Modern-Classic"; - package = pkgs.bibata-cursors; - size = 24; - }; - - fontConfig = { - packages = attrValues { - inherit (pkgs) noto-fonts-emoji sarasa-gothic; - google-fonts = pkgs.google-fonts.override {fonts = ["Cardo"];}; - nerdfonts = - pkgs.nerdfonts.override {fonts = ["CascadiaCode" "VictorMono"];}; - }; - mono = ["VictorMono Nerd Font" "Sarasa Mono SC"]; - sans = ["Caskaydia Cove Nerd Font" "Sarasa Gothic SC"]; - emoji = ["Noto Color Emoji"]; - }; - - font = { - mono.family = "VictorMono Nerd Font"; - sans.family = "CaskaydiaCove Nerd Font"; - }; - - colors = { - main = { - normal = { - black = "#15161e"; - red = "#f7768e"; - green = "#9ece6a"; - yellow = "#e0af68"; - blue = "#7aa2f7"; - magenta = "#bb9af7"; - cyan = "#7dcfff"; - white = "#a9b1d6"; - }; - bright = { - black = "#414868"; - red = "#f7768e"; - green = "#9ece6a"; - yellow = "#e0af68"; - blue = "#7aa2f7"; - magenta = "#bb9af7"; - cyan = "#7dcfff"; - white = "#c0caf5"; - }; - types = { - fg = "#c0caf5"; - bg = "#1a1b26"; - panelbg = "#ff9e64"; - border = "#1abc9c"; - highlight = "#3d59a1"; - }; - }; - - rofi = { - bg = { - main = "hsla(235, 18%, 12%, 1)"; - alt = "hsla(235, 18%, 12%, 0)"; - bar = "hsla(229, 24%, 18%, 1)"; - }; - fg = "hsla(228, 72%, 85%, 1)"; - ribbon = { - outer = "hsla(188, 68%, 27%, 1)"; - inner = "hsla(202, 76%, 24%, 1)"; - }; - selected = "hsla(220, 88%, 72%, 1)"; - urgent = "hsl(349, 89%, 72%, 1)"; - transparent = "hsla(0, 0%, 0%, 0)"; - }; - }; - - editor = { - neovim = { - dark = "everforest"; - light = "everforest"; - }; - }; - }; +# modules.themes = { +# wallpaper = mkDefault ./assets/wallpaper.jpg; +# +# gtk = { +# name = "Everforest-Dark-BL"; +# package = pkgs.my.everforest-gtk; +# }; +# +# iconTheme = { +# name = "everforest-dark"; +# package = pkgs.fluent-icon-theme.override { +# colorVariants = []; +# }; +# }; +# +# pointer = { +# name = "Bibata-Modern-Classic"; +# package = pkgs.bibata-cursors; +# size = 24; +# }; +# +# fontConfig = { +# packages = attrValues { +# inherit (pkgs) noto-fonts-emoji sarasa-gothic; +# google-fonts = pkgs.google-fonts.override {fonts = ["Cardo"];}; +# nerdfonts = +# pkgs.nerdfonts.override {fonts = ["CascadiaCode" "VictorMono"];}; +# }; +# mono = ["VictorMono Nerd Font" "Sarasa Mono SC"]; +# sans = ["Caskaydia Cove Nerd Font" "Sarasa Gothic SC"]; +# emoji = ["Noto Color Emoji"]; +# }; +# +# font = { +# mono.family = "VictorMono Nerd Font"; +# sans.family = "CaskaydiaCove Nerd Font"; +# }; +# +# colors = { +# main = { +# normal = { +# black = "#15161e"; +# red = "#f7768e"; +# green = "#9ece6a"; +# yellow = "#e0af68"; +# blue = "#7aa2f7"; +# magenta = "#bb9af7"; +# cyan = "#7dcfff"; +# white = "#a9b1d6"; +# }; +# bright = { +# black = "#414868"; +# red = "#f7768e"; +# green = "#9ece6a"; +# yellow = "#e0af68"; +# blue = "#7aa2f7"; +# magenta = "#bb9af7"; +# cyan = "#7dcfff"; +# white = "#c0caf5"; +# }; +# types = { +# fg = "#c0caf5"; +# bg = "#1a1b26"; +# panelbg = "#ff9e64"; +# border = "#1abc9c"; +# highlight = "#3d59a1"; +# }; +# }; +# +# rofi = { +# bg = { +# main = "hsla(235, 18%, 12%, 1)"; +# alt = "hsla(235, 18%, 12%, 0)"; +# bar = "hsla(229, 24%, 18%, 1)"; +# }; +# fg = "hsla(228, 72%, 85%, 1)"; +# ribbon = { +# outer = "hsla(188, 68%, 27%, 1)"; +# inner = "hsla(202, 76%, 24%, 1)"; +# }; +# selected = "hsla(220, 88%, 72%, 1)"; +# urgent = "hsl(349, 89%, 72%, 1)"; +# transparent = "hsla(0, 0%, 0%, 0)"; +# }; +# }; +# +# editor = { +# neovim = { +# dark = "everforest"; +# light = "everforest"; +# }; +# }; +# }; }; } diff --git a/modules/themes/stylix.nix b/modules/themes/stylix.nix deleted file mode 100644 index 1b1c5bf..0000000 --- a/modules/themes/stylix.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ pkgs, ... }: -{ -# stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/everforest.yaml"; -# stylix.image = ./wallpaper.jpg; -}