nixosModules/style: use with cfg.scheme.palette; when declaring colors
This commit is contained in:
parent
ec2bce3b55
commit
9f0cdf9f98
7 changed files with 181 additions and 178 deletions
|
@ -4,11 +4,10 @@
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
cfg = config.local.style;
|
cfg = config.local.style;
|
||||||
inherit (cfg) scheme;
|
|
||||||
in {
|
in {
|
||||||
config.home-manager.sharedModules = lib.mkIf cfg.enable [
|
config.home-manager.sharedModules = lib.mkIf cfg.enable [
|
||||||
{
|
{
|
||||||
xdg.configFile."equibop/themes/midnight-base16.css".text = with scheme.palette; ''
|
xdg.configFile."equibop/themes/midnight-base16.css".text = with cfg.scheme.palette; ''
|
||||||
/**
|
/**
|
||||||
* @name Midnight-base16
|
* @name Midnight-base16
|
||||||
* @description A dark, rounded discord theme. Updated to use base16 colors.
|
* @description A dark, rounded discord theme. Updated to use base16 colors.
|
||||||
|
@ -31,7 +30,7 @@ in {
|
||||||
--font: 'gg sans';
|
--font: 'gg sans';
|
||||||
|
|
||||||
/* top left corner text */
|
/* top left corner text */
|
||||||
--corner-text: '${scheme.name}';
|
--corner-text: '${cfg.scheme.name}';
|
||||||
|
|
||||||
/* color of status indicators and window controls */
|
/* color of status indicators and window controls */
|
||||||
--online-indicator: ${base0B}; /* change to #23a55a for default green */
|
--online-indicator: ${base0B}; /* change to #23a55a for default green */
|
||||||
|
|
|
@ -10,35 +10,36 @@ in {
|
||||||
programs.foot.settings.colors = let
|
programs.foot.settings.colors = let
|
||||||
# because someone thought this was a great idea: https://github.com/tinted-theming/schemes/commit/61058a8d2e2bd4482b53d57a68feb56cdb991f0b
|
# because someone thought this was a great idea: https://github.com/tinted-theming/schemes/commit/61058a8d2e2bd4482b53d57a68feb56cdb991f0b
|
||||||
palette = builtins.mapAttrs (_: color: lib.removePrefix "#" color) cfg.scheme.palette;
|
palette = builtins.mapAttrs (_: color: lib.removePrefix "#" color) cfg.scheme.palette;
|
||||||
in {
|
in
|
||||||
background = palette.base00;
|
with palette; {
|
||||||
foreground = palette.base05;
|
background = base00;
|
||||||
|
foreground = base05;
|
||||||
|
|
||||||
regular0 = palette.base00;
|
regular0 = base00;
|
||||||
regular1 = palette.base08;
|
regular1 = base08;
|
||||||
regular2 = palette.base0B;
|
regular2 = base0B;
|
||||||
regular3 = palette.base0A;
|
regular3 = base0A;
|
||||||
regular4 = palette.base0D;
|
regular4 = base0D;
|
||||||
regular5 = palette.base0E;
|
regular5 = base0E;
|
||||||
regular6 = palette.base0C;
|
regular6 = base0C;
|
||||||
regular7 = palette.base05;
|
regular7 = base05;
|
||||||
|
|
||||||
bright0 = palette.base02;
|
bright0 = base02;
|
||||||
bright1 = palette.base08;
|
bright1 = base08;
|
||||||
bright2 = palette.base0B;
|
bright2 = base0B;
|
||||||
bright3 = palette.base0A;
|
bright3 = base0A;
|
||||||
bright4 = palette.base0D;
|
bright4 = base0D;
|
||||||
bright5 = palette.base0E;
|
bright5 = base0E;
|
||||||
bright6 = palette.base0C;
|
bright6 = base0C;
|
||||||
bright7 = palette.base07;
|
bright7 = base07;
|
||||||
|
|
||||||
"16" = palette.base09;
|
"16" = base09;
|
||||||
"17" = palette.base0F;
|
"17" = base0F;
|
||||||
"18" = palette.base01;
|
"18" = base01;
|
||||||
"19" = palette.base02;
|
"19" = base02;
|
||||||
"20" = palette.base04;
|
"20" = base04;
|
||||||
"21" = palette.base06;
|
"21" = base06;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,14 +12,14 @@ in {
|
||||||
main = {
|
main = {
|
||||||
font = "sans-serif:size=16";
|
font = "sans-serif:size=16";
|
||||||
};
|
};
|
||||||
colors = {
|
colors = with scheme.palette; {
|
||||||
background = "${scheme.palette.base01}f2";
|
background = "${base01}f2";
|
||||||
text = "${scheme.palette.base05}ff";
|
text = "${base05}ff";
|
||||||
match = "${scheme.palette.base0E}ff";
|
match = "${base0E}ff";
|
||||||
selection = "${scheme.palette.base03}ff";
|
selection = "${base03}ff";
|
||||||
selection-text = "${scheme.palette.base06}ff";
|
selection-text = "${base06}ff";
|
||||||
selection-match = "${scheme.palette.base0E}ff";
|
selection-match = "${base0E}ff";
|
||||||
border = "${scheme.palette.base0E}ff";
|
border = "${base0E}ff";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
scheme,
|
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
cfg = config.local.style;
|
cfg = config.local.style;
|
||||||
|
|
|
@ -5,101 +5,105 @@
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
cfg = config.local.style;
|
cfg = config.local.style;
|
||||||
inherit (cfg) scheme;
|
|
||||||
rgbaPalette = builtins.mapAttrs (_: c: (lib'.rgba c 1)) scheme.palette;
|
# hyprlock takes colors such as rgb[a](r, g, b [, a])
|
||||||
|
rgbaPalette = builtins.mapAttrs (_: c: (lib'.rgba c 1)) cfg.scheme.palette;
|
||||||
in {
|
in {
|
||||||
config.home-manager.sharedModules = lib.mkIf cfg.enable [
|
config.home-manager.sharedModules = with rgbaPalette;
|
||||||
{
|
lib.mkIf cfg.enable [
|
||||||
programs.hyprlock = {
|
{
|
||||||
settings = {
|
programs.hyprlock = {
|
||||||
background = [
|
settings = {
|
||||||
{
|
background = [
|
||||||
path = "screenshot";
|
{
|
||||||
blur_passes = 3;
|
path = "screenshot";
|
||||||
blur_size = 8;
|
blur_passes = 3;
|
||||||
}
|
blur_size = 8;
|
||||||
];
|
}
|
||||||
|
];
|
||||||
|
|
||||||
general = {
|
general = {
|
||||||
disable_loading_bar = true;
|
disable_loading_bar = true;
|
||||||
hide_cursor = true;
|
hide_cursor = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
label = [
|
label = [
|
||||||
{
|
{
|
||||||
|
monitor = "";
|
||||||
|
text = "Layout: $LAYOUT";
|
||||||
|
font_size = 25;
|
||||||
|
color = base05;
|
||||||
|
|
||||||
|
position = "30, -30";
|
||||||
|
halign = "left";
|
||||||
|
valign = "top";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
monitor = "";
|
||||||
|
text = "$TIME";
|
||||||
|
font_size = 90;
|
||||||
|
color = base05;
|
||||||
|
|
||||||
|
position = "-30, 0";
|
||||||
|
halign = "right";
|
||||||
|
valign = "top";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
monitor = "";
|
||||||
|
text = "cmd[update:43200000] date +\"%A, %d %B %Y\"";
|
||||||
|
font_size = 25;
|
||||||
|
color = base05;
|
||||||
|
|
||||||
|
position = "-30, -150";
|
||||||
|
halign = "right";
|
||||||
|
valign = "top";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
image = {
|
||||||
monitor = "";
|
monitor = "";
|
||||||
text = "Layout: $LAYOUT";
|
path = "${cfg.avatar}"; # Replace with your avatar path
|
||||||
font_size = 25;
|
size = 100;
|
||||||
color = rgbaPalette.base05;
|
border_color = base0D;
|
||||||
|
|
||||||
position = "30, -30";
|
position = "0, 75";
|
||||||
halign = "left";
|
|
||||||
valign = "top";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
monitor = "";
|
|
||||||
text = "$TIME";
|
|
||||||
font_size = 90;
|
|
||||||
color = rgbaPalette.base05;
|
|
||||||
|
|
||||||
position = "-30, 0";
|
|
||||||
halign = "right";
|
|
||||||
valign = "top";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
monitor = "";
|
|
||||||
text = "cmd[update:43200000] date +\"%A, %d %B %Y\"";
|
|
||||||
font_size = 25;
|
|
||||||
color = rgbaPalette.base05;
|
|
||||||
|
|
||||||
position = "-30, -150";
|
|
||||||
halign = "right";
|
|
||||||
valign = "top";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
image = {
|
|
||||||
monitor = "";
|
|
||||||
path = "${cfg.avatar}"; # Replace with your avatar path
|
|
||||||
size = 100;
|
|
||||||
border_color = rgbaPalette.base0D;
|
|
||||||
|
|
||||||
position = "0, 75";
|
|
||||||
halign = "center";
|
|
||||||
valign = "center";
|
|
||||||
};
|
|
||||||
|
|
||||||
input-field = [
|
|
||||||
{
|
|
||||||
monitor = "";
|
|
||||||
|
|
||||||
size = "300, 60";
|
|
||||||
outline_thickness = 4;
|
|
||||||
dots_size = 0.2;
|
|
||||||
dots_spacing = 0.2;
|
|
||||||
dots_center = true;
|
|
||||||
|
|
||||||
outer_color = rgbaPalette.base0D;
|
|
||||||
inner_color = rgbaPalette.base02;
|
|
||||||
font_color = rgbaPalette.base05;
|
|
||||||
|
|
||||||
fade_on_empty = false;
|
|
||||||
placeholder_text = "<span foreground=\"#${scheme.palette.base03}\"><i> Logged in as </i><span foreground=\"#${scheme.palette.base0D}\">$USER</span></span>";
|
|
||||||
|
|
||||||
hide_input = false;
|
|
||||||
check_color = rgbaPalette.base0D;
|
|
||||||
fail_color = rgbaPalette.base08;
|
|
||||||
|
|
||||||
fail_text = "<i>$FAIL <b>($ATTEMPTS)</b></i>";
|
|
||||||
capslock_color = rgbaPalette.base0E;
|
|
||||||
|
|
||||||
position = "0, -47";
|
|
||||||
halign = "center";
|
halign = "center";
|
||||||
valign = "center";
|
valign = "center";
|
||||||
}
|
};
|
||||||
];
|
|
||||||
|
input-field = [
|
||||||
|
{
|
||||||
|
monitor = "";
|
||||||
|
|
||||||
|
size = "300, 60";
|
||||||
|
outline_thickness = 4;
|
||||||
|
dots_size = 0.2;
|
||||||
|
dots_spacing = 0.2;
|
||||||
|
dots_center = true;
|
||||||
|
|
||||||
|
outer_color = base0D;
|
||||||
|
inner_color = base02;
|
||||||
|
font_color = base05;
|
||||||
|
|
||||||
|
fade_on_empty = false;
|
||||||
|
|
||||||
|
# the span elements still use #RRGGBB, so we use scheme directly
|
||||||
|
placeholder_text = "<span foreground=\"#${cfg.scheme.palette.base03}\"><i> Logged in as </i><span foreground=\"#${cfg.scheme.palette.base0D}\">$USER</span></span>";
|
||||||
|
|
||||||
|
hide_input = false;
|
||||||
|
check_color = base0D;
|
||||||
|
fail_color = base08;
|
||||||
|
|
||||||
|
fail_text = "<i>$FAIL <b>($ATTEMPTS)</b></i>";
|
||||||
|
capslock_color = base0E;
|
||||||
|
|
||||||
|
position = "0, -47";
|
||||||
|
halign = "center";
|
||||||
|
valign = "center";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
}
|
];
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,44 +4,44 @@
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
cfg = config.local.style;
|
cfg = config.local.style;
|
||||||
inherit (cfg) scheme;
|
|
||||||
in {
|
in {
|
||||||
config.home-manager.sharedModules = lib.mkIf cfg.enable [
|
config.home-manager.sharedModules = with cfg.scheme.palette;
|
||||||
{
|
lib.mkIf cfg.enable [
|
||||||
programs.swaylock.settings = {
|
{
|
||||||
inside-color = scheme.palette.base01;
|
programs.swaylock.settings = {
|
||||||
line-color = scheme.palette.base01;
|
inside-color = base01;
|
||||||
ring-color = scheme.palette.base05;
|
line-color = base01;
|
||||||
text-color = scheme.palette.base05;
|
ring-color = base05;
|
||||||
|
text-color = base05;
|
||||||
|
|
||||||
inside-clear-color = scheme.palette.base0A;
|
inside-clear-color = base0A;
|
||||||
line-clear-color = scheme.palette.base0A;
|
line-clear-color = base0A;
|
||||||
ring-clear-color = scheme.palette.base00;
|
ring-clear-color = base00;
|
||||||
text-clear-color = scheme.palette.base00;
|
text-clear-color = base00;
|
||||||
|
|
||||||
inside-caps-lock-color = scheme.palette.base03;
|
inside-caps-lock-color = base03;
|
||||||
line-caps-lock-color = scheme.palette.base03;
|
line-caps-lock-color = base03;
|
||||||
ring-caps-lock-color = scheme.palette.base00;
|
ring-caps-lock-color = base00;
|
||||||
text-caps-lock-color = scheme.palette.base00;
|
text-caps-lock-color = base00;
|
||||||
|
|
||||||
inside-ver-color = scheme.palette.base0D;
|
inside-ver-color = base0D;
|
||||||
line-ver-color = scheme.palette.base0D;
|
line-ver-color = base0D;
|
||||||
ring-ver-color = scheme.palette.base00;
|
ring-ver-color = base00;
|
||||||
text-ver-color = scheme.palette.base00;
|
text-ver-color = base00;
|
||||||
|
|
||||||
inside-wrong-color = scheme.palette.base08;
|
inside-wrong-color = base08;
|
||||||
line-wrong-color = scheme.palette.base08;
|
line-wrong-color = base08;
|
||||||
ring-wrong-color = scheme.palette.base00;
|
ring-wrong-color = base00;
|
||||||
text-wrong-color = scheme.palette.base00;
|
text-wrong-color = base00;
|
||||||
|
|
||||||
caps-lock-bs-hl-color = scheme.palette.base08;
|
caps-lock-bs-hl-color = base08;
|
||||||
caps-lock-key-hl-color = scheme.palette.base0D;
|
caps-lock-key-hl-color = base0D;
|
||||||
bs-hl-color = scheme.palette.base08;
|
bs-hl-color = base08;
|
||||||
key-hl-color = scheme.palette.base0D;
|
key-hl-color = base0D;
|
||||||
|
|
||||||
separator-color = "#00000000"; # transparent
|
separator-color = "#00000000"; # transparent
|
||||||
layout-bg-color = "#00000050"; # semi-transparent black
|
layout-bg-color = "#00000050"; # semi-transparent black
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
in {
|
in {
|
||||||
config.home-manager.sharedModules = lib.mkIf cfg.enable [
|
config.home-manager.sharedModules = lib.mkIf cfg.enable [
|
||||||
{
|
{
|
||||||
programs.waybar.style = ''
|
programs.waybar.style = with cfg.scheme.palette; ''
|
||||||
* {
|
* {
|
||||||
font-family: "0xProto Nerd Font";
|
font-family: "0xProto Nerd Font";
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
|
@ -20,8 +20,8 @@ in {
|
||||||
background: rgba(0,0,0,0);
|
background: rgba(0,0,0,0);
|
||||||
}
|
}
|
||||||
#workspaces {
|
#workspaces {
|
||||||
color: ${cfg.scheme.palette.base00};
|
color: ${base00};
|
||||||
background: ${cfg.scheme.palette.base01};
|
background: ${base01};
|
||||||
margin: 4px 4px;
|
margin: 4px 4px;
|
||||||
padding: 5px 5px;
|
padding: 5px 5px;
|
||||||
border-radius: 16px;
|
border-radius: 16px;
|
||||||
|
@ -31,8 +31,8 @@ in {
|
||||||
padding: 0px 5px;
|
padding: 0px 5px;
|
||||||
margin: 0px 3px;
|
margin: 0px 3px;
|
||||||
border-radius: 16px;
|
border-radius: 16px;
|
||||||
color: ${cfg.scheme.palette.base00};
|
color: ${base00};
|
||||||
background: linear-gradient(45deg, ${cfg.scheme.palette.base08}, ${cfg.scheme.palette.base0D});
|
background: linear-gradient(45deg, ${base08}, ${base0D});
|
||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
transition: ${betterTransition};
|
transition: ${betterTransition};
|
||||||
}
|
}
|
||||||
|
@ -41,8 +41,8 @@ in {
|
||||||
padding: 0px 5px;
|
padding: 0px 5px;
|
||||||
margin: 0px 3px;
|
margin: 0px 3px;
|
||||||
border-radius: 16px;
|
border-radius: 16px;
|
||||||
color: ${cfg.scheme.palette.base00};
|
color: ${base00};
|
||||||
background: linear-gradient(45deg, ${cfg.scheme.palette.base08}, ${cfg.scheme.palette.base0D});
|
background: linear-gradient(45deg, ${base08}, ${base0D});
|
||||||
transition: ${betterTransition};
|
transition: ${betterTransition};
|
||||||
opacity: 1.0;
|
opacity: 1.0;
|
||||||
min-width: 40px;
|
min-width: 40px;
|
||||||
|
@ -50,33 +50,33 @@ in {
|
||||||
#workspaces button:hover {
|
#workspaces button:hover {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
border-radius: 16px;
|
border-radius: 16px;
|
||||||
color: ${cfg.scheme.palette.base00};
|
color: ${base00};
|
||||||
background: linear-gradient(45deg, ${cfg.scheme.palette.base08}, ${cfg.scheme.palette.base0D});
|
background: linear-gradient(45deg, ${base08}, ${base0D});
|
||||||
opacity: 0.8;
|
opacity: 0.8;
|
||||||
transition: ${betterTransition};
|
transition: ${betterTransition};
|
||||||
}
|
}
|
||||||
tooltip {
|
tooltip {
|
||||||
background: ${cfg.scheme.palette.base00};
|
background: ${base00};
|
||||||
border: 1px solid ${cfg.scheme.palette.base08};
|
border: 1px solid ${base08};
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
}
|
}
|
||||||
tooltip label {
|
tooltip label {
|
||||||
color: ${cfg.scheme.palette.base08};
|
color: ${base08};
|
||||||
}
|
}
|
||||||
#window, #pulseaudio, #cpu, #memory, #idle_inhibitor {
|
#window, #pulseaudio, #cpu, #memory, #idle_inhibitor {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
margin: 4px 0px;
|
margin: 4px 0px;
|
||||||
margin-left: 7px;
|
margin-left: 7px;
|
||||||
padding: 0px 18px;
|
padding: 0px 18px;
|
||||||
background: ${cfg.scheme.palette.base00};
|
background: ${base00};
|
||||||
color: ${cfg.scheme.palette.base05};
|
color: ${base05};
|
||||||
border-radius: 24px 10px 24px 10px;
|
border-radius: 24px 10px 24px 10px;
|
||||||
}
|
}
|
||||||
#network, #battery,
|
#network, #battery,
|
||||||
#custom-swaync, #tray, #custom-power {
|
#custom-swaync, #tray, #custom-power {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
background: ${cfg.scheme.palette.base00};
|
background: ${base00};
|
||||||
color: ${cfg.scheme.palette.base05};
|
color: ${base05};
|
||||||
margin: 4px 0px;
|
margin: 4px 0px;
|
||||||
margin-right: 7px;
|
margin-right: 7px;
|
||||||
border-radius: 10px 24px 10px 24px;
|
border-radius: 10px 24px 10px 24px;
|
||||||
|
@ -84,8 +84,8 @@ in {
|
||||||
}
|
}
|
||||||
#clock {
|
#clock {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: ${cfg.scheme.palette.base00};
|
color: ${base00};
|
||||||
background: linear-gradient(90deg, ${cfg.scheme.palette.base0E}, ${cfg.scheme.palette.base0C});
|
background: linear-gradient(90deg, ${base0E}, ${base0C});
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
padding: 0px 15px 0px 30px;
|
padding: 0px 15px 0px 30px;
|
||||||
border-radius: 0px 0px 0px 40px;
|
border-radius: 0px 0px 0px 40px;
|
||||||
|
|
Loading…
Reference in a new issue