diff options
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%"; +} |
