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
|
||||
cfg = config.local.style;
|
||||
inherit (cfg) scheme;
|
||||
in {
|
||||
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
|
||||
* @description A dark, rounded discord theme. Updated to use base16 colors.
|
||||
|
@ -31,7 +30,7 @@ in {
|
|||
--font: 'gg sans';
|
||||
|
||||
/* top left corner text */
|
||||
--corner-text: '${scheme.name}';
|
||||
--corner-text: '${cfg.scheme.name}';
|
||||
|
||||
/* color of status indicators and window controls */
|
||||
--online-indicator: ${base0B}; /* change to #23a55a for default green */
|
||||
|
|
|
@ -10,34 +10,35 @@ in {
|
|||
programs.foot.settings.colors = let
|
||||
# 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;
|
||||
in {
|
||||
background = palette.base00;
|
||||
foreground = palette.base05;
|
||||
in
|
||||
with palette; {
|
||||
background = base00;
|
||||
foreground = base05;
|
||||
|
||||
regular0 = palette.base00;
|
||||
regular1 = palette.base08;
|
||||
regular2 = palette.base0B;
|
||||
regular3 = palette.base0A;
|
||||
regular4 = palette.base0D;
|
||||
regular5 = palette.base0E;
|
||||
regular6 = palette.base0C;
|
||||
regular7 = palette.base05;
|
||||
regular0 = base00;
|
||||
regular1 = base08;
|
||||
regular2 = base0B;
|
||||
regular3 = base0A;
|
||||
regular4 = base0D;
|
||||
regular5 = base0E;
|
||||
regular6 = base0C;
|
||||
regular7 = base05;
|
||||
|
||||
bright0 = palette.base02;
|
||||
bright1 = palette.base08;
|
||||
bright2 = palette.base0B;
|
||||
bright3 = palette.base0A;
|
||||
bright4 = palette.base0D;
|
||||
bright5 = palette.base0E;
|
||||
bright6 = palette.base0C;
|
||||
bright7 = palette.base07;
|
||||
bright0 = base02;
|
||||
bright1 = base08;
|
||||
bright2 = base0B;
|
||||
bright3 = base0A;
|
||||
bright4 = base0D;
|
||||
bright5 = base0E;
|
||||
bright6 = base0C;
|
||||
bright7 = base07;
|
||||
|
||||
"16" = palette.base09;
|
||||
"17" = palette.base0F;
|
||||
"18" = palette.base01;
|
||||
"19" = palette.base02;
|
||||
"20" = palette.base04;
|
||||
"21" = palette.base06;
|
||||
"16" = base09;
|
||||
"17" = base0F;
|
||||
"18" = base01;
|
||||
"19" = base02;
|
||||
"20" = base04;
|
||||
"21" = base06;
|
||||
};
|
||||
}
|
||||
];
|
||||
|
|
|
@ -12,14 +12,14 @@ in {
|
|||
main = {
|
||||
font = "sans-serif:size=16";
|
||||
};
|
||||
colors = {
|
||||
background = "${scheme.palette.base01}f2";
|
||||
text = "${scheme.palette.base05}ff";
|
||||
match = "${scheme.palette.base0E}ff";
|
||||
selection = "${scheme.palette.base03}ff";
|
||||
selection-text = "${scheme.palette.base06}ff";
|
||||
selection-match = "${scheme.palette.base0E}ff";
|
||||
border = "${scheme.palette.base0E}ff";
|
||||
colors = with scheme.palette; {
|
||||
background = "${base01}f2";
|
||||
text = "${base05}ff";
|
||||
match = "${base0E}ff";
|
||||
selection = "${base03}ff";
|
||||
selection-text = "${base06}ff";
|
||||
selection-match = "${base0E}ff";
|
||||
border = "${base0E}ff";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
scheme,
|
||||
...
|
||||
}: let
|
||||
cfg = config.local.style;
|
||||
|
|
|
@ -5,10 +5,12 @@
|
|||
...
|
||||
}: let
|
||||
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 {
|
||||
config.home-manager.sharedModules = lib.mkIf cfg.enable [
|
||||
config.home-manager.sharedModules = with rgbaPalette;
|
||||
lib.mkIf cfg.enable [
|
||||
{
|
||||
programs.hyprlock = {
|
||||
settings = {
|
||||
|
@ -30,7 +32,7 @@ in {
|
|||
monitor = "";
|
||||
text = "Layout: $LAYOUT";
|
||||
font_size = 25;
|
||||
color = rgbaPalette.base05;
|
||||
color = base05;
|
||||
|
||||
position = "30, -30";
|
||||
halign = "left";
|
||||
|
@ -40,7 +42,7 @@ in {
|
|||
monitor = "";
|
||||
text = "$TIME";
|
||||
font_size = 90;
|
||||
color = rgbaPalette.base05;
|
||||
color = base05;
|
||||
|
||||
position = "-30, 0";
|
||||
halign = "right";
|
||||
|
@ -50,7 +52,7 @@ in {
|
|||
monitor = "";
|
||||
text = "cmd[update:43200000] date +\"%A, %d %B %Y\"";
|
||||
font_size = 25;
|
||||
color = rgbaPalette.base05;
|
||||
color = base05;
|
||||
|
||||
position = "-30, -150";
|
||||
halign = "right";
|
||||
|
@ -62,7 +64,7 @@ in {
|
|||
monitor = "";
|
||||
path = "${cfg.avatar}"; # Replace with your avatar path
|
||||
size = 100;
|
||||
border_color = rgbaPalette.base0D;
|
||||
border_color = base0D;
|
||||
|
||||
position = "0, 75";
|
||||
halign = "center";
|
||||
|
@ -79,19 +81,21 @@ in {
|
|||
dots_spacing = 0.2;
|
||||
dots_center = true;
|
||||
|
||||
outer_color = rgbaPalette.base0D;
|
||||
inner_color = rgbaPalette.base02;
|
||||
font_color = rgbaPalette.base05;
|
||||
outer_color = base0D;
|
||||
inner_color = base02;
|
||||
font_color = 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>";
|
||||
|
||||
# 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 = rgbaPalette.base0D;
|
||||
fail_color = rgbaPalette.base08;
|
||||
check_color = base0D;
|
||||
fail_color = base08;
|
||||
|
||||
fail_text = "<i>$FAIL <b>($ATTEMPTS)</b></i>";
|
||||
capslock_color = rgbaPalette.base0E;
|
||||
capslock_color = base0E;
|
||||
|
||||
position = "0, -47";
|
||||
halign = "center";
|
||||
|
|
|
@ -4,40 +4,40 @@
|
|||
...
|
||||
}: let
|
||||
cfg = config.local.style;
|
||||
inherit (cfg) scheme;
|
||||
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;
|
||||
line-color = scheme.palette.base01;
|
||||
ring-color = scheme.palette.base05;
|
||||
text-color = scheme.palette.base05;
|
||||
inside-color = base01;
|
||||
line-color = base01;
|
||||
ring-color = base05;
|
||||
text-color = base05;
|
||||
|
||||
inside-clear-color = scheme.palette.base0A;
|
||||
line-clear-color = scheme.palette.base0A;
|
||||
ring-clear-color = scheme.palette.base00;
|
||||
text-clear-color = scheme.palette.base00;
|
||||
inside-clear-color = base0A;
|
||||
line-clear-color = base0A;
|
||||
ring-clear-color = base00;
|
||||
text-clear-color = base00;
|
||||
|
||||
inside-caps-lock-color = scheme.palette.base03;
|
||||
line-caps-lock-color = scheme.palette.base03;
|
||||
ring-caps-lock-color = scheme.palette.base00;
|
||||
text-caps-lock-color = scheme.palette.base00;
|
||||
inside-caps-lock-color = base03;
|
||||
line-caps-lock-color = base03;
|
||||
ring-caps-lock-color = base00;
|
||||
text-caps-lock-color = base00;
|
||||
|
||||
inside-ver-color = scheme.palette.base0D;
|
||||
line-ver-color = scheme.palette.base0D;
|
||||
ring-ver-color = scheme.palette.base00;
|
||||
text-ver-color = scheme.palette.base00;
|
||||
inside-ver-color = base0D;
|
||||
line-ver-color = base0D;
|
||||
ring-ver-color = base00;
|
||||
text-ver-color = base00;
|
||||
|
||||
inside-wrong-color = scheme.palette.base08;
|
||||
line-wrong-color = scheme.palette.base08;
|
||||
ring-wrong-color = scheme.palette.base00;
|
||||
text-wrong-color = scheme.palette.base00;
|
||||
inside-wrong-color = base08;
|
||||
line-wrong-color = base08;
|
||||
ring-wrong-color = base00;
|
||||
text-wrong-color = base00;
|
||||
|
||||
caps-lock-bs-hl-color = scheme.palette.base08;
|
||||
caps-lock-key-hl-color = scheme.palette.base0D;
|
||||
bs-hl-color = scheme.palette.base08;
|
||||
key-hl-color = scheme.palette.base0D;
|
||||
caps-lock-bs-hl-color = base08;
|
||||
caps-lock-key-hl-color = base0D;
|
||||
bs-hl-color = base08;
|
||||
key-hl-color = base0D;
|
||||
|
||||
separator-color = "#00000000"; # transparent
|
||||
layout-bg-color = "#00000050"; # semi-transparent black
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
in {
|
||||
config.home-manager.sharedModules = lib.mkIf cfg.enable [
|
||||
{
|
||||
programs.waybar.style = ''
|
||||
programs.waybar.style = with cfg.scheme.palette; ''
|
||||
* {
|
||||
font-family: "0xProto Nerd Font";
|
||||
font-size: 16px;
|
||||
|
@ -20,8 +20,8 @@ in {
|
|||
background: rgba(0,0,0,0);
|
||||
}
|
||||
#workspaces {
|
||||
color: ${cfg.scheme.palette.base00};
|
||||
background: ${cfg.scheme.palette.base01};
|
||||
color: ${base00};
|
||||
background: ${base01};
|
||||
margin: 4px 4px;
|
||||
padding: 5px 5px;
|
||||
border-radius: 16px;
|
||||
|
@ -31,8 +31,8 @@ in {
|
|||
padding: 0px 5px;
|
||||
margin: 0px 3px;
|
||||
border-radius: 16px;
|
||||
color: ${cfg.scheme.palette.base00};
|
||||
background: linear-gradient(45deg, ${cfg.scheme.palette.base08}, ${cfg.scheme.palette.base0D});
|
||||
color: ${base00};
|
||||
background: linear-gradient(45deg, ${base08}, ${base0D});
|
||||
opacity: 0.5;
|
||||
transition: ${betterTransition};
|
||||
}
|
||||
|
@ -41,8 +41,8 @@ in {
|
|||
padding: 0px 5px;
|
||||
margin: 0px 3px;
|
||||
border-radius: 16px;
|
||||
color: ${cfg.scheme.palette.base00};
|
||||
background: linear-gradient(45deg, ${cfg.scheme.palette.base08}, ${cfg.scheme.palette.base0D});
|
||||
color: ${base00};
|
||||
background: linear-gradient(45deg, ${base08}, ${base0D});
|
||||
transition: ${betterTransition};
|
||||
opacity: 1.0;
|
||||
min-width: 40px;
|
||||
|
@ -50,33 +50,33 @@ in {
|
|||
#workspaces button:hover {
|
||||
font-weight: bold;
|
||||
border-radius: 16px;
|
||||
color: ${cfg.scheme.palette.base00};
|
||||
background: linear-gradient(45deg, ${cfg.scheme.palette.base08}, ${cfg.scheme.palette.base0D});
|
||||
color: ${base00};
|
||||
background: linear-gradient(45deg, ${base08}, ${base0D});
|
||||
opacity: 0.8;
|
||||
transition: ${betterTransition};
|
||||
}
|
||||
tooltip {
|
||||
background: ${cfg.scheme.palette.base00};
|
||||
border: 1px solid ${cfg.scheme.palette.base08};
|
||||
background: ${base00};
|
||||
border: 1px solid ${base08};
|
||||
border-radius: 12px;
|
||||
}
|
||||
tooltip label {
|
||||
color: ${cfg.scheme.palette.base08};
|
||||
color: ${base08};
|
||||
}
|
||||
#window, #pulseaudio, #cpu, #memory, #idle_inhibitor {
|
||||
font-weight: bold;
|
||||
margin: 4px 0px;
|
||||
margin-left: 7px;
|
||||
padding: 0px 18px;
|
||||
background: ${cfg.scheme.palette.base00};
|
||||
color: ${cfg.scheme.palette.base05};
|
||||
background: ${base00};
|
||||
color: ${base05};
|
||||
border-radius: 24px 10px 24px 10px;
|
||||
}
|
||||
#network, #battery,
|
||||
#custom-swaync, #tray, #custom-power {
|
||||
font-weight: bold;
|
||||
background: ${cfg.scheme.palette.base00};
|
||||
color: ${cfg.scheme.palette.base05};
|
||||
background: ${base00};
|
||||
color: ${base05};
|
||||
margin: 4px 0px;
|
||||
margin-right: 7px;
|
||||
border-radius: 10px 24px 10px 24px;
|
||||
|
@ -84,8 +84,8 @@ in {
|
|||
}
|
||||
#clock {
|
||||
font-weight: bold;
|
||||
color: ${cfg.scheme.palette.base00};
|
||||
background: linear-gradient(90deg, ${cfg.scheme.palette.base0E}, ${cfg.scheme.palette.base0C});
|
||||
color: ${base00};
|
||||
background: linear-gradient(90deg, ${base0E}, ${base0C});
|
||||
margin: 0px;
|
||||
padding: 0px 15px 0px 30px;
|
||||
border-radius: 0px 0px 0px 40px;
|
||||
|
|
Loading…
Reference in a new issue