From ad40311347d69e0389775e07c197f6dd1842da49 Mon Sep 17 00:00:00 2001 From: kat witch Date: Fri, 27 Aug 2021 18:02:03 +0100 Subject: [PATCH] Waybar fix --- config/modules/home/theme.nix | 12 ++++-- config/users/kat/sway/waybar/waybar.sass | 50 ++++++++++++------------ config/users/kat/sway/wofi/wofi.sass | 2 +- 3 files changed, 34 insertions(+), 30 deletions(-) diff --git a/config/modules/home/theme.nix b/config/modules/home/theme.nix index b15b9bd9..0207e17c 100644 --- a/config/modules/home/theme.nix +++ b/config/modules/home/theme.nix @@ -18,8 +18,11 @@ let cfg = config.kw.theme; in base16 = mkOption { type = types.attrsOf types.str; }; + base16t = mkOption { + type = types.attrsOf types.str; + }; alpha = mkOption { - type = types.str; + type = types.float; }; font = { name = mkOption { @@ -37,10 +40,9 @@ let cfg = config.kw.theme; in }; variables = mkOption { type = types.attrsOf types.str; - default = (cfg.base16 // { + default = (cfg.base16 // cfg.base16t // { font = cfg.font.name; font_size = cfg.font.size_css; - inherit (cfg) alpha; }); }; }; @@ -48,7 +50,9 @@ let cfg = config.kw.theme; in kw.theme = { base16 = lib.mapAttrs' (k: v: lib.nameValuePair k "#${v.hex.rgb}") (lib.filterAttrs (n: _: lib.hasInfix "base" n) config.lib.arc.base16.schemeForAlias.default); - alpha = "80"; + base16t = lib.mapAttrs' (k: v: lib.nameValuePair "${k}t" "rgba(${toString v.rgb.r}, ${toString v.rgb.g}, ${toString v.rgb.b}, ${toString cfg.alpha})") + (lib.filterAttrs (n: _: lib.hasInfix "base" n) config.lib.arc.base16.schemeForAlias.default); + alpha = 0.5; }; lib.kw.sassTemplate = { name, src }: let diff --git a/config/users/kat/sway/waybar/waybar.sass b/config/users/kat/sway/waybar/waybar.sass index 5d190b1e..bc6fbe5f 100644 --- a/config/users/kat/sway/waybar/waybar.sass +++ b/config/users/kat/sway/waybar/waybar.sass @@ -19,86 +19,86 @@ #clock @extend %extend_1 - background: $base00$alpha - color: $base07$alpha + background: $base00t + color: $base07 &.arc - background: $base0B$alpha + background: $base0Bt &.miku - background: $base0C$alpha + background: $base0Ct &.hex - background: $base0F$alpha + background: $base0Ft #memory @extend %extend_1 - background: $base09$alpha + background: $base09t #cpu @extend %extend_1 - background: $base08$alpha + background: $base08t #temperature @extend %extend_1 - background: $base0B$alpha + background: $base0Bt #pulseaudio @extend %extend_1 - background: $base06$alpha + background: $base06t &.muted - background: $base03$alpha + background: $base03t #network @extend %extend_1 - background: $base0C$alpha + background: $base0Ct #mpd @extend %extend_1 #backlight @extend %extend_1 - background: $base0D$alpha + background: $base0Dt #battery @extend %extend_1 - background: $base0C$alpha + background: $base0Ct #custom-weather @extend %extend_1 - background: $base00$alpha + background: $base00t #custom-konawall @extend %extend_1 &.enabled - background: $base0E$alpha + background: $base0Et &.disabled - background: $base0D$alpha + background: $base0Dt #custom-gpg-status @extend %extend_1 &.enabled - background: $base0B$alpha + background: $base0Bt &.disabled - background: $base08$alpha + background: $base08t #idle_inhibitor @extend %extend_1 &.activated - background: $base0E$alpha + background: $base0Et &.deactivated - background: $base0D$alpha + background: $base0Dt #tray @extend %extend_1 - background: $base00$alpha + background: $base00t border-top-right-radius: 1em border-bottom-right-radius: 1em padding: 0 10px 0 8px menu - background: $base00$alpha + background: $base00t border-radius: 1em .modules-left @@ -140,7 +140,7 @@ border-bottom-right-radius: 1em #workspaces - background: $base00$alpha + background: $base00t padding: 0 border-radius: 1em button @@ -165,13 +165,13 @@ color: $base0C #window - background: $base00$alpha + background: $base00t padding: 0 8px color: $base06 border-bottom: 2px solid transparent tooltip - background: $base00$alpha + background: $base00t border-radius: 1em label color: $base07 diff --git a/config/users/kat/sway/wofi/wofi.sass b/config/users/kat/sway/wofi/wofi.sass index 82782374..1fa3156a 100644 --- a/config/users/kat/sway/wofi/wofi.sass +++ b/config/users/kat/sway/wofi/wofi.sass @@ -11,7 +11,7 @@ window font-family: $font - background: $base00$alpha + background: $base00t border-radius: 1em font-size: $font_size color: $base07