forked from Shinonome/omarchy-nix
Update themes to use nix-colors base16
This commit is contained in:
@@ -2,11 +2,7 @@
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.omarchy;
|
||||
themes = import ../themes.nix;
|
||||
theme = themes.${cfg.theme};
|
||||
in {
|
||||
}: {
|
||||
programs.alacritty = {
|
||||
enable = true;
|
||||
settings = {
|
||||
@@ -42,28 +38,26 @@ in {
|
||||
|
||||
# Colors
|
||||
colors = {
|
||||
primary.background = theme.background;
|
||||
primary.foreground = theme.foreground;
|
||||
primary.background = "#${config.colorScheme.palette.base00}";
|
||||
primary.foreground = "#${config.colorScheme.palette.base05}";
|
||||
|
||||
normal.black = theme.black;
|
||||
normal.red = theme.red;
|
||||
normal.green = theme.green;
|
||||
normal.yellow = theme.yellow;
|
||||
normal.blue = theme.blue;
|
||||
normal.magenta = theme.magenta;
|
||||
normal.cyan = theme.cyan;
|
||||
normal.white = theme.white;
|
||||
normal.black = "#${config.colorScheme.palette.base00}";
|
||||
normal.red = "#${config.colorScheme.palette.base08}";
|
||||
normal.green = "#${config.colorScheme.palette.base0B}";
|
||||
normal.yellow = "#${config.colorScheme.palette.base0A}";
|
||||
normal.blue = "#${config.colorScheme.palette.base0D}";
|
||||
normal.magenta = "#${config.colorScheme.palette.base0E}";
|
||||
normal.cyan = "#${config.colorScheme.palette.base0C}";
|
||||
normal.white = "#${config.colorScheme.palette.base05}";
|
||||
|
||||
bright.black = theme.bright_black;
|
||||
bright.red = theme.bright_red;
|
||||
bright.green = theme.bright_green;
|
||||
bright.yellow = theme.bright_yellow;
|
||||
bright.blue = theme.bright_blue;
|
||||
bright.magenta = theme.bright_magenta;
|
||||
bright.cyan = theme.bright_cyan;
|
||||
bright.white = theme.bright_white;
|
||||
|
||||
selection.background = theme.primary;
|
||||
bright.black = "#${config.colorScheme.palette.base03}";
|
||||
bright.red = "#${config.colorScheme.palette.base09}";
|
||||
bright.green = "#${config.colorScheme.palette.base01}";
|
||||
bright.yellow = "#${config.colorScheme.palette.base02}";
|
||||
bright.blue = "#${config.colorScheme.palette.base04}";
|
||||
bright.magenta = "#${config.colorScheme.palette.base06}";
|
||||
bright.cyan = "#${config.colorScheme.palette.base0F}";
|
||||
bright.white = "#${config.colorScheme.palette.base07}";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -4,90 +4,78 @@
|
||||
...
|
||||
}: let
|
||||
cfg = config.omarchy;
|
||||
themes = import ../themes.nix;
|
||||
theme = themes.${cfg.theme};
|
||||
palette = config.colorScheme.palette;
|
||||
in {
|
||||
home.file = {
|
||||
".config/btop/themes/${cfg.theme}.theme" = {
|
||||
text = ''
|
||||
# Main bg
|
||||
theme[main_bg]="${theme.background}"
|
||||
|
||||
# Main text color
|
||||
theme[main_fg]="${theme.foreground_muted}"
|
||||
theme[main_fg]="${palette.base05}"
|
||||
|
||||
# Title color for boxes
|
||||
theme[title]="${theme.foreground_muted}"
|
||||
theme[title]="${palette.base05}"
|
||||
|
||||
# Highlight color for keyboard shortcuts
|
||||
theme[hi_fg]="${theme.primary_variant}"
|
||||
theme[hi_fg]="${palette.base0D}"
|
||||
|
||||
# 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
|
||||
theme[selected_fg]="${theme.foreground_muted}"
|
||||
theme[selected_fg]="${palette.base05}"
|
||||
|
||||
# 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
|
||||
theme[proc_misc]="${theme.primary_variant}"
|
||||
theme[proc_misc]="${palette.base0D}"
|
||||
|
||||
# Cpu box outline color
|
||||
theme[cpu_box]="${theme.inactive}"
|
||||
theme[cpu_box]="${palette.base0B}"
|
||||
|
||||
# Memory/disks box outline color
|
||||
theme[mem_box]="${theme.inactive}"
|
||||
theme[mem_box]="${palette.base09}"
|
||||
|
||||
# Net up/down box outline color
|
||||
theme[net_box]="${theme.inactive}"
|
||||
theme[net_box]="${palette.base0E}"
|
||||
|
||||
# Processes box outline color
|
||||
theme[proc_box]="${theme.inactive}"
|
||||
theme[proc_box]="${palette.base0C}"
|
||||
|
||||
# Box divider line and small boxes line color
|
||||
theme[div_line]="${theme.inactive}"
|
||||
theme[div_line]="${palette.base04}"
|
||||
|
||||
# Temperature graph colors
|
||||
theme[temp_start]="${theme.success}"
|
||||
theme[temp_mid]="${theme.warning}"
|
||||
theme[temp_end]="${theme.error}"
|
||||
theme[temp_start]="${palette.base0B}"
|
||||
theme[temp_mid]="${palette.base0A}"
|
||||
theme[temp_end]="${palette.base08}"
|
||||
|
||||
# CPU graph colors
|
||||
theme[cpu_start]="${theme.success}"
|
||||
theme[cpu_mid]="${theme.warning}"
|
||||
theme[cpu_end]="${theme.error}"
|
||||
theme[cpu_start]="${palette.base0B}"
|
||||
theme[cpu_mid]="${palette.base0A}"
|
||||
theme[cpu_end]="${palette.base08}"
|
||||
|
||||
# Mem/Disk free meter
|
||||
theme[free_start]="${theme.success}"
|
||||
theme[free_mid]="${theme.warning}"
|
||||
theme[free_end]="${theme.error}"
|
||||
theme[free_start]="${palette.base0B}"
|
||||
|
||||
# Mem/Disk cached meter
|
||||
theme[cached_start]="${theme.success}"
|
||||
theme[cached_mid]="${theme.warning}"
|
||||
theme[cached_end]="${theme.error}"
|
||||
theme[cached_start]="${palette.base0A}"
|
||||
|
||||
# Mem/Disk available meter
|
||||
theme[available_start]="${theme.success}"
|
||||
theme[available_mid]="${theme.warning}"
|
||||
theme[available_end]="${theme.error}"
|
||||
theme[available_start]="${palette.base09}"
|
||||
|
||||
# Mem/Disk used meter
|
||||
theme[used_start]="${theme.success}"
|
||||
theme[used_mid]="${theme.warning}"
|
||||
theme[used_end]="${theme.error}"
|
||||
theme[used_start]="${palette.base08}"
|
||||
|
||||
# Download graph colors
|
||||
theme[download_start]="${theme.success}"
|
||||
theme[download_mid]="${theme.warning}"
|
||||
theme[download_end]="${theme.error}"
|
||||
theme[download_start]="${palette.base0E}"
|
||||
theme[download_mid]="${palette.base0D}"
|
||||
theme[download_end]="${palette.base0C}"
|
||||
|
||||
# Upload graph colors
|
||||
theme[upload_start]="${theme.success}"
|
||||
theme[upload_mid]="${theme.warning}"
|
||||
theme[upload_end]="${theme.error}"
|
||||
theme[upload_start]="${palette.base0E}"
|
||||
theme[upload_mid]="${palette.base0D}"
|
||||
theme[upload_end]="${palette.base0C}"
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
@@ -4,6 +4,9 @@ inputs: {
|
||||
...
|
||||
}: let
|
||||
packages = import ../packages.nix {inherit pkgs;};
|
||||
|
||||
themes = import ../themes.nix;
|
||||
selectedTheme = themes.${config.omarchy.theme};
|
||||
in {
|
||||
imports = [
|
||||
(import ./hyprland.nix inputs)
|
||||
@@ -25,6 +28,8 @@ in {
|
||||
|
||||
home.packages = packages.homePackages;
|
||||
|
||||
colorScheme = inputs.nix-colors.colorSchemes.${selectedTheme.base16-theme};
|
||||
|
||||
dconf.settings = {
|
||||
"org/gnome/desktop/interface" = {
|
||||
color-scheme = "prefer-dark";
|
||||
|
||||
@@ -3,21 +3,11 @@
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.omarchy;
|
||||
themes = import ../../themes.nix;
|
||||
theme = themes.${cfg.theme};
|
||||
|
||||
# Convert hex color to rgba format for hyprland
|
||||
hexToRgba = hex: alpha: let
|
||||
cleanHex = builtins.substring 1 6 hex; # Remove the # prefix
|
||||
in "rgba(${cleanHex}${alpha})";
|
||||
in "rgba(${hex}${alpha})";
|
||||
|
||||
# Special handling for tokyo-night gradient
|
||||
# Probably shouldn't be here.
|
||||
activeBorder =
|
||||
if cfg.theme == "tokyo-night"
|
||||
then "${hexToRgba theme.accent "ee"} ${hexToRgba theme.success "ee"} 45deg"
|
||||
else hexToRgba theme.foreground "ff";
|
||||
inactiveBorder = hexToRgba config.colorScheme.palette.base09 "aa";
|
||||
activeBorder = hexToRgba config.colorScheme.palette.base0D "aa";
|
||||
in {
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
general = {
|
||||
@@ -27,7 +17,7 @@ in {
|
||||
border_size = 2;
|
||||
|
||||
"col.active_border" = activeBorder;
|
||||
"col.inactive_border" = hexToRgba theme.surface_variant "aa";
|
||||
"col.inactive_border" = inactiveBorder;
|
||||
|
||||
resize_on_border = false;
|
||||
|
||||
@@ -43,7 +33,7 @@ in {
|
||||
enabled = true;
|
||||
range = 2;
|
||||
render_power = 3;
|
||||
color = hexToRgba theme.background "ee";
|
||||
# color = hexToRgba config.colorScheme.palette.base00 "ee";
|
||||
};
|
||||
|
||||
blur = {
|
||||
|
||||
@@ -4,14 +4,14 @@ inputs: {
|
||||
lib,
|
||||
...
|
||||
}: 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)})";
|
||||
surfaceRgb = "rgb(${inputs.nix-colors.lib.conversions.hexToRGBString ", " (builtins.substring 1 6 theme.surface)})";
|
||||
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)})";
|
||||
palette = config.colorScheme.palette;
|
||||
convert = inputs.nix-colors.lib.conversions.hexToRGBString;
|
||||
|
||||
backgroundRgb = "rgb(${convert ", " palette.base00 })";
|
||||
surfaceRgb = "rgb(${convert ", " palette.base02 })";
|
||||
foregroundRgb = "rgb(${convert ", " palette.base0B })";
|
||||
foregroundMutedRgb = "rgb(${convert ", " palette.base04 })";
|
||||
in {
|
||||
programs.hyprlock = {
|
||||
enable = true;
|
||||
|
||||
@@ -4,17 +4,15 @@
|
||||
...
|
||||
}: let
|
||||
cfg = config.omarchy;
|
||||
themes = import ../themes.nix;
|
||||
theme = themes.${cfg.theme};
|
||||
in {
|
||||
services.mako = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
background-color = theme.background;
|
||||
text-color = theme.foreground;
|
||||
border-color = theme.accent;
|
||||
progress-color = theme.primary;
|
||||
background-color = "#${config.colorScheme.palette.base00}";
|
||||
text-color = "${config.colorScheme.palette.base05}";
|
||||
border-color = "${config.colorScheme.palette.base04}";
|
||||
progress-color = "${config.colorScheme.palette.base0D}";
|
||||
|
||||
width = 420;
|
||||
height = 110;
|
||||
|
||||
@@ -12,7 +12,7 @@ in {
|
||||
profiles.default = {
|
||||
userSettings =
|
||||
{
|
||||
"workbench.colorTheme" = theme.vscode_theme;
|
||||
"workbench.colorTheme" = theme.vscode-theme;
|
||||
"vim.useCtrlKeys" = false;
|
||||
"editor.minimap.enabled" = false;
|
||||
}
|
||||
|
||||
@@ -2,11 +2,7 @@
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.omarchy;
|
||||
themes = import ../themes.nix;
|
||||
theme = themes.${cfg.theme};
|
||||
in {
|
||||
}: {
|
||||
home.file = {
|
||||
".config/waybar/" = {
|
||||
source = ../../config/waybar;
|
||||
@@ -15,8 +11,8 @@ in {
|
||||
".config/waybar/theme.css" = {
|
||||
text = ''
|
||||
* {
|
||||
color: ${theme.foreground};
|
||||
background-color: ${theme.background};
|
||||
color: #${config.colorScheme.palette.base05};
|
||||
background-color: #${config.colorScheme.palette.base00};
|
||||
}
|
||||
'';
|
||||
};
|
||||
@@ -75,7 +71,7 @@ in {
|
||||
on-click = "alacritty -e btop";
|
||||
};
|
||||
clock = {
|
||||
format = "{:%A %H:%M}";
|
||||
format = "{:%A %I:%M %p}";
|
||||
format-alt = "{:%d %B W%V %Y}";
|
||||
tooltip = false;
|
||||
};
|
||||
|
||||
@@ -2,11 +2,7 @@
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.omarchy;
|
||||
themes = import ../themes.nix;
|
||||
theme = themes.${cfg.theme};
|
||||
in {
|
||||
}: {
|
||||
home.file = {
|
||||
".config/wofi/style.css" = {
|
||||
text = ''
|
||||
@@ -18,7 +14,7 @@ in {
|
||||
window {
|
||||
margin: 0px;
|
||||
padding: 20px;
|
||||
background-color: ${theme.background};
|
||||
background-color: #${config.colorScheme.palette.base00};
|
||||
opacity: 0.95;
|
||||
}
|
||||
|
||||
@@ -26,28 +22,28 @@ in {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: none;
|
||||
background-color: ${theme.background};
|
||||
background-color: #${config.colorScheme.palette.base00};
|
||||
}
|
||||
|
||||
#outer-box {
|
||||
margin: 0;
|
||||
padding: 20px;
|
||||
border: none;
|
||||
background-color: ${theme.background};
|
||||
background-color: #${config.colorScheme.palette.base00};
|
||||
}
|
||||
|
||||
#scroll {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: none;
|
||||
background-color: ${theme.background};
|
||||
background-color: #${config.colorScheme.palette.base00};
|
||||
}
|
||||
|
||||
#input {
|
||||
margin: 0;
|
||||
padding: 10px;
|
||||
border: none;
|
||||
background-color: ${theme.background};
|
||||
background-color: #${config.colorScheme.palette.base00};
|
||||
color: @text;
|
||||
}
|
||||
|
||||
@@ -60,11 +56,11 @@ in {
|
||||
#text {
|
||||
margin: 5px;
|
||||
border: none;
|
||||
color: ${theme.foreground_muted}
|
||||
color: #${config.colorScheme.palette.base06};
|
||||
}
|
||||
|
||||
#entry {
|
||||
background-color: ${theme.background};
|
||||
background-color: #${config.colorScheme.palette.base00};
|
||||
}
|
||||
|
||||
#entry:selected {
|
||||
@@ -73,7 +69,7 @@ in {
|
||||
}
|
||||
|
||||
#entry:selected #text {
|
||||
color: ${theme.primary_variant};
|
||||
color: #${config.colorScheme.palette.base02};
|
||||
}
|
||||
|
||||
#entry image {
|
||||
|
||||
Reference in New Issue
Block a user