Update themes to use nix-colors base16

This commit is contained in:
Henry Sipp
2025-07-01 22:15:24 -05:00
parent 45dd3bfa6a
commit 2ccb0d7113
12 changed files with 95 additions and 355 deletions
+1
View File
@@ -26,6 +26,7 @@
imports = [ imports = [
(import ./modules/nixos/default.nix inputs) (import ./modules/nixos/default.nix inputs)
]; ];
options.omarchy = (import ./config.nix lib).omarchyOptions; options.omarchy = (import ./config.nix lib).omarchyOptions;
config = { config = {
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
+19 -25
View File
@@ -2,11 +2,7 @@
config, config,
pkgs, pkgs,
... ...
}: let }: {
cfg = config.omarchy;
themes = import ../themes.nix;
theme = themes.${cfg.theme};
in {
programs.alacritty = { programs.alacritty = {
enable = true; enable = true;
settings = { settings = {
@@ -42,28 +38,26 @@ in {
# Colors # Colors
colors = { colors = {
primary.background = theme.background; primary.background = "#${config.colorScheme.palette.base00}";
primary.foreground = theme.foreground; primary.foreground = "#${config.colorScheme.palette.base05}";
normal.black = theme.black; normal.black = "#${config.colorScheme.palette.base00}";
normal.red = theme.red; normal.red = "#${config.colorScheme.palette.base08}";
normal.green = theme.green; normal.green = "#${config.colorScheme.palette.base0B}";
normal.yellow = theme.yellow; normal.yellow = "#${config.colorScheme.palette.base0A}";
normal.blue = theme.blue; normal.blue = "#${config.colorScheme.palette.base0D}";
normal.magenta = theme.magenta; normal.magenta = "#${config.colorScheme.palette.base0E}";
normal.cyan = theme.cyan; normal.cyan = "#${config.colorScheme.palette.base0C}";
normal.white = theme.white; normal.white = "#${config.colorScheme.palette.base05}";
bright.black = theme.bright_black; bright.black = "#${config.colorScheme.palette.base03}";
bright.red = theme.bright_red; bright.red = "#${config.colorScheme.palette.base09}";
bright.green = theme.bright_green; bright.green = "#${config.colorScheme.palette.base01}";
bright.yellow = theme.bright_yellow; bright.yellow = "#${config.colorScheme.palette.base02}";
bright.blue = theme.bright_blue; bright.blue = "#${config.colorScheme.palette.base04}";
bright.magenta = theme.bright_magenta; bright.magenta = "#${config.colorScheme.palette.base06}";
bright.cyan = theme.bright_cyan; bright.cyan = "#${config.colorScheme.palette.base0F}";
bright.white = theme.bright_white; bright.white = "#${config.colorScheme.palette.base07}";
selection.background = theme.primary;
}; };
}; };
}; };
+29 -41
View File
@@ -4,90 +4,78 @@
... ...
}: let }: let
cfg = config.omarchy; cfg = config.omarchy;
themes = import ../themes.nix; palette = config.colorScheme.palette;
theme = themes.${cfg.theme};
in { in {
home.file = { home.file = {
".config/btop/themes/${cfg.theme}.theme" = { ".config/btop/themes/${cfg.theme}.theme" = {
text = '' text = ''
# Main bg
theme[main_bg]="${theme.background}"
# Main text color # Main text color
theme[main_fg]="${theme.foreground_muted}" theme[main_fg]="${palette.base05}"
# Title color for boxes # Title color for boxes
theme[title]="${theme.foreground_muted}" theme[title]="${palette.base05}"
# Highlight color for keyboard shortcuts # Highlight color for keyboard shortcuts
theme[hi_fg]="${theme.primary_variant}" theme[hi_fg]="${palette.base0D}"
# Background color of selected item in processes box # Background color of selected item in processes box
theme[selected_bg]="${theme.surface}" theme[selected_bg]="${palette.base01}"
# Foreground color of selected item in processes box # Foreground color of selected item in processes box
theme[selected_fg]="${theme.foreground_muted}" theme[selected_fg]="${palette.base05}"
# Color of inactive/disabled text # Color of inactive/disabled text
theme[inactive_fg]="${theme.inactive}" theme[inactive_fg]="${palette.base04}"
# Misc colors for processes box including mini cpu graphs, details memory graph and details status text # Misc colors for processes box including mini cpu graphs, details memory graph and details status text
theme[proc_misc]="${theme.primary_variant}" theme[proc_misc]="${palette.base0D}"
# Cpu box outline color # Cpu box outline color
theme[cpu_box]="${theme.inactive}" theme[cpu_box]="${palette.base0B}"
# Memory/disks box outline color # Memory/disks box outline color
theme[mem_box]="${theme.inactive}" theme[mem_box]="${palette.base09}"
# Net up/down box outline color # Net up/down box outline color
theme[net_box]="${theme.inactive}" theme[net_box]="${palette.base0E}"
# Processes box outline color # Processes box outline color
theme[proc_box]="${theme.inactive}" theme[proc_box]="${palette.base0C}"
# Box divider line and small boxes line color # Box divider line and small boxes line color
theme[div_line]="${theme.inactive}" theme[div_line]="${palette.base04}"
# Temperature graph colors # Temperature graph colors
theme[temp_start]="${theme.success}" theme[temp_start]="${palette.base0B}"
theme[temp_mid]="${theme.warning}" theme[temp_mid]="${palette.base0A}"
theme[temp_end]="${theme.error}" theme[temp_end]="${palette.base08}"
# CPU graph colors # CPU graph colors
theme[cpu_start]="${theme.success}" theme[cpu_start]="${palette.base0B}"
theme[cpu_mid]="${theme.warning}" theme[cpu_mid]="${palette.base0A}"
theme[cpu_end]="${theme.error}" theme[cpu_end]="${palette.base08}"
# Mem/Disk free meter # Mem/Disk free meter
theme[free_start]="${theme.success}" theme[free_start]="${palette.base0B}"
theme[free_mid]="${theme.warning}"
theme[free_end]="${theme.error}"
# Mem/Disk cached meter # Mem/Disk cached meter
theme[cached_start]="${theme.success}" theme[cached_start]="${palette.base0A}"
theme[cached_mid]="${theme.warning}"
theme[cached_end]="${theme.error}"
# Mem/Disk available meter # Mem/Disk available meter
theme[available_start]="${theme.success}" theme[available_start]="${palette.base09}"
theme[available_mid]="${theme.warning}"
theme[available_end]="${theme.error}"
# Mem/Disk used meter # Mem/Disk used meter
theme[used_start]="${theme.success}" theme[used_start]="${palette.base08}"
theme[used_mid]="${theme.warning}"
theme[used_end]="${theme.error}"
# Download graph colors # Download graph colors
theme[download_start]="${theme.success}" theme[download_start]="${palette.base0E}"
theme[download_mid]="${theme.warning}" theme[download_mid]="${palette.base0D}"
theme[download_end]="${theme.error}" theme[download_end]="${palette.base0C}"
# Upload graph colors # Upload graph colors
theme[upload_start]="${theme.success}" theme[upload_start]="${palette.base0E}"
theme[upload_mid]="${theme.warning}" theme[upload_mid]="${palette.base0D}"
theme[upload_end]="${theme.error}" theme[upload_end]="${palette.base0C}"
''; '';
}; };
}; };
+5
View File
@@ -4,6 +4,9 @@ inputs: {
... ...
}: let }: let
packages = import ../packages.nix {inherit pkgs;}; packages = import ../packages.nix {inherit pkgs;};
themes = import ../themes.nix;
selectedTheme = themes.${config.omarchy.theme};
in { in {
imports = [ imports = [
(import ./hyprland.nix inputs) (import ./hyprland.nix inputs)
@@ -25,6 +28,8 @@ in {
home.packages = packages.homePackages; home.packages = packages.homePackages;
colorScheme = inputs.nix-colors.colorSchemes.${selectedTheme.base16-theme};
dconf.settings = { dconf.settings = {
"org/gnome/desktop/interface" = { "org/gnome/desktop/interface" = {
color-scheme = "prefer-dark"; color-scheme = "prefer-dark";
+5 -15
View File
@@ -3,21 +3,11 @@
pkgs, pkgs,
... ...
}: let }: let
cfg = config.omarchy;
themes = import ../../themes.nix;
theme = themes.${cfg.theme};
# Convert hex color to rgba format for hyprland
hexToRgba = hex: alpha: let hexToRgba = hex: alpha: let
cleanHex = builtins.substring 1 6 hex; # Remove the # prefix in "rgba(${hex}${alpha})";
in "rgba(${cleanHex}${alpha})";
# Special handling for tokyo-night gradient inactiveBorder = hexToRgba config.colorScheme.palette.base09 "aa";
# Probably shouldn't be here. activeBorder = hexToRgba config.colorScheme.palette.base0D "aa";
activeBorder =
if cfg.theme == "tokyo-night"
then "${hexToRgba theme.accent "ee"} ${hexToRgba theme.success "ee"} 45deg"
else hexToRgba theme.foreground "ff";
in { in {
wayland.windowManager.hyprland.settings = { wayland.windowManager.hyprland.settings = {
general = { general = {
@@ -27,7 +17,7 @@ in {
border_size = 2; border_size = 2;
"col.active_border" = activeBorder; "col.active_border" = activeBorder;
"col.inactive_border" = hexToRgba theme.surface_variant "aa"; "col.inactive_border" = inactiveBorder;
resize_on_border = false; resize_on_border = false;
@@ -43,7 +33,7 @@ in {
enabled = true; enabled = true;
range = 2; range = 2;
render_power = 3; render_power = 3;
color = hexToRgba theme.background "ee"; # color = hexToRgba config.colorScheme.palette.base00 "ee";
}; };
blur = { blur = {
+7 -7
View File
@@ -4,14 +4,14 @@ inputs: {
lib, lib,
... ...
}: let }: let
cfg = config.omarchy;
themes = import ../themes.nix;
theme = themes.${cfg.theme};
backgroundRgb = "rgb(${inputs.nix-colors.lib.conversions.hexToRGBString ", " (builtins.substring 1 6 theme.background)})"; palette = config.colorScheme.palette;
surfaceRgb = "rgb(${inputs.nix-colors.lib.conversions.hexToRGBString ", " (builtins.substring 1 6 theme.surface)})"; convert = inputs.nix-colors.lib.conversions.hexToRGBString;
foregroundRgb = "rgb(${inputs.nix-colors.lib.conversions.hexToRGBString ", " (builtins.substring 1 6 theme.foreground)})";
foregroundMutedRgb = "rgb(${inputs.nix-colors.lib.conversions.hexToRGBString ", " (builtins.substring 1 6 theme.foreground_muted)})"; backgroundRgb = "rgb(${convert ", " palette.base00 })";
surfaceRgb = "rgb(${convert ", " palette.base02 })";
foregroundRgb = "rgb(${convert ", " palette.base0B })";
foregroundMutedRgb = "rgb(${convert ", " palette.base04 })";
in { in {
programs.hyprlock = { programs.hyprlock = {
enable = true; enable = true;
+4 -6
View File
@@ -4,17 +4,15 @@
... ...
}: let }: let
cfg = config.omarchy; cfg = config.omarchy;
themes = import ../themes.nix;
theme = themes.${cfg.theme};
in { in {
services.mako = { services.mako = {
enable = true; enable = true;
settings = { settings = {
background-color = theme.background; background-color = "#${config.colorScheme.palette.base00}";
text-color = theme.foreground; text-color = "${config.colorScheme.palette.base05}";
border-color = theme.accent; border-color = "${config.colorScheme.palette.base04}";
progress-color = theme.primary; progress-color = "${config.colorScheme.palette.base0D}";
width = 420; width = 420;
height = 110; height = 110;
+1 -1
View File
@@ -12,7 +12,7 @@ in {
profiles.default = { profiles.default = {
userSettings = userSettings =
{ {
"workbench.colorTheme" = theme.vscode_theme; "workbench.colorTheme" = theme.vscode-theme;
"vim.useCtrlKeys" = false; "vim.useCtrlKeys" = false;
"editor.minimap.enabled" = false; "editor.minimap.enabled" = false;
} }
+4 -8
View File
@@ -2,11 +2,7 @@
config, config,
pkgs, pkgs,
... ...
}: let }: {
cfg = config.omarchy;
themes = import ../themes.nix;
theme = themes.${cfg.theme};
in {
home.file = { home.file = {
".config/waybar/" = { ".config/waybar/" = {
source = ../../config/waybar; source = ../../config/waybar;
@@ -15,8 +11,8 @@ in {
".config/waybar/theme.css" = { ".config/waybar/theme.css" = {
text = '' text = ''
* { * {
color: ${theme.foreground}; color: #${config.colorScheme.palette.base05};
background-color: ${theme.background}; background-color: #${config.colorScheme.palette.base00};
} }
''; '';
}; };
@@ -75,7 +71,7 @@ in {
on-click = "alacritty -e btop"; on-click = "alacritty -e btop";
}; };
clock = { clock = {
format = "{:%A %H:%M}"; format = "{:%A %I:%M %p}";
format-alt = "{:%d %B W%V %Y}"; format-alt = "{:%d %B W%V %Y}";
tooltip = false; tooltip = false;
}; };
+9 -13
View File
@@ -2,11 +2,7 @@
config, config,
pkgs, pkgs,
... ...
}: let }: {
cfg = config.omarchy;
themes = import ../themes.nix;
theme = themes.${cfg.theme};
in {
home.file = { home.file = {
".config/wofi/style.css" = { ".config/wofi/style.css" = {
text = '' text = ''
@@ -18,7 +14,7 @@ in {
window { window {
margin: 0px; margin: 0px;
padding: 20px; padding: 20px;
background-color: ${theme.background}; background-color: #${config.colorScheme.palette.base00};
opacity: 0.95; opacity: 0.95;
} }
@@ -26,28 +22,28 @@ in {
margin: 0; margin: 0;
padding: 0; padding: 0;
border: none; border: none;
background-color: ${theme.background}; background-color: #${config.colorScheme.palette.base00};
} }
#outer-box { #outer-box {
margin: 0; margin: 0;
padding: 20px; padding: 20px;
border: none; border: none;
background-color: ${theme.background}; background-color: #${config.colorScheme.palette.base00};
} }
#scroll { #scroll {
margin: 0; margin: 0;
padding: 0; padding: 0;
border: none; border: none;
background-color: ${theme.background}; background-color: #${config.colorScheme.palette.base00};
} }
#input { #input {
margin: 0; margin: 0;
padding: 10px; padding: 10px;
border: none; border: none;
background-color: ${theme.background}; background-color: #${config.colorScheme.palette.base00};
color: @text; color: @text;
} }
@@ -60,11 +56,11 @@ in {
#text { #text {
margin: 5px; margin: 5px;
border: none; border: none;
color: ${theme.foreground_muted} color: #${config.colorScheme.palette.base06};
} }
#entry { #entry {
background-color: ${theme.background}; background-color: #${config.colorScheme.palette.base00};
} }
#entry:selected { #entry:selected {
@@ -73,7 +69,7 @@ in {
} }
#entry:selected #text { #entry:selected #text {
color: ${theme.primary_variant}; color: #${config.colorScheme.palette.base02};
} }
#entry image { #entry image {
+2
View File
@@ -38,4 +38,6 @@ in {
noto-fonts-emoji noto-fonts-emoji
nerd-fonts.caskaydia-mono nerd-fonts.caskaydia-mono
]; ];
} }
+9 -239
View File
@@ -1,255 +1,25 @@
{ {
"tokyo-night" = { "tokyo-night" = {
# Base colors base16-theme = "tokyo-night-dark";
background = "#1a1b26"; vscode-theme = "Tokyo Night";
foreground = "#a9b1d6";
surface = "#414868";
surface_variant = "#565f89";
# Primary colors
primary = "#7aa2f7";
primary_variant = "#7dcfff";
secondary = "#bb9af7";
accent = "#33ccff";
# Status colors
success = "#9ece6a";
warning = "#e0af68";
error = "#f7768e";
info = "#7aa2f7";
# Terminal colors
black = "#32344a";
red = "#f7768e";
green = "#9ece6a";
yellow = "#e0af68";
blue = "#7aa2f7";
magenta = "#ad8ee6";
cyan = "#449dab";
white = "#787c99";
# Bright terminal colors
bright_black = "#444b6a";
bright_red = "#ff7a93";
bright_green = "#b9f27c";
bright_yellow = "#ff9e64";
bright_blue = "#7da6ff";
bright_magenta = "#bb9af7";
bright_cyan = "#0db9d7";
bright_white = "#acb0d0";
# UI elements
border = "#33ccff";
selection = "#7aa2f7";
inactive = "#565f89";
foreground_muted = "#cfc9c2";
# VSCode theme
vscode_theme = "Tokyo Night";
}; };
"catppuccin-macchiato" = { "catppuccin-macchiato" = {
# Base colors vscode-theme = "Catppuccin Macchiato";
background = "#24273a";
foreground = "#cad3f5";
surface = "#51576d";
surface_variant = "#838ba7";
# Primary colors
primary = "#8caaee";
primary_variant = "#8aadf4";
secondary = "#f5bde6";
accent = "#c6d0f5";
# Status colors
success = "#a6d189";
warning = "#e5c890";
error = "#ed8796";
info = "#8caaee";
# Terminal colors
black = "#494d64";
red = "#ed8796";
green = "#a6da95";
yellow = "#eed49f";
blue = "#8aadf4";
magenta = "#f5bde6";
cyan = "#8bd5ca";
white = "#b8c0e0";
# Bright terminal colors
bright_black = "#5b6078";
bright_red = "#ed8796";
bright_green = "#a6da95";
bright_yellow = "#eed49f";
bright_blue = "#8aadf4";
bright_magenta = "#f5bde6";
bright_cyan = "#8bd5ca";
bright_white = "#a5adcb";
# UI elements
border = "#c6d0f5";
selection = "#f4dbd6";
inactive = "#838ba7";
foreground_muted = "#c6d0f5";
# Special colors
orange = "#f5a97f";
rosewater = "#f4dbd6";
# VSCode theme
vscode_theme = "Catppuccin Macchiato";
}; };
"kanagawa" = { "kanagawa" = {
# Base colors base16-theme = "kanagawa";
background = "#1f1f28"; vscode-theme = "Kanagawa";
foreground = "#dcd7ba";
surface = "#2d4f67";
surface_variant = "#727169";
# Primary colors
primary = "#7e9cd8";
primary_variant = "#7fb4ca";
secondary = "#957fb8";
accent = "#938aa9";
# Status colors
success = "#76946a";
warning = "#c0a36e";
error = "#c34043";
info = "#7e9cd8";
# Terminal colors
black = "#090618";
red = "#c34043";
green = "#76946a";
yellow = "#c0a36e";
blue = "#7e9cd8";
magenta = "#957fb8";
cyan = "#6a9589";
white = "#c8c093";
# Bright terminal colors
bright_black = "#727169";
bright_red = "#e82424";
bright_green = "#98bb6c";
bright_yellow = "#e6c384";
bright_blue = "#7fb4ca";
bright_magenta = "#938aa9";
bright_cyan = "#7aa89f";
bright_white = "#dcd7ba";
# UI elements
border = "#938aa9";
selection = "#2d4f67";
inactive = "#727169";
foreground_muted = "#c8c093";
# Special colors
orange = "#ffa066";
peach = "#ff5d62";
# VSCode theme
vscode_theme = "Kanagawa";
}; };
"everforest" = { "everforest" = {
# Base colors base16-theme = "everforest";
background = "#2d353b"; vscode-theme = "Everforest Dark";
foreground = "#d3c6aa";
surface = "#3d484d";
surface_variant = "#475258";
# Primary colors
primary = "#7fbbb3";
primary_variant = "#83c092";
secondary = "#d699b6";
accent = "#e67e80";
# Status colors
success = "#a7c080";
warning = "#dbbc7f";
error = "#e67e80";
info = "#7fbbb3";
# Terminal colors
black = "#475258";
red = "#e67e80";
green = "#a7c080";
yellow = "#dbbc7f";
blue = "#7fbbb3";
magenta = "#d699b6";
cyan = "#83c092";
white = "#d3c6aa";
# Bright terminal colors (same as normal for this theme)
bright_black = "#475258";
bright_red = "#e67e80";
bright_green = "#a7c080";
bright_yellow = "#dbbc7f";
bright_blue = "#7fbbb3";
bright_magenta = "#d699b6";
bright_cyan = "#83c092";
bright_white = "#d3c6aa";
# UI elements
border = "#3d484d";
selection = "#3d484d";
inactive = "#2d353b";
foreground_muted = "#d3c6aa";
# VSCode theme
vscode_theme = "Everforest Dark";
}; };
"gruvbox" = { "gruvbox" = {
# Base colors vscode-theme = "Gruvbox Dark";
background = "#282828";
foreground = "#d4be98";
surface = "#3c3836";
surface_variant = "#504945";
# Primary colors
primary = "#7daea3";
primary_variant = "#89b482";
secondary = "#d3869b";
accent = "#d8a657";
# Status colors
success = "#a9b665";
warning = "#d8a657";
error = "#ea6962";
info = "#7daea3";
# Terminal colors
black = "#3c3836";
red = "#ea6962";
green = "#a9b665";
yellow = "#d8a657";
blue = "#7daea3";
magenta = "#d3869b";
cyan = "#89b482";
white = "#d4be98";
# Bright terminal colors (same as normal for this theme)
bright_black = "#3c3836";
bright_red = "#ea6962";
bright_green = "#a9b665";
bright_yellow = "#d8a657";
bright_blue = "#7daea3";
bright_magenta = "#d3869b";
bright_cyan = "#89b482";
bright_white = "#d4be98";
# UI elements
border = "#504945";
selection = "#504945";
inactive = "#665c54";
foreground_muted = "#bdae93";
# VSCode theme
vscode_theme = "Gruvbox Dark";
}; };
"catppuccin-mocha" = { "catppuccin-mocha" = {
@@ -302,7 +72,7 @@
rosewater = "#f5e0dc"; rosewater = "#f5e0dc";
# VSCode theme # VSCode theme
vscode_theme = "Catppuccin Mocha"; vscode-theme = "Catppuccin Mocha";
}; };
# "nord" = {}; # "nord" = {};