feat: add vpn waybar module [WIP]

This commit is contained in:
Swarsel 2024-08-10 16:50:31 +02:00
parent a298c8cfac
commit 1a10605599
Signed by: swarsel
GPG key ID: 26A54C31F2A4FD84
2 changed files with 11 additions and 0 deletions

View file

@ -177,6 +177,7 @@ The most part of this configuration is done here: [[#h:0bf51f63-01c0-4053-a591-7
"mpris" "mpris"
"custom/left-arrow-light" "custom/left-arrow-light"
"network" "network"
"custom/vpn"
"custom/left-arrow-dark" "custom/left-arrow-dark"
"pulseaudio" "pulseaudio"
"custom/left-arrow-light" "custom/left-arrow-light"
@ -211,6 +212,7 @@ The most part of this configuration is done here: [[#h:0bf51f63-01c0-4053-a591-7
"mpris" "mpris"
"custom/left-arrow-light" "custom/left-arrow-light"
"network" "network"
"custom/vpn"
"custom/left-arrow-dark" "custom/left-arrow-dark"
"pulseaudio" "pulseaudio"
"custom/left-arrow-light" "custom/left-arrow-light"
@ -7800,6 +7802,13 @@ The rest of this configuration is found here:
on-click-right = "kitty -o confirm_os_window_close=0 btm"; on-click-right = "kitty -o confirm_os_window_close=0 btm";
}; };
"custom/vpn" = {
format = "VPN ";
exec = "echo '{\"class\": \"connected\"}'";
exec-if = "test -d /proc/sys/net/ipv4/conf/tun0";
return-type = "json";
interval = 5;
};
battery = { battery = {
states = { states = {
"warning" = 60; "warning" = 60;

View file

@ -38,6 +38,7 @@
# "mpris" # "mpris"
# "custom/left-arrow-light" # "custom/left-arrow-light"
# "network" # "network"
# "custom/vpn"
# "custom/left-arrow-dark" # "custom/left-arrow-dark"
# "pulseaudio" # "pulseaudio"
# "custom/left-arrow-light" # "custom/left-arrow-light"
@ -61,6 +62,7 @@
"mpris" "mpris"
"custom/left-arrow-light" "custom/left-arrow-light"
"network" "network"
"custom/vpn"
"custom/left-arrow-dark" "custom/left-arrow-dark"
"pulseaudio" "pulseaudio"
"custom/left-arrow-light" "custom/left-arrow-light"