diff options
| author | Arpit Chakladar <arpitchakladar@proton.me> | 2026-04-14 20:16:52 +0530 |
|---|---|---|
| committer | Arpit Chakladar <arpitchakladar@proton.me> | 2026-04-14 20:16:52 +0530 |
| commit | 9381bed4a50bf05e786232e1b50c0731b7b8c85b (patch) | |
| tree | 76b54d55a6fc5017cd5c1d2934d1b3d2b3b046c1 /modules/desktop/polybar/module/vpn.nix | |
| parent | 5e51e6c642767bf6fef80a6a28dc5cd57a649cfa (diff) | |
| download | home-manager-config-9381bed4a50bf05e786232e1b50c0731b7b8c85b.tar.gz home-manager-config-9381bed4a50bf05e786232e1b50c0731b7b8c85b.zip | |
added vpn connected indicator to polybar
Diffstat (limited to 'modules/desktop/polybar/module/vpn.nix')
| -rw-r--r-- | modules/desktop/polybar/module/vpn.nix | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/modules/desktop/polybar/module/vpn.nix b/modules/desktop/polybar/module/vpn.nix new file mode 100644 index 0000000..dc0467e --- /dev/null +++ b/modules/desktop/polybar/module/vpn.nix @@ -0,0 +1,17 @@ +{ + pkgs, + lib, + config, +}: + +# VPN - Just indicates if VPN is connected with openvpn +with config.scheme.withHashtag; +{ + type = "custom/script"; + exec-if = "${lib.getExe pkgs.zsh} -c '${lib.getExe' pkgs.iproute2 "ip"} a | ${lib.getExe pkgs.gnugrep} -q tun0'"; + exec = "echo VPN"; + interval = 5; + + format = "%{T2}%{F${base03}} %{F-}%{T-} <label>"; + label = "%output%"; +} |
