From 04baba4433bd74c4333ccb08951ab0b39911b6fe Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Sun, 12 Apr 2026 15:23:20 -0700 Subject: [PATCH] Fix taffybar startup and restore pill colors --- dotfiles/config/taffybar/end-widget-solid.css | 50 +++++++++++++++++++ dotfiles/config/taffybar/taffybar | 2 +- dotfiles/config/taffybar/taffybar.css | 1 + nixos/taffybar.nix | 11 ++-- 4 files changed, 60 insertions(+), 4 deletions(-) create mode 100644 dotfiles/config/taffybar/end-widget-solid.css diff --git a/dotfiles/config/taffybar/end-widget-solid.css b/dotfiles/config/taffybar/end-widget-solid.css new file mode 100644 index 00000000..eda2dbb0 --- /dev/null +++ b/dotfiles/config/taffybar/end-widget-solid.css @@ -0,0 +1,50 @@ +/* Final pass overrides for end-widget pill chrome. + * + * This is loaded after the main bar/theme CSS so the end-widget palette stays + * vivid even if earlier rules or theme rendering make the pills read too + * transparent on some hosts. + */ + +.outer-pad.end-widget.end-slot-1 { + background-color: rgb(50, 60, 160); + background-image: none; + border-color: rgb(90, 100, 210); +} + +.outer-pad.end-widget.end-slot-2 { + background-color: rgb(110, 45, 160); + background-image: none; + border-color: rgb(155, 85, 210); +} + +.outer-pad.end-widget.end-slot-3 { + background-color: rgb(25, 130, 75); + background-image: none; + border-color: rgb(55, 190, 115); +} + +.outer-pad.end-widget.end-slot-4 { + background-color: rgb(20, 120, 140); + background-image: none; + border-color: rgb(50, 175, 200); +} + +.outer-pad.end-widget.end-slot-5 { + background-color: rgb(160, 40, 70); + background-image: none; + border-color: rgb(210, 80, 115); +} + +.outer-pad.sni-tray { + background-color: rgb(65, 70, 100); + background-image: none; + border-color: rgb(110, 115, 160); +} + +.outer-pad.end-widget, +.outer-pad.sni-tray { + box-shadow: + inset 0 1px 0 rgba(255, 255, 255, 0.10), + inset 0 0 0 1px rgba(255, 255, 255, 0.10), + 0 10px 24px rgba(0, 0, 0, 0.30); +} diff --git a/dotfiles/config/taffybar/taffybar b/dotfiles/config/taffybar/taffybar index f95f366b..263cd2af 160000 --- a/dotfiles/config/taffybar/taffybar +++ b/dotfiles/config/taffybar/taffybar @@ -1 +1 @@ -Subproject commit f95f366bbdf3c651cf7b1e18bedcdc5d8f8064a4 +Subproject commit 263cd2af9c316cf3a98f338128ea4a434e5b64bd diff --git a/dotfiles/config/taffybar/taffybar.css b/dotfiles/config/taffybar/taffybar.css index 07de69ed..abf0f16d 100644 --- a/dotfiles/config/taffybar/taffybar.css +++ b/dotfiles/config/taffybar/taffybar.css @@ -1,5 +1,6 @@ @import url("theme.css"); @import url("end-widget-colors.css"); +@import url("end-widget-solid.css"); /* Widget/layout styling for taffybar. * diff --git a/nixos/taffybar.nix b/nixos/taffybar.nix index c253f3c6..34fbe86e 100644 --- a/nixos/taffybar.nix +++ b/nixos/taffybar.nix @@ -1,4 +1,4 @@ -{ config, inputs, pkgs, makeEnable, ... }: +{ config, inputs, lib, pkgs, makeEnable, ... }: let skipTaffybarInKde = pkgs.writeShellScript "skip-taffybar-in-kde" '' current_desktop="''${XDG_CURRENT_DESKTOP:-}" @@ -40,7 +40,7 @@ makeEnable config "myModules.taffybar" false { ]; home-manager.sharedModules = [ - { + ({ lib, ... }: { services."status-notifier-watcher".enable = true; # home-manager's module defaults to nixpkgs' status-notifier-item, which can lag. # Point it at the pinned flake version instead. @@ -59,6 +59,11 @@ makeEnable config "myModules.taffybar" false { package = inputs.imalison-taffybar.defaultPackage.${pkgs.stdenv.hostPlatform.system}; }; xdg.configFile."systemd/user/taffybar.service".force = true; + home.activation.removeStaleTaffybarOverride = + lib.hm.dag.entryAfter [ "writeBoundary" ] '' + rm -f "$HOME/.config/systemd/user/taffybar.service.d/override.conf" + rmdir --ignore-fail-on-non-empty "$HOME/.config/systemd/user/taffybar.service.d" 2>/dev/null || true + ''; systemd.user.services.taffybar.Service = { ExecCondition = "${skipTaffybarInKde}"; # Temporary startup debugging: keep a plain-text log outside journald so @@ -66,6 +71,6 @@ makeEnable config "myModules.taffybar" false { StandardOutput = "append:/tmp/taffybar-service.log"; StandardError = "append:/tmp/taffybar-service.log"; }; - } + }) ]; }