aboutsummaryrefslogtreecommitdiffstats
path: root/modules/desktop/polybar/module/vpn-separator.nix
blob: 0904b6cfec7eed48f28956065e34149d6229a62d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
{
  pkgs,
  lib,
  config,
}:

# VPN - Visual separator for VPN module
with config.scheme.withHashtag;
{
  type = "custom/script";
  exec-if = "${lib.getExe config.programs.zsh.package} -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%";
}