finish switch to stylix

This commit is contained in:
Chris Kruining 2024-08-20 20:19:52 +02:00
parent 4dd4497139
commit f4774a6cae
10 changed files with 229 additions and 548 deletions

View file

@ -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"
'';
};
};

View file

@ -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}";
};
};
};
}

View file

@ -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)";
};
};
};

View file

@ -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

View file

@ -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";
};
};
};