From c6f9e14fa815147f80096f5b4728301e01d9c343 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Sun, 23 Apr 2023 23:37:00 -0300 Subject: [PATCH] waybar: add vpn indicator --- user/waybar.nix | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/user/waybar.nix b/user/waybar.nix index 572f7d2..e23e724 100644 --- a/user/waybar.nix +++ b/user/waybar.nix @@ -20,6 +20,7 @@ in "tray" "custom/caffeine" "pulseaudio" + "custom/vpn" "network" "battery" ]; @@ -109,6 +110,17 @@ in interval = 1; tooltip = false; }; + "custom/vpn" = { + format = "{}"; + exec = '' + nmcli -f type con show --active | grep wireguard > /dev/null \ + && echo "" \ + || echo "" + ''; + on-click = "mullvad connect"; + interval = 1; + tooltip = false; + }; pulseaudio = { interval = 5; tooltip = false; @@ -194,6 +206,7 @@ in #backlight, #bluetooth, #pulseaudio, + #custom-vpn, #custom-mail, #custom-spigot, #custom-updates, @@ -217,12 +230,17 @@ in { font-size: ${toString font.size.big}px; } + #custom-vpn { + margin: 0; + margin-right: 1px; + } #network, + #custom-vpn, #pulseaudio, #custom-caffeine { margin-top:-1px; - font-size:16px; + font-size:17px; } #mpd, #window,