finish switch to stylix
This commit is contained in:
parent
4dd4497139
commit
f4774a6cae
10 changed files with 229 additions and 548 deletions
|
@ -209,7 +209,7 @@ in {
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
user-chome = mkIf (cfg.userChrome != "") {
|
user-chrome = mkIf (cfg.userChrome != "") {
|
||||||
target = "${cfgPath}/${cfg.profileName}.default/chrome/userChrome.css";
|
target = "${cfgPath}/${cfg.profileName}.default/chrome/userChrome.css";
|
||||||
text = cfg.userChrome;
|
text = cfg.userChrome;
|
||||||
};
|
};
|
||||||
|
|
|
@ -59,11 +59,8 @@ in {
|
||||||
target = "alacritty/config/${active}.toml";
|
target = "alacritty/config/${active}.toml";
|
||||||
source = let
|
source = let
|
||||||
inherit (config.modules.themes.font) mono sans;
|
inherit (config.modules.themes.font) mono sans;
|
||||||
inherit (config.modules.themes.colors.main) bright normal types;
|
|
||||||
|
|
||||||
tomlFormat = pkgs.formats.toml {};
|
tomlFormat = pkgs.formats.toml {};
|
||||||
in
|
in tomlFormat.generate "alacritty-theme" {
|
||||||
tomlFormat.generate "alacritty-theme" {
|
|
||||||
font = {
|
font = {
|
||||||
builtin_box_drawing = true;
|
builtin_box_drawing = true;
|
||||||
size = mono.size;
|
size = mono.size;
|
||||||
|
@ -97,50 +94,6 @@ in {
|
||||||
y = 0;
|
y = 0;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
colors = {
|
|
||||||
primary = {
|
|
||||||
foreground = "${types.fg}";
|
|
||||||
background = "${types.bg}";
|
|
||||||
};
|
|
||||||
|
|
||||||
cursor = {
|
|
||||||
text = "${types.bg}";
|
|
||||||
cursor = "${normal.yellow}";
|
|
||||||
};
|
|
||||||
|
|
||||||
vi_mode_cursor = {
|
|
||||||
text = "${types.bg}";
|
|
||||||
cursor = "${normal.blue}";
|
|
||||||
};
|
|
||||||
|
|
||||||
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}";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -95,51 +95,49 @@ in
|
||||||
in
|
in
|
||||||
mkIf (active != null) {
|
mkIf (active != null) {
|
||||||
target = "btop/themes/${active}.theme";
|
target = "btop/themes/${active}.theme";
|
||||||
text = let
|
text = ''
|
||||||
inherit (config.modules.themes.colors.main) bright types;
|
theme[main_bg]="bg"
|
||||||
in ''
|
theme[main_fg]="fg"
|
||||||
theme[main_bg]="${types.bg}"
|
theme[title]="fg"
|
||||||
theme[main_fg]="${types.fg}"
|
theme[hi_fg]="highlight"
|
||||||
theme[title]="${types.fg}"
|
theme[selected_bg]="border"
|
||||||
theme[hi_fg]="${types.highlight}"
|
theme[selected_fg]="bg"
|
||||||
theme[selected_bg]="${types.border}"
|
theme[inactive_fg]="brightBlack"
|
||||||
theme[selected_fg]="${types.bg}"
|
theme[graph_text]="brightYellow"
|
||||||
theme[inactive_fg]="${bright.black}"
|
theme[meter_bg]="brightblack"
|
||||||
theme[graph_text]="${bright.yellow}"
|
theme[proc_misc]="brightYellow"
|
||||||
theme[meter_bg]="${bright.black}"
|
theme[cpu_box]="brightCyan"
|
||||||
theme[proc_misc]="${bright.yellow}"
|
theme[mem_box]="brightGreen"
|
||||||
theme[cpu_box]="${bright.cyan}"
|
theme[net_box]="brightMagenta"
|
||||||
theme[mem_box]="${bright.green}"
|
theme[proc_box]="brightYellow"
|
||||||
theme[net_box]="${bright.magenta}"
|
theme[div_line]="brightblack"
|
||||||
theme[proc_box]="${bright.yellow}"
|
theme[temp_start]="brightYellow"
|
||||||
theme[div_line]="${bright.black}"
|
theme[temp_mid]="panelbg"
|
||||||
theme[temp_start]="${bright.yellow}"
|
theme[temp_end]="brightRed"
|
||||||
theme[temp_mid]="${types.panelbg}"
|
theme[cpu_start]="brightCyan"
|
||||||
theme[temp_end]="${bright.red}"
|
theme[cpu_mid]="border"
|
||||||
theme[cpu_start]="${bright.cyan}"
|
theme[cpu_end]="brightGreen"
|
||||||
theme[cpu_mid]="${types.border}"
|
theme[free_start]="brightGreen"
|
||||||
theme[cpu_end]="${bright.green}"
|
theme[free_mid]="brightGreen"
|
||||||
theme[free_start]="${bright.green}"
|
theme[free_end]="brightGreen"
|
||||||
theme[free_mid]="${bright.green}"
|
theme[cached_start]="brightYellow"
|
||||||
theme[free_end]="${bright.green}"
|
theme[cached_mid]="brightYellow"
|
||||||
theme[cached_start]="${bright.yellow}"
|
theme[cached_end]="brightMagenta"
|
||||||
theme[cached_mid]="${bright.yellow}"
|
theme[available_start]="brightYellow"
|
||||||
theme[cached_end]="${bright.magenta}"
|
theme[available_mid]="brightYellow"
|
||||||
theme[available_start]="${bright.yellow}"
|
theme[available_end]="brightYellow"
|
||||||
theme[available_mid]="${bright.yellow}"
|
theme[used_start]="panelbg"
|
||||||
theme[available_end]="${bright.yellow}"
|
theme[used_mid]="panelbg"
|
||||||
theme[used_start]="${types.panelbg}"
|
theme[used_end]="brightRed"
|
||||||
theme[used_mid]="${types.panelbg}"
|
theme[download_start]="brightBlue"
|
||||||
theme[used_end]="${bright.red}"
|
theme[download_mid]="brightBlue"
|
||||||
theme[download_start]="${bright.blue}"
|
theme[download_end]="brightMagenta"
|
||||||
theme[download_mid]="${bright.blue}"
|
theme[upload_start]="brightBlue"
|
||||||
theme[download_end]="${bright.magenta}"
|
theme[upload_mid]="brightBlue"
|
||||||
theme[upload_start]="${bright.blue}"
|
theme[upload_end]="brightMagenta"
|
||||||
theme[upload_mid]="${bright.blue}"
|
theme[process_start]="brightCyan"
|
||||||
theme[upload_end]="${bright.magenta}"
|
theme[process_mid]="border"
|
||||||
theme[process_start]="${bright.cyan}"
|
theme[process_end]="brightGreen"
|
||||||
theme[process_mid]="${types.border}"
|
|
||||||
theme[process_end]="${bright.green}"
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -29,25 +29,6 @@ in
|
||||||
fileWidgetCommand = "fd --type f";
|
fileWidgetCommand = "fd --type f";
|
||||||
fileWidgetOptions = ["--preview 'head {}'"];
|
fileWidgetOptions = ["--preview 'head {}'"];
|
||||||
historyWidgetOptions = ["--sort" "--exact"];
|
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}";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,17 +10,15 @@ in
|
||||||
config = mkIf config.modules.shell.toolset.starship.enable {
|
config = mkIf config.modules.shell.toolset.starship.enable {
|
||||||
hm.programs.starship = {
|
hm.programs.starship = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = let
|
settings = {
|
||||||
inherit (config.modules.themes.colors.main) normal bright types;
|
|
||||||
in {
|
|
||||||
scan_timeout = 10;
|
scan_timeout = 10;
|
||||||
add_newline = true;
|
add_newline = true;
|
||||||
line_break.disabled = true;
|
line_break.disabled = true;
|
||||||
|
|
||||||
format = "$username$hostname$nix_shell$git_branch$git_commit$git_state$git_status$directory$jobs$cmd_duration$character";
|
format = "$username$hostname$nix_shell$git_branch$git_commit$git_state$git_status$directory$jobs$cmd_duration$character";
|
||||||
username = {
|
username = {
|
||||||
style_user = "${normal.blue} bold";
|
style_user = "blue bold";
|
||||||
style_root = "${normal.red} bold";
|
style_root = "red bold";
|
||||||
format = "[$user]($style) ";
|
format = "[$user]($style) ";
|
||||||
disabled = false;
|
disabled = false;
|
||||||
show_always = true;
|
show_always = true;
|
||||||
|
@ -29,7 +27,7 @@ in
|
||||||
hostname = {
|
hostname = {
|
||||||
ssh_only = false;
|
ssh_only = false;
|
||||||
ssh_symbol = "🌐 ";
|
ssh_symbol = "🌐 ";
|
||||||
format = "on [$hostname](bold ${normal.red}) ";
|
format = "on [$hostname](bold red) ";
|
||||||
trim_at = ".local";
|
trim_at = ".local";
|
||||||
disabled = false;
|
disabled = false;
|
||||||
};
|
};
|
||||||
|
@ -37,28 +35,28 @@ in
|
||||||
nix_shell = {
|
nix_shell = {
|
||||||
symbol = " ";
|
symbol = " ";
|
||||||
format = "[$symbol$name]($style) ";
|
format = "[$symbol$name]($style) ";
|
||||||
style = "${normal.magenta} bold";
|
style = "magenta bold";
|
||||||
};
|
};
|
||||||
|
|
||||||
git_branch = {
|
git_branch = {
|
||||||
only_attached = true;
|
only_attached = true;
|
||||||
format = "[$symbol$branch]($style) ";
|
format = "[$symbol$branch]($style) ";
|
||||||
symbol = "שׂ";
|
symbol = "שׂ";
|
||||||
style = "${bright.yellow} bold";
|
style = "brightYellow bold";
|
||||||
};
|
};
|
||||||
|
|
||||||
git_commit = {
|
git_commit = {
|
||||||
only_detached = true;
|
only_detached = true;
|
||||||
format = "[ﰖ$hash]($style) ";
|
format = "[ﰖ$hash]($style) ";
|
||||||
style = "${bright.yellow} bold";
|
style = "brightYellow bold";
|
||||||
};
|
};
|
||||||
|
|
||||||
git_state = {
|
git_state = {
|
||||||
style = "${bright.magenta} bold";
|
style = "brightMagenta bold";
|
||||||
};
|
};
|
||||||
|
|
||||||
git_status = {
|
git_status = {
|
||||||
style = "${bright.green} bold";
|
style = "brightGreen bold";
|
||||||
};
|
};
|
||||||
|
|
||||||
directory = {
|
directory = {
|
||||||
|
@ -68,16 +66,16 @@ in
|
||||||
|
|
||||||
cmd_duration = {
|
cmd_duration = {
|
||||||
format = "[$duration]($style) ";
|
format = "[$duration]($style) ";
|
||||||
style = "${bright.blue}";
|
style = "brightBlue";
|
||||||
};
|
};
|
||||||
|
|
||||||
jobs = {
|
jobs = {
|
||||||
style = "${bright.green} bold";
|
style = "brightGreen bold";
|
||||||
};
|
};
|
||||||
|
|
||||||
character = {
|
character = {
|
||||||
success_symbol = "[\\$](${bright.green} bold)";
|
success_symbol = "[\\$](brightGreen} bold)";
|
||||||
error_symbol = "[\\$](${bright.red} bold)";
|
error_symbol = "[\\$](brightRed bold)";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -42,9 +42,7 @@ in
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
extraConfig = let
|
extraConfig = ''
|
||||||
inherit (config.modules.themes.colors.main) normal types;
|
|
||||||
in ''
|
|
||||||
# -------===[ Color Correction ]===------- #
|
# -------===[ Color Correction ]===------- #
|
||||||
set-option -ga terminal-overrides ",*256col*:Tc"
|
set-option -ga terminal-overrides ",*256col*:Tc"
|
||||||
set-option -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q'
|
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-left-length "40"
|
||||||
set-option -g status-right-length "80"
|
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 ]===------- #
|
# -------===[ Keybindings ]===------- #
|
||||||
bind-key c clock-mode
|
bind-key c clock-mode
|
||||||
|
|
||||||
|
|
|
@ -87,75 +87,74 @@ in
|
||||||
|
|
||||||
syntaxHighlighting = let
|
syntaxHighlighting = let
|
||||||
inherit (config.modules.themes) active;
|
inherit (config.modules.themes) active;
|
||||||
inherit (config.modules.themes.colors.main) normal bright types;
|
|
||||||
in
|
in
|
||||||
mkIf (active != null) {
|
mkIf (active != null) {
|
||||||
enable = true;
|
enable = true;
|
||||||
highlighters = ["main" "brackets" "pattern" "cursor" "regexp" "root" "line"];
|
highlighters = ["main" "brackets" "pattern" "cursor" "regexp" "root" "line"];
|
||||||
patterns = {
|
patterns = {
|
||||||
"sudo " = "fg=${normal.red},bold";
|
"sudo " = "fg=red,bold";
|
||||||
"rm -rf *" = "fg=${normal.red},bold";
|
"rm -rf *" = "fg=red,bold";
|
||||||
};
|
};
|
||||||
styles = {
|
styles = {
|
||||||
# -------===[ Comments ]===------- #
|
# -------===[ Comments ]===------- #
|
||||||
comment = "fg=${normal.black}";
|
comment = "fg=black";
|
||||||
|
|
||||||
# -------===[ Functions/Methods ]===------- #
|
# -------===[ Functions/Methods ]===------- #
|
||||||
alias = "fg=${normal.magenta}";
|
alias = "fg=magenta";
|
||||||
"suffix-alias" = "fg=${normal.magenta}";
|
"suffix-alias" = "fg=magenta";
|
||||||
"global-alias" = "fg=${normal.magenta}";
|
"global-alias" = "fg=magenta";
|
||||||
function = "fg=${normal.blue}";
|
function = "fg=blue";
|
||||||
command = "fg=${normal.green}";
|
command = "fg=green";
|
||||||
precommand = "fg=${normal.green},italic";
|
precommand = "fg=green,italic";
|
||||||
autodirectory = "fg=${normal.yellow},italic";
|
autodirectory = "fg=yellow,italic";
|
||||||
"single-hyphen-option" = "fg=${normal.yellow}";
|
"single-hyphen-option" = "fg=yellow";
|
||||||
"double-hyphen-option" = "fg=${normal.yellow}";
|
"double-hyphen-option" = "fg=yellow";
|
||||||
"back-quoted-argument" = "fg=${normal.magenta}";
|
"back-quoted-argument" = "fg=magenta";
|
||||||
|
|
||||||
# -------===[ Built-ins ]===------- #
|
# -------===[ Built-ins ]===------- #
|
||||||
builtin = "fg=${normal.blue}";
|
builtin = "fg=blue";
|
||||||
"reserved-word" = "fg=${normal.green}";
|
"reserved-word" = "fg=green";
|
||||||
"hashed-command" = "fg=${normal.green}";
|
"hashed-command" = "fg=green";
|
||||||
|
|
||||||
# -------===[ Punctuation ]===------- #
|
# -------===[ Punctuation ]===------- #
|
||||||
commandseparator = "fg=${bright.red}";
|
commandseparator = "fg=brightRed";
|
||||||
"command-substitution-delimiter" = "fg=${types.border}";
|
"command-substitution-delimiter" = "fg=border";
|
||||||
"command-substitution-delimiter-unquoted" = "fg=${types.border}";
|
"command-substitution-delimiter-unquoted" = "fg=border";
|
||||||
"process-substitution-delimiter" = "fg=${types.border}";
|
"process-substitution-delimiter" = "fg=border";
|
||||||
"back-quoted-argument-delimiter" = "fg=${bright.red}";
|
"back-quoted-argument-delimiter" = "fg=brightRed";
|
||||||
"back-double-quoted-argument" = "fg=${bright.red}";
|
"back-double-quoted-argument" = "fg=brightRed";
|
||||||
"back-dollar-quoted-argument" = "fg=${bright.red}";
|
"back-dollar-quoted-argument" = "fg=brightRed";
|
||||||
|
|
||||||
# -------===[ Strings ]===------- #
|
# -------===[ Strings ]===------- #
|
||||||
"command-substitution-quoted" = "fg=${bright.yellow}";
|
"command-substitution-quoted" = "fg=brightYellow";
|
||||||
"command-substitution-delimiter-quoted" = "fg=${bright.yellow}";
|
"command-substitution-delimiter-quoted" = "fg=brightYellow";
|
||||||
"single-quoted-argument" = "fg=${bright.yellow}";
|
"single-quoted-argument" = "fg=brightYellow";
|
||||||
"single-quoted-argument-unclosed" = "fg=${normal.red}";
|
"single-quoted-argument-unclosed" = "fg=red";
|
||||||
"double-quoted-argument" = "fg=${bright.yellow}";
|
"double-quoted-argument" = "fg=brightYellow";
|
||||||
"double-quoted-argument-unclosed" = "fg=${normal.red}";
|
"double-quoted-argument-unclosed" = "fg=red";
|
||||||
"rc-quote" = "fg=${bright.yellow}";
|
"rc-quote" = "fg=brightYellow";
|
||||||
|
|
||||||
# -------===[ Variables ]===------- #
|
# -------===[ Variables ]===------- #
|
||||||
"dollar-quoted-argument" = "fg=${types.highlight}";
|
"dollar-quoted-argument" = "fg=highlight";
|
||||||
"dollar-quoted-argument-unclosed" = "fg=${bright.red}";
|
"dollar-quoted-argument-unclosed" = "fg=brightRed";
|
||||||
"dollar-double-quoted-argument" = "fg=${types.highlight}";
|
"dollar-double-quoted-argument" = "fg=highlight";
|
||||||
assign = "fg=${types.highlight}";
|
assign = "fg=highlight";
|
||||||
"named-fd" = "fg=${types.highlight}";
|
"named-fd" = "fg=highlight";
|
||||||
"numeric-fd" = "fg=${types.highlight}";
|
"numeric-fd" = "fg=highlight";
|
||||||
|
|
||||||
# -------===[ Non-Exclusive ]===------- #
|
# -------===[ Non-Exclusive ]===------- #
|
||||||
"unknown-token" = "fg=${normal.red}";
|
"unknown-token" = "fg=red";
|
||||||
path = "fg=${types.highlight},underline";
|
path = "fg=highlight,underline";
|
||||||
path_pathseparator = "fg=${bright.red},underline";
|
path_pathseparator = "fg=brightRed,underline";
|
||||||
path_prefix = "fg=${types.highlight},underline";
|
path_prefix = "fg=highlight,underline";
|
||||||
path_prefix_pathseparator = "fg=${bright.red},underline";
|
path_prefix_pathseparator = "fg=brightRed,underline";
|
||||||
globbing = "fg=${types.highlight}";
|
globbing = "fg=highlight";
|
||||||
"history-expansion" = "fg=${normal.magenta}";
|
"history-expansion" = "fg=magenta";
|
||||||
"back-quoted-argument-unclosed" = "fg=${normal.red}";
|
"back-quoted-argument-unclosed" = "fg=red";
|
||||||
redirection = "fg=${types.highlight}";
|
redirection = "fg=highlight";
|
||||||
arg0 = "fg=${types.highlight}";
|
arg0 = "fg=highlight";
|
||||||
default = "fg=${types.highlight}";
|
default = "fg=highlight";
|
||||||
cursor = "fg=${types.highlight}";
|
cursor = "fg=highlight";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -142,229 +142,6 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf (cfg.active != null) (mkMerge [
|
config = mkIf (cfg.active != null) (mkMerge [
|
||||||
{
|
(mkIf (desktop.type == "wayland") (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
|
|
||||||
'';
|
|
||||||
}))
|
|
||||||
]))
|
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,98 +10,101 @@ in
|
||||||
{
|
{
|
||||||
config = mkIf (cfg.active == "everforest")
|
config = mkIf (cfg.active == "everforest")
|
||||||
{
|
{
|
||||||
modules.themes = {
|
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/everforest.yaml";
|
||||||
wallpaper = mkDefault ./assets/wallpaper.jpg;
|
stylix.image = ./assets/wallpaper.jpg;
|
||||||
|
|
||||||
gtk = {
|
# modules.themes = {
|
||||||
name = "Everforest-Dark-BL";
|
# wallpaper = mkDefault ./assets/wallpaper.jpg;
|
||||||
package = pkgs.my.everforest-gtk;
|
#
|
||||||
};
|
# gtk = {
|
||||||
|
# name = "Everforest-Dark-BL";
|
||||||
iconTheme = {
|
# package = pkgs.my.everforest-gtk;
|
||||||
name = "everforest-dark";
|
# };
|
||||||
package = pkgs.fluent-icon-theme.override {
|
#
|
||||||
colorVariants = [];
|
# iconTheme = {
|
||||||
};
|
# name = "everforest-dark";
|
||||||
};
|
# package = pkgs.fluent-icon-theme.override {
|
||||||
|
# colorVariants = [];
|
||||||
pointer = {
|
# };
|
||||||
name = "Bibata-Modern-Classic";
|
# };
|
||||||
package = pkgs.bibata-cursors;
|
#
|
||||||
size = 24;
|
# pointer = {
|
||||||
};
|
# name = "Bibata-Modern-Classic";
|
||||||
|
# package = pkgs.bibata-cursors;
|
||||||
fontConfig = {
|
# size = 24;
|
||||||
packages = attrValues {
|
# };
|
||||||
inherit (pkgs) noto-fonts-emoji sarasa-gothic;
|
#
|
||||||
google-fonts = pkgs.google-fonts.override {fonts = ["Cardo"];};
|
# fontConfig = {
|
||||||
nerdfonts =
|
# packages = attrValues {
|
||||||
pkgs.nerdfonts.override {fonts = ["CascadiaCode" "VictorMono"];};
|
# inherit (pkgs) noto-fonts-emoji sarasa-gothic;
|
||||||
};
|
# google-fonts = pkgs.google-fonts.override {fonts = ["Cardo"];};
|
||||||
mono = ["VictorMono Nerd Font" "Sarasa Mono SC"];
|
# nerdfonts =
|
||||||
sans = ["Caskaydia Cove Nerd Font" "Sarasa Gothic SC"];
|
# pkgs.nerdfonts.override {fonts = ["CascadiaCode" "VictorMono"];};
|
||||||
emoji = ["Noto Color Emoji"];
|
# };
|
||||||
};
|
# mono = ["VictorMono Nerd Font" "Sarasa Mono SC"];
|
||||||
|
# sans = ["Caskaydia Cove Nerd Font" "Sarasa Gothic SC"];
|
||||||
font = {
|
# emoji = ["Noto Color Emoji"];
|
||||||
mono.family = "VictorMono Nerd Font";
|
# };
|
||||||
sans.family = "CaskaydiaCove Nerd Font";
|
#
|
||||||
};
|
# font = {
|
||||||
|
# mono.family = "VictorMono Nerd Font";
|
||||||
colors = {
|
# sans.family = "CaskaydiaCove Nerd Font";
|
||||||
main = {
|
# };
|
||||||
normal = {
|
#
|
||||||
black = "#15161e";
|
# colors = {
|
||||||
red = "#f7768e";
|
# main = {
|
||||||
green = "#9ece6a";
|
# normal = {
|
||||||
yellow = "#e0af68";
|
# black = "#15161e";
|
||||||
blue = "#7aa2f7";
|
# red = "#f7768e";
|
||||||
magenta = "#bb9af7";
|
# green = "#9ece6a";
|
||||||
cyan = "#7dcfff";
|
# yellow = "#e0af68";
|
||||||
white = "#a9b1d6";
|
# blue = "#7aa2f7";
|
||||||
};
|
# magenta = "#bb9af7";
|
||||||
bright = {
|
# cyan = "#7dcfff";
|
||||||
black = "#414868";
|
# white = "#a9b1d6";
|
||||||
red = "#f7768e";
|
# };
|
||||||
green = "#9ece6a";
|
# bright = {
|
||||||
yellow = "#e0af68";
|
# black = "#414868";
|
||||||
blue = "#7aa2f7";
|
# red = "#f7768e";
|
||||||
magenta = "#bb9af7";
|
# green = "#9ece6a";
|
||||||
cyan = "#7dcfff";
|
# yellow = "#e0af68";
|
||||||
white = "#c0caf5";
|
# blue = "#7aa2f7";
|
||||||
};
|
# magenta = "#bb9af7";
|
||||||
types = {
|
# cyan = "#7dcfff";
|
||||||
fg = "#c0caf5";
|
# white = "#c0caf5";
|
||||||
bg = "#1a1b26";
|
# };
|
||||||
panelbg = "#ff9e64";
|
# types = {
|
||||||
border = "#1abc9c";
|
# fg = "#c0caf5";
|
||||||
highlight = "#3d59a1";
|
# bg = "#1a1b26";
|
||||||
};
|
# panelbg = "#ff9e64";
|
||||||
};
|
# border = "#1abc9c";
|
||||||
|
# highlight = "#3d59a1";
|
||||||
rofi = {
|
# };
|
||||||
bg = {
|
# };
|
||||||
main = "hsla(235, 18%, 12%, 1)";
|
#
|
||||||
alt = "hsla(235, 18%, 12%, 0)";
|
# rofi = {
|
||||||
bar = "hsla(229, 24%, 18%, 1)";
|
# bg = {
|
||||||
};
|
# main = "hsla(235, 18%, 12%, 1)";
|
||||||
fg = "hsla(228, 72%, 85%, 1)";
|
# alt = "hsla(235, 18%, 12%, 0)";
|
||||||
ribbon = {
|
# bar = "hsla(229, 24%, 18%, 1)";
|
||||||
outer = "hsla(188, 68%, 27%, 1)";
|
# };
|
||||||
inner = "hsla(202, 76%, 24%, 1)";
|
# fg = "hsla(228, 72%, 85%, 1)";
|
||||||
};
|
# ribbon = {
|
||||||
selected = "hsla(220, 88%, 72%, 1)";
|
# outer = "hsla(188, 68%, 27%, 1)";
|
||||||
urgent = "hsl(349, 89%, 72%, 1)";
|
# inner = "hsla(202, 76%, 24%, 1)";
|
||||||
transparent = "hsla(0, 0%, 0%, 0)";
|
# };
|
||||||
};
|
# selected = "hsla(220, 88%, 72%, 1)";
|
||||||
};
|
# urgent = "hsl(349, 89%, 72%, 1)";
|
||||||
|
# transparent = "hsla(0, 0%, 0%, 0)";
|
||||||
editor = {
|
# };
|
||||||
neovim = {
|
# };
|
||||||
dark = "everforest";
|
#
|
||||||
light = "everforest";
|
# editor = {
|
||||||
};
|
# neovim = {
|
||||||
};
|
# dark = "everforest";
|
||||||
};
|
# light = "everforest";
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# };
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
{ pkgs, ... }:
|
|
||||||
{
|
|
||||||
# stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/everforest.yaml";
|
|
||||||
# stylix.image = ./wallpaper.jpg;
|
|
||||||
}
|
|
Loading…
Add table
Add a link
Reference in a new issue