mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-25 01:51:54 -05:00
waybar: cleanup
This commit is contained in:
parent
1e45916647
commit
7f1ee92024
|
@ -250,30 +250,7 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
style = let
|
||||
hexToRGBA = hex: let
|
||||
r = builtins.substring 0 2 hex;
|
||||
g = builtins.substring 2 2 hex;
|
||||
b = builtins.substring 4 2 hex;
|
||||
a = "ff"; # Default alpha to fully opaque if not provided
|
||||
in {
|
||||
r = builtins.fromJSON "0x${r}";
|
||||
g = builtins.fromJSON "0x${g}";
|
||||
b = builtins.fromJSON "0x${b}";
|
||||
a = builtins.fromJSON "0x${a}";
|
||||
};
|
||||
|
||||
rgba = hex: let
|
||||
rgbaValues = hexToRGBA hex;
|
||||
in [
|
||||
rgbaValues.r
|
||||
rgbaValues.g
|
||||
rgbaValues.b
|
||||
(rgbaValues.a / 255.0) # Convert alpha from 0-255 to 0-1
|
||||
];
|
||||
|
||||
backgroundColor = builtins.concatStringsSep "," (rgba "${cfg.theme.colors.background}CC");
|
||||
in ''
|
||||
style = ''
|
||||
* {
|
||||
border: none;
|
||||
border-radius: 0px;
|
||||
|
@ -351,7 +328,7 @@ in {
|
|||
#submap,
|
||||
#mode {
|
||||
color: ${cfg.theme.colors.text};
|
||||
background: rgba(255, 123, 99, 08);
|
||||
background: rgba(255, 123, 99, 0.8);
|
||||
}
|
||||
'';
|
||||
|
||||
|
|
Loading…
Reference in a new issue