From 1a106055994f2a51f6bfe38ed5b417861ef095a0 Mon Sep 17 00:00:00 2001 From: Swarsel Date: Sat, 10 Aug 2024 16:50:31 +0200 Subject: [PATCH] feat: add vpn waybar module [WIP] --- SwarselSystems.org | 9 +++++++++ profiles/TEMPLATE/home.nix | 2 ++ 2 files changed, 11 insertions(+) diff --git a/SwarselSystems.org b/SwarselSystems.org index 64b56e7..feb1848 100644 --- a/SwarselSystems.org +++ b/SwarselSystems.org @@ -177,6 +177,7 @@ The most part of this configuration is done here: [[#h:0bf51f63-01c0-4053-a591-7 "mpris" "custom/left-arrow-light" "network" + "custom/vpn" "custom/left-arrow-dark" "pulseaudio" "custom/left-arrow-light" @@ -211,6 +212,7 @@ The most part of this configuration is done here: [[#h:0bf51f63-01c0-4053-a591-7 "mpris" "custom/left-arrow-light" "network" + "custom/vpn" "custom/left-arrow-dark" "pulseaudio" "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"; }; + "custom/vpn" = { + format = "VPN "; + exec = "echo '{\"class\": \"connected\"}'"; + exec-if = "test -d /proc/sys/net/ipv4/conf/tun0"; + return-type = "json"; + interval = 5; + }; battery = { states = { "warning" = 60; diff --git a/profiles/TEMPLATE/home.nix b/profiles/TEMPLATE/home.nix index 22af825..656ba59 100644 --- a/profiles/TEMPLATE/home.nix +++ b/profiles/TEMPLATE/home.nix @@ -38,6 +38,7 @@ # "mpris" # "custom/left-arrow-light" # "network" + # "custom/vpn" # "custom/left-arrow-dark" # "pulseaudio" # "custom/left-arrow-light" @@ -61,6 +62,7 @@ "mpris" "custom/left-arrow-light" "network" + "custom/vpn" "custom/left-arrow-dark" "pulseaudio" "custom/left-arrow-light"