feat(themes): theme system and 12 colorscheme modules
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
6e87d8e186
commit
23f1f31a23
12 changed files with 4043 additions and 0 deletions
393
modules/themes/gruvbox.nix
Normal file
393
modules/themes/gruvbox.nix
Normal file
|
|
@ -0,0 +1,393 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
# Gruvbox theme for Omnixient
|
||||
# A retro groove color scheme with warm, earthy tones
|
||||
|
||||
let
|
||||
inherit (lib) mkIf mkMerge;
|
||||
mkLiteral = value: {
|
||||
_type = "literal";
|
||||
inherit value;
|
||||
};
|
||||
cfg = config.omni;
|
||||
isEnabled = feature: cfg.features.${feature} or false;
|
||||
forUser = userConfig: { home-manager.users.${cfg.user} = userConfig; };
|
||||
stripHash = s: builtins.substring 1 (builtins.stringLength s - 1) s;
|
||||
|
||||
# Gruvbox color palette
|
||||
colors = {
|
||||
bg = "#282828"; # Dark background
|
||||
bg_hard = "#1d2021"; # Harder background
|
||||
bg_soft = "#32302f"; # Soft background
|
||||
fg = "#ebdbb2"; # Light foreground
|
||||
fg_dim = "#a89984"; # Dimmed foreground
|
||||
|
||||
red = "#cc241d"; # Dark red
|
||||
green = "#98971a"; # Dark green
|
||||
yellow = "#d79921"; # Dark yellow
|
||||
blue = "#458588"; # Dark blue
|
||||
purple = "#b16286"; # Dark purple
|
||||
aqua = "#689d6a"; # Dark aqua
|
||||
orange = "#d65d0e"; # Dark orange
|
||||
gray = "#928374"; # Gray
|
||||
|
||||
red_light = "#fb4934"; # Light red
|
||||
green_light = "#b8bb26"; # Light green
|
||||
yellow_light = "#fabd2f"; # Light yellow
|
||||
blue_light = "#83a598"; # Light blue
|
||||
purple_light = "#d3869b"; # Light purple
|
||||
aqua_light = "#8ec07c"; # Light aqua
|
||||
orange_light = "#fe8019"; # Light orange
|
||||
};
|
||||
|
||||
in
|
||||
{
|
||||
config = mkIf (cfg.enable or true) (mkMerge [
|
||||
# System-level theme configuration
|
||||
{
|
||||
# Set theme wallpaper
|
||||
omni.desktop.wallpaper = ./wallpapers/gruvbox/1-grubox.jpg;
|
||||
|
||||
# Hyprland theme colors (from omarchy)
|
||||
environment.etc."omni/hyprland/theme.conf".text = ''
|
||||
general {
|
||||
col.active_border = rgb(a89984)
|
||||
col.inactive_border = rgba(665c54aa)
|
||||
}
|
||||
decoration {
|
||||
col.shadow = rgba(1d2021ee)
|
||||
}
|
||||
'';
|
||||
|
||||
# GTK theme
|
||||
programs.dconf.enable = true;
|
||||
|
||||
# Environment variables for consistent theming
|
||||
environment.variables = {
|
||||
GTK_THEME = "Adwaita-dark";
|
||||
QT_STYLE_OVERRIDE = "adwaita-dark";
|
||||
OMNI_THEME_COLORS_BG = colors.bg;
|
||||
OMNI_THEME_COLORS_FG = colors.fg;
|
||||
OMNI_THEME_COLORS_ACCENT = colors.orange_light;
|
||||
};
|
||||
|
||||
# Console colors
|
||||
console = {
|
||||
colors = map stripHash [
|
||||
colors.bg # black
|
||||
colors.red # red
|
||||
colors.green # green
|
||||
colors.yellow # yellow
|
||||
colors.blue # blue
|
||||
colors.purple # magenta
|
||||
colors.aqua # cyan
|
||||
colors.fg # white
|
||||
colors.gray # bright black
|
||||
colors.red_light # bright red
|
||||
colors.green_light # bright green
|
||||
colors.yellow_light # bright yellow
|
||||
colors.blue_light # bright blue
|
||||
colors.purple_light # bright magenta
|
||||
colors.aqua_light # bright cyan
|
||||
colors.fg # bright white
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
# User-specific theme configuration
|
||||
(forUser {
|
||||
# GTK configuration
|
||||
gtk = {
|
||||
enable = true;
|
||||
theme = {
|
||||
name = "Adwaita-dark";
|
||||
package = pkgs.gnome-themes-extra;
|
||||
};
|
||||
iconTheme = {
|
||||
name = "Papirus-Dark";
|
||||
package = pkgs.papirus-icon-theme;
|
||||
};
|
||||
|
||||
gtk3.extraConfig = {
|
||||
gtk-application-prefer-dark-theme = 1;
|
||||
};
|
||||
|
||||
gtk4.extraConfig = {
|
||||
gtk-application-prefer-dark-theme = 1;
|
||||
};
|
||||
};
|
||||
|
||||
# Qt theming
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme.name = "adwaita";
|
||||
style.name = "adwaita-dark";
|
||||
};
|
||||
|
||||
# Kitty terminal theme
|
||||
programs.kitty = mkIf (isEnabled "coding" || isEnabled "media") {
|
||||
enable = true;
|
||||
themeFile = "gruvbox-dark";
|
||||
settings = {
|
||||
background = colors.bg;
|
||||
foreground = colors.fg;
|
||||
selection_background = colors.bg_soft;
|
||||
selection_foreground = colors.fg;
|
||||
|
||||
# Cursor colors
|
||||
cursor = colors.fg;
|
||||
cursor_text_color = colors.bg;
|
||||
|
||||
# URL underline color when hovering
|
||||
url_color = colors.blue_light;
|
||||
|
||||
# Tab colors
|
||||
active_tab_background = colors.orange_light;
|
||||
active_tab_foreground = colors.bg;
|
||||
inactive_tab_background = colors.bg_soft;
|
||||
inactive_tab_foreground = colors.fg_dim;
|
||||
|
||||
# Window border colors
|
||||
active_border_color = colors.orange_light;
|
||||
inactive_border_color = colors.gray;
|
||||
};
|
||||
};
|
||||
|
||||
# Alacritty terminal theme
|
||||
programs.alacritty = mkIf (isEnabled "coding" || isEnabled "media") {
|
||||
enable = true;
|
||||
settings = {
|
||||
colors = {
|
||||
primary = {
|
||||
background = colors.bg;
|
||||
foreground = colors.fg;
|
||||
};
|
||||
cursor = {
|
||||
text = colors.bg;
|
||||
cursor = colors.fg;
|
||||
};
|
||||
normal = {
|
||||
black = colors.bg;
|
||||
red = colors.red;
|
||||
green = colors.green;
|
||||
yellow = colors.yellow;
|
||||
blue = colors.blue;
|
||||
magenta = colors.purple;
|
||||
cyan = colors.aqua;
|
||||
white = colors.fg;
|
||||
};
|
||||
bright = {
|
||||
black = colors.gray;
|
||||
red = colors.red_light;
|
||||
green = colors.green_light;
|
||||
yellow = colors.yellow_light;
|
||||
blue = colors.blue_light;
|
||||
magenta = colors.purple_light;
|
||||
cyan = colors.aqua_light;
|
||||
white = colors.fg;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Waybar theme
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
style = ''
|
||||
* {
|
||||
font-family: "JetBrainsMono Nerd Font";
|
||||
font-size: 13px;
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background: rgba(40, 40, 40, 0.9);
|
||||
color: ${colors.fg};
|
||||
}
|
||||
.modules-left {
|
||||
margin-left: 8px;
|
||||
}
|
||||
.modules-right {
|
||||
margin-right: 8px;
|
||||
}
|
||||
#workspaces button {
|
||||
all: initial;
|
||||
color: ${colors.fg};
|
||||
padding: 0 6px;
|
||||
margin: 0 1.5px;
|
||||
min-width: 9px;
|
||||
}
|
||||
#workspaces button.empty {
|
||||
opacity: 0.5;
|
||||
}
|
||||
#workspaces button.active {
|
||||
color: ${colors.orange_light};
|
||||
}
|
||||
#custom-omni {
|
||||
margin: 0 12px 0 4px;
|
||||
font-size: 14px;
|
||||
color: ${colors.orange_light};
|
||||
}
|
||||
#cpu,
|
||||
#battery,
|
||||
#pulseaudio,
|
||||
#backlight {
|
||||
min-width: 12px;
|
||||
margin: 0 7.5px;
|
||||
}
|
||||
#custom-power {
|
||||
min-width: 12px;
|
||||
margin: 0 4px 0 7.5px;
|
||||
color: ${colors.red_light};
|
||||
}
|
||||
#bluetooth {
|
||||
margin-right: 17px;
|
||||
}
|
||||
#network {
|
||||
margin-right: 13px;
|
||||
}
|
||||
#custom-screenshot {
|
||||
margin-right: 17px;
|
||||
}
|
||||
#custom-expand-icon {
|
||||
margin-right: 18px;
|
||||
}
|
||||
#tray {
|
||||
margin-right: 16px;
|
||||
}
|
||||
#clock {
|
||||
margin-left: 8.75px;
|
||||
}
|
||||
#custom-power:hover {
|
||||
color: ${colors.bg};
|
||||
background: ${colors.red_light};
|
||||
border-radius: 5px;
|
||||
}
|
||||
#battery.charging { color: ${colors.green_light}; }
|
||||
#battery.warning:not(.charging) { color: ${colors.yellow_light}; }
|
||||
#battery.critical:not(.charging) {
|
||||
color: ${colors.red_light};
|
||||
animation: blink 0.5s linear infinite alternate;
|
||||
}
|
||||
@keyframes blink {
|
||||
to { background-color: ${colors.red_light}; color: ${colors.bg}; }
|
||||
}
|
||||
tooltip {
|
||||
padding: 2px;
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
# Rofi theme
|
||||
programs.rofi = {
|
||||
enable = true;
|
||||
theme = {
|
||||
"*" = {
|
||||
background-color = mkLiteral colors.bg;
|
||||
foreground-color = mkLiteral colors.fg;
|
||||
border-color = mkLiteral colors.orange_light;
|
||||
separatorcolor = mkLiteral colors.bg_soft;
|
||||
scrollbar-handle = mkLiteral colors.orange_light;
|
||||
};
|
||||
|
||||
"#window" = {
|
||||
border = mkLiteral "2px";
|
||||
border-radius = mkLiteral "8px";
|
||||
padding = mkLiteral "20px";
|
||||
};
|
||||
|
||||
"#element selected" = {
|
||||
background-color = mkLiteral colors.orange_light;
|
||||
text-color = mkLiteral colors.bg;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Mako notification theme
|
||||
services.mako = {
|
||||
enable = true;
|
||||
settings = {
|
||||
font = "JetBrainsMono Nerd Font 10";
|
||||
background-color = colors.bg;
|
||||
text-color = colors.fg;
|
||||
border-color = colors.orange_light;
|
||||
border-size = 2;
|
||||
border-radius = 8;
|
||||
padding = "10";
|
||||
margin = "5";
|
||||
default-timeout = 5000;
|
||||
progress-color = colors.orange_light;
|
||||
};
|
||||
};
|
||||
|
||||
# VSCode theme
|
||||
programs.vscode = mkIf (isEnabled "coding") {
|
||||
enable = true;
|
||||
profiles.default.extensions = with pkgs.vscode-extensions; [
|
||||
jdinhlife.gruvbox
|
||||
];
|
||||
profiles.default.userSettings = {
|
||||
"workbench.colorTheme" = "Gruvbox Dark Medium";
|
||||
"workbench.preferredDarkColorTheme" = "Gruvbox Dark Medium";
|
||||
"editor.fontFamily" = "'JetBrainsMono Nerd Font', 'Droid Sans Mono', 'monospace'";
|
||||
"terminal.integrated.fontFamily" = "'JetBrainsMono Nerd Font'";
|
||||
};
|
||||
};
|
||||
|
||||
# Neovim theme
|
||||
programs.neovim = mkIf (isEnabled "coding") {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
colorscheme gruvbox
|
||||
set background=dark
|
||||
'';
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
gruvbox-nvim
|
||||
];
|
||||
};
|
||||
|
||||
# Git diff and bat theme
|
||||
programs.bat.config.theme = "gruvbox-dark";
|
||||
|
||||
# btop theme
|
||||
programs.btop.settings.color_theme = "gruvbox_dark";
|
||||
|
||||
# Lazygit theme
|
||||
programs.lazygit.settings = {
|
||||
gui.theme = {
|
||||
lightTheme = false;
|
||||
selectedLineBgColor = [ colors.bg_soft ];
|
||||
selectedRangeBgColor = [ colors.bg_soft ];
|
||||
};
|
||||
};
|
||||
|
||||
# Zsh/shell prompt colors
|
||||
programs.starship = mkIf (isEnabled "coding") {
|
||||
enable = true;
|
||||
settings = {
|
||||
format = "$directory$git_branch$git_status$character";
|
||||
character = {
|
||||
success_symbol = "[➜](bold ${colors.green_light})";
|
||||
error_symbol = "[➜](bold ${colors.red_light})";
|
||||
};
|
||||
directory = {
|
||||
style = "bold ${colors.blue_light}";
|
||||
};
|
||||
git_branch = {
|
||||
style = "bold ${colors.purple_light}";
|
||||
};
|
||||
git_status = {
|
||||
style = "bold ${colors.yellow_light}";
|
||||
};
|
||||
};
|
||||
};
|
||||
})
|
||||
]);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue