aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Weigl-Bosker <stefan@s00.xyz>2025-04-07 15:50:45 -0400
committerStefan Weigl-Bosker <stefan@s00.xyz>2025-04-07 15:50:45 -0400
commit3be52f10d1ed9844da116ad9364099d72cb6ded4 (patch)
tree092b460f8c065396c7bd9dbcb808f0e9d46f2ca4
parent993ee553170d01d3d0e7bcef7afc05b80f15b10a (diff)
downloadhome-3be52f10d1ed9844da116ad9364099d72cb6ded4.tar.gz
added colorscheme modularity
-rw-r--r--modules/colors/default-dark.nix35
-rw-r--r--modules/colors/default.nix1
-rw-r--r--modules/fzf.nix21
-rw-r--r--modules/lazygit.nix22
-rw-r--r--modules/mako.nix7
-rw-r--r--modules/sway/default.nix57
-rw-r--r--modules/tmux/default.nix11
-rw-r--r--modules/tofi.nix15
-rw-r--r--void/home.nix3
9 files changed, 107 insertions, 65 deletions
diff --git a/modules/colors/default-dark.nix b/modules/colors/default-dark.nix
new file mode 100644
index 0000000..725ccd3
--- /dev/null
+++ b/modules/colors/default-dark.nix
@@ -0,0 +1,35 @@
+{ config, lib, pkgs, ... }:
+let
+ cfg = config.modules.colors.default-dark;
+ hexColorRegex = ''#([0-9a-fA-F]{3}){1,2}'';
+ hexColor = {
+ type = lib.types.strMatching hexColorRegex;
+ };
+in
+{
+ options.modules.colors.default-dark = {
+ enable = lib.mkEnableOption "default-dark theme";
+ };
+
+ config = lib.mkIf cfg.enable {
+ modules.scheme = {
+ name = "base16-default-dark";
+ base00 = "#181818";
+ base01 = "#282828";
+ base02 = "#383838";
+ base03 = "#585858";
+ base04 = "#b8b8b8";
+ base05 = "#d8d8d8";
+ base06 = "#e8e8e8";
+ base07 = "#f8f8f8";
+ base08 = "#ab4642";
+ base09 = "#dc9656";
+ base0A = "#f7ca88";
+ base0B = "#a1b56c";
+ base0C = "#86c1b9";
+ base0D = "#7cafc2";
+ base0E = "#ba8baf";
+ base0F = "#a16946";
+ };
+ };
+}
diff --git a/modules/colors/default.nix b/modules/colors/default.nix
index 07e47d4..954e743 100644
--- a/modules/colors/default.nix
+++ b/modules/colors/default.nix
@@ -2,5 +2,6 @@
{
imports = [
./mountain.nix
+ ./default-dark.nix
];
}
diff --git a/modules/fzf.nix b/modules/fzf.nix
index 7449874..13487e0 100644
--- a/modules/fzf.nix
+++ b/modules/fzf.nix
@@ -1,6 +1,7 @@
{ config, lib, pkgs, ... }:
let
cfg = config.modules.fzf;
+ scheme = config.modules.scheme;
in
{
options.modules.fzf = {
@@ -16,17 +17,17 @@ in
enable = true;
enableZshIntegration = true;
colors = {
- bg = "#0f0f0f";
- # "bg+" = "#0f0f0f";
- "bg+" = "#151515";
- spinner = "#8aabac";
- hl = "#8f8aac";
- header = "#8f8aac";
- info = "#aca98a";
- pointer = "#8aabac";
+ bg = scheme.base00;
+ # "bg+" = scheme.base00;
+ "bg+" = scheme.base01; # "#151515";
+ spinner = scheme.base0C;
+ hl = scheme.base0D;
+ header = scheme.base0D;
+ info = scheme.base0A;
+ pointer = scheme.base0C;
marker = "red";
- fg = "#cacaca";
- "fg+" = "#8aac8b";
+ fg = scheme.base05;
+ "fg+" = scheme.base0B;
};
tmux = {
enableShellIntegration = true;
diff --git a/modules/lazygit.nix b/modules/lazygit.nix
index cf5275e..c4a1bde 100644
--- a/modules/lazygit.nix
+++ b/modules/lazygit.nix
@@ -1,6 +1,7 @@
{ config, lib, pkgs, ... }:
let
cfg = config.modules.lazygit;
+ scheme = config.modules.scheme;
in
{
options.modules.lazygit = {
@@ -41,17 +42,16 @@ in
showRandomTip = false;
border = "single";
theme = {
- # activeBorderColor = [ "#8f8aac" "bold" ];
- activeBorderColor = [ "#8f8aac" "bold" ];
- inactiveBorderColor = [ "#4c4c4c" ];
- searchingActiveBorderColor = [ "#ceb188" ];
- optionsTextColor = [ "#8f8aac" ];
- selectedLineBgColor = [ "#262626" ];
- cherryPickedCommitBgColor = [ "#4c4c4c" ];
- cherryPickedCommitFgColor = [ "#8f8aac" ];
- markedBaseCommitFgColor = [ "#8f8aac" ];
- unstagedChangesColor = [ "#ac8a8c" ];
- defaultFgColor = [ "#cacaca" ];
+ activeBorderColor = [ scheme.base0D "bold" ];
+ inactiveBorderColor = [ scheme.base03 ];
+ searchingActiveBorderColor = [ scheme.base09 ];
+ optionsTextColor = [ scheme.base0D ];
+ selectedLineBgColor = [ scheme.base02 ];
+ cherryPickedCommitBgColor = [ scheme.base03 ];
+ cherryPickedCommitFgColor = [ scheme.base0D ];
+ markedBaseCommitFgColor = [ scheme.base0D ];
+ unstagedChangesColor = [ scheme.base0F ];
+ defaultFgColor = [ scheme.base05 ];
};
git = {
paging.useConfig = true;
diff --git a/modules/mako.nix b/modules/mako.nix
index 3e0c4ac..ccc65b7 100644
--- a/modules/mako.nix
+++ b/modules/mako.nix
@@ -1,6 +1,7 @@
{ config, lib, pkgs, ... }:
let
cfg = config.modules.mako;
+ scheme = config.modules.scheme;
in
{
options.modules.mako = {
@@ -10,9 +11,9 @@ in
config = {
services.mako = lib.mkIf cfg.enable {
enable = true;
- backgroundColor = "#0f0f0fff";
- textColor = "#cacacaff";
- borderColor = "#a39ec4ff";
+ backgroundColor = scheme.base00;
+ textColor = scheme.base05;
+ borderColor = scheme.base0D; #"#a39ec4ff";
borderSize = 1;
defaultTimeout = 20000;
font = "BerkeleyMonoPatched Nerd Font 10";
diff --git a/modules/sway/default.nix b/modules/sway/default.nix
index 9294688..2280fd1 100644
--- a/modules/sway/default.nix
+++ b/modules/sway/default.nix
@@ -1,6 +1,7 @@
{ self, config, lib, pkgs, nixgl, ... }:
let
cfg = config.modules.sway;
+ scheme = config.modules.scheme;
in
{
options.modules.sway = {
@@ -87,27 +88,27 @@ in
};
colors = {
- background = "#0f0f0f";
+ background = scheme.base00;
focused = {
- border = "#191919" ;
- background = "#191919";
- text = "#ac8aac";
- indicator = "#282a2e";
- childBorder = "#8aac8b";
+ border = scheme.base01;
+ background = scheme.base01;
+ text = scheme.base0E;
+ indicator = scheme.base02;
+ childBorder = scheme.base0B;
};
focusedInactive = {
- border = "#191919";
- background = "#191919";
- text = "#ac8aac";
+ border = scheme.base01;
+ background = scheme.base01;
+ text = scheme.base0E;
indicator = "#282a2e";
- childBorder = "#191919";
+ childBorder = scheme.base01;
};
unfocused = {
- border = "#191919";
- background = "#191919";
- text = "#4c4c4c";
+ border = scheme.base01;
+ background = scheme.base01;
+ text = scheme.base03;
indicator = "#0f0f0f";
- childBorder = "#191919";
+ childBorder = scheme.base01;
};
};
@@ -124,27 +125,27 @@ in
separator_symbol " "
'';
colors = {
- background = "#0d0d0d";
- statusline = "#cacaca";
+ background = scheme.base00; # "#0d0d0d";
+ statusline = scheme.base05;
focusedWorkspace = {
- border = "#0d0d0d";
- background = "#0d0d0d";
- text = "#ac8aac";
+ border = scheme.base00; # "#0d0d0d";
+ background = scheme.base00; # "#0d0d0d";
+ text = scheme.base0E;
};
activeWorkspace = {
- border = "#0d0d0d";
- background = "#0d0d0d";
- text = "#4c4c4c";
+ border = scheme.base00; # "#0d0d0d";
+ background = scheme.base00; # "#0d0d0d";
+ text = scheme.base03;
};
inactiveWorkspace = {
- border = "#0d0d0d";
- background = "#0d0d0d";
- text = "#4c4c4c";
+ border = scheme.base00; # "#0d0d0d";
+ background = scheme.base00; # "#0d0d0d";
+ text = scheme.base03;
};
bindingMode = {
- border = "#0d0d0d";
- background = "#0d0d0d";
- text = "#ac8aac";
+ border = scheme.base00; # "#0d0d0d";
+ background = scheme.base00; # "#0d0d0d";
+ text = scheme.base0E;
};
};
}];
diff --git a/modules/tmux/default.nix b/modules/tmux/default.nix
index 1897b89..6db4af6 100644
--- a/modules/tmux/default.nix
+++ b/modules/tmux/default.nix
@@ -1,6 +1,7 @@
{ config, lib, pkgs, ... }:
let
cfg = config.modules.tmux;
+ scheme = config.modules.scheme;
in
{
options.modules.tmux = {
@@ -110,12 +111,12 @@ in
bind l display-message
bind K select-layout -E
- set -g status-style bg='#191919',fg='#4c4c4c'
- set-window-option -g window-status-style fg='#4c4c4c',bg='#191919'
- set-window-option -g window-status-current-style fg='#ac8aac',bg='#191919'
+ set -g status-style bg='${scheme.base01}',fg='${scheme.base03}'
+ set-window-option -g window-status-style fg='${scheme.base03}',bg='${scheme.base01}'
+ set-window-option -g window-status-current-style fg='${scheme.base0E}',bg='${scheme.base01}'
- set -g pane-border-style fg='#191919'
- set -g pane-active-border-style fg='#191919'
+ set -g pane-border-style fg='${scheme.base01}'
+ set -g pane-active-border-style fg='${scheme.base01}'
'';
};
diff --git a/modules/tofi.nix b/modules/tofi.nix
index 83910e1..801aecf 100644
--- a/modules/tofi.nix
+++ b/modules/tofi.nix
@@ -1,6 +1,7 @@
{ config, lib, pkgs, ... }:
let
cfg = config.modules.tofi;
+ scheme = config.modules.scheme;
in
{
options.modules.tofi = {
@@ -20,22 +21,22 @@ in
width = "60%";
height = "50%";
- "text-color" = "#cacaca";
- "placeholder-color" = "#0f0f0f";
+ "text-color" = scheme.base05;
+ "placeholder-color" = scheme.base00;
- "selection-background" = "#151515FF";
- "selection-color" = "#8aac8b";
+ "selection-background" = scheme.base01; #151515
+ "selection-color" = scheme.base0B;
"selection-background-padding"= "0, -1";
"text-cursor-style"="bar";
- "text-cursor-color"="#cacaca";
+ "text-cursor-color"=scheme.base05;
"prompt-text"="\"\"";
- "background-color"="#0f0f0f";
+ "background-color"=scheme.base00;
"outline-width" = 2;
- "outline-color" = "#191919";
+ "outline-color" = scheme.base01;
"border-width"=0;
"border-color"="#00000000";
diff --git a/void/home.nix b/void/home.nix
index 7a9fba5..5f03175 100644
--- a/void/home.nix
+++ b/void/home.nix
@@ -17,7 +17,8 @@
};
foot.enable = true;
- colors.mountain.enable = true;
+ # colors.mountain.enable = true;
+ colors.default-dark.enable = true;
gpg.enable = true;
pass = {