waybar: add vpn indicator

This commit is contained in:
Leonardo Eugênio 2023-04-23 23:37:00 -03:00
parent 5f95eb8b1a
commit c6f9e14fa8

View file

@ -20,6 +20,7 @@ in
"tray" "tray"
"custom/caffeine" "custom/caffeine"
"pulseaudio" "pulseaudio"
"custom/vpn"
"network" "network"
"battery" "battery"
]; ];
@ -109,6 +110,17 @@ in
interval = 1; interval = 1;
tooltip = false; 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 = { pulseaudio = {
interval = 5; interval = 5;
tooltip = false; tooltip = false;
@ -194,6 +206,7 @@ in
#backlight, #backlight,
#bluetooth, #bluetooth,
#pulseaudio, #pulseaudio,
#custom-vpn,
#custom-mail, #custom-mail,
#custom-spigot, #custom-spigot,
#custom-updates, #custom-updates,
@ -217,12 +230,17 @@ in
{ {
font-size: ${toString font.size.big}px; font-size: ${toString font.size.big}px;
} }
#custom-vpn {
margin: 0;
margin-right: 1px;
}
#network, #network,
#custom-vpn,
#pulseaudio, #pulseaudio,
#custom-caffeine #custom-caffeine
{ {
margin-top:-1px; margin-top:-1px;
font-size:16px; font-size:17px;
} }
#mpd, #mpd,
#window, #window,