waybar now sets accent colour properly

Removed mustache file, moved into nix expression directly
This commit is contained in:
Evie Litherland-Smith 2024-02-29 16:28:49 +00:00
parent b8261b71b9
commit d9eee524a9
2 changed files with 95 additions and 121 deletions

View file

@ -1,117 +0,0 @@
/*
*
* Base16 {{scheme-name}}
* Author: {{scheme-author}}
*
*/
@define-color base00 #{{base00-hex}};
@define-color base01 #{{base01-hex}};
@define-color base02 #{{base02-hex}};
@define-color base03 #{{base03-hex}};
@define-color base04 #{{base04-hex}};
@define-color base05 #{{base05-hex}};
@define-color base06 #{{base06-hex}};
@define-color base07 #{{base07-hex}};
@define-color base08 #{{base08-hex}};
@define-color base09 #{{base09-hex}};
@define-color base0A #{{base0A-hex}};
@define-color base0B #{{base0B-hex}};
@define-color base0C #{{base0C-hex}};
@define-color base0D #{{base0D-hex}};
@define-color base0E #{{base0E-hex}};
@define-color base0F #{{base0F-hex}};
/*
* Personal waybar config follows
*/
* {
all: unset;
font-size: 20px;
font-family: "Iosevka Nerd Font";
}
window {
background: transparent;
}
window > box {
color: @base05;
background: alpha(@base00, 0.5);
margin: 10px 10px 0px;
padding: 0px;
border: 1px solid @base0E;
border-radius: 10px;
}
tooltip {
color: @base05;
/* Temp set alpha to 1.0 until I can sort out blurls issue */
background: alpha(@base00, 1);
border: 1px solid @base0E;
border-radius: 10px;
padding: 5px;
margin: 0px;
}
#workspaces,
#window,
#mpris,
#pulseaudio,
#network,
#bluetooth,
#backlight,
#battery,
#clock,
#custom-notification,
#custom-weather,
#tray {
margin: 0px;
padding: 1px 5px;
}
#workspaces,
#window,
#mpris,
#tray,
#backlight,
#battery,
#custom-weather {
color: @base05;
}
#workspaces button {
background: transparent;
color: @base05;
margin: 0px;
padding: 0px 5px;
}
#workspaces button.empty {
color: @base03;
}
#workspaces button.active {
color: @base0E;
}
#workspaces button.urgent {
color: @base09;
}
#custom-notification {
color: @base08;
}
#pulseaudio {
color: @base09;
}
#network {
color: @base0A;
}
#bluetooth {
color: @base0B;
}
#clock.calendar {
color: @base0C;
}
#clock {
color: @base0D;
}

View file

@ -1,6 +1,7 @@
{ {
config, config,
pkgs, pkgs,
accentColour ? "base07",
... ...
}: { }: {
systemd.user.targets.tray.Unit = { systemd.user.targets.tray.Unit = {
@ -9,10 +10,6 @@
}; };
programs.waybar = { programs.waybar = {
enable = true; enable = true;
style = builtins.readFile (config.lib.stylix.colors {
template = ./default.mustache;
extension = ".css";
});
systemd = { systemd = {
enable = true; enable = true;
target = "hyprland-session.target"; target = "hyprland-session.target";
@ -219,5 +216,99 @@
spacing = 5; spacing = 5;
}; };
}; };
style = with config.stylix;
with config.lib.stylix.colors.withHashtag; let
accent = config.lib.stylix.colors.withHashtag.${accentColour};
in ''
* {
all: unset;
font-size: ${toString fonts.sizes.desktop}px;
font-family: "${fonts.monospace.name}";
}
window {
background: transparent;
}
window > box {
color: ${base05};
background: alpha(${base00}, 0.5);
margin: 10px 10px 0px;
padding: 0px;
border: 1px solid ${accent};
border-radius: 10px;
}
tooltip {
color: ${base05};
/* Temp set alpha to 1.0 until I can sort out blurls issue */
background: alpha(${base00}, 1);
border: 1px solid ${accent};
border-radius: 10px;
padding: 5px;
margin: 0px;
}
#workspaces,
#window,
#mpris,
#pulseaudio,
#network,
#bluetooth,
#backlight,
#battery,
#clock,
#custom-notification,
#custom-weather,
#tray {
margin: 0px;
padding: 1px 5px;
}
#workspaces,
#window,
#mpris,
#tray,
#backlight,
#battery,
#custom-weather {
color: ${base05};
}
#workspaces button {
background: transparent;
color: ${base05};
margin: 0px;
padding: 0px 5px;
}
#workspaces button.empty {
color: ${base03};
}
#workspaces button.active {
color: ${accent};
}
#workspaces button.urgent {
color: ${base09};
}
#custom-notification {
color: ${base08};
}
#pulseaudio {
color: ${base09};
}
#network {
color: ${base0A};
}
#bluetooth {
color: ${base0B};
}
#clock.calendar {
color: ${base0C};
}
#clock {
color: ${base0D};
}
'';
}; };
} }