aboutsummaryrefslogtreecommitdiffstats
path: root/modules/desktop/polybar/module/vpn-separator.nix
blob: 244452266e8253ea12965d52c78e4945f8dae7ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# VPN-separator - Visual separator for VPN module
{
  pkgs,
  lib,
  config,
}:
with config.scheme.withHashtag;
{
  type = "custom/script";
  exec-if = "${pkgs.runtimeShell} -c '${lib.getExe' pkgs.iproute2 "ip"} a | ${lib.getExe pkgs.gnugrep} -q tun0'";
  exec = "echo VPN";
  interval = 5;

  format = " %{F${base03}}%{T3}│%{T-}%{F-} ";
  label = "%output%";
}