diff options
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/home/christian.nix | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/home/christian.nix b/modules/home/christian.nix index 64403dc..377e8ef 100644 --- a/modules/home/christian.nix +++ b/modules/home/christian.nix @@ -9,6 +9,7 @@ imports = [ ./nvim ]; options.custom.xmobarBattery = lib.mkEnableOption "xmobar battery widget"; + options.custom.xmobarVpn = lib.mkEnableOption "xmobar VPN indicator"; config = { home.stateVersion = "25.11"; @@ -128,10 +129,13 @@ "-l", "red", "-m", "#4eb4fa", "-h", "green"] 600 ''} + ${lib.optionalString config.custom.xmobarVpn '' + , Run Com "sh" ["-c", "ip link show wg0 2>/dev/null | grep -q 'UP' && echo '<fc=green>vpn: on</fc>' || echo '<fc=red>vpn: off</fc>'"] "vpn" 30 + ''} ] , sepChar = "%" , alignSep = "}{" - , template = " %XMonadLog% | ${lib.optionalString config.custom.xmobarBattery "%battery% | "}%cpu% | %memory% | %wlan0% }{%date% " + , template = " %XMonadLog% | ${lib.optionalString config.custom.xmobarBattery "%battery% | "}${lib.optionalString config.custom.xmobarVpn "%vpn% | "}%cpu% | %memory% | %wlan0% }{%date% " } ''; }; |
