From f7e5b10c543ad47515cb50c839bb6fb3273d7938 Mon Sep 17 00:00:00 2001 From: Arpit Chakladar Date: Sun, 26 Jul 2026 00:24:33 +0530 Subject: refactor(waybar): extract mkIcon helper, drop per-module iconColor parameter - Add lib.nix with shared mkIcon function for consistent icon formatting - Pass mkIcon instead of per-module iconColor to all modules - Define iconColor locally within each module - Fix battery icon character --- modules/desktop/waybar/module/vpn.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'modules/desktop/waybar/module/vpn.nix') diff --git a/modules/desktop/waybar/module/vpn.nix b/modules/desktop/waybar/module/vpn.nix index 52f41d4..aa74499 100644 --- a/modules/desktop/waybar/module/vpn.nix +++ b/modules/desktop/waybar/module/vpn.nix @@ -2,13 +2,14 @@ config, lib, pkgs, - iconColor, + mkIcon, }: with config.scheme.withHashtag; let + iconColor = base0C; vpnCheckScript = pkgs.writeShellScript "vpn-check" '' if ${lib.getExe' pkgs.iproute2 "ip"} a | ${lib.getExe pkgs.gnugrep} -q tun0; then - printf ' VPN' + printf '${mkIcon iconColor ""} VPN' fi ''; in -- cgit v1.2.3