add vpn module

Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
This commit is contained in:
Hadi
2025-08-28 23:29:39 +02:00
parent bc064cf1c5
commit 29dbc0af97

View File

@@ -39,6 +39,21 @@
on-click-right = ''${pkgs.swayosd}/bin/swayosd-client --custom-message="Powermode is set to $(powerprofilesctl get)" --custom-icon="emblem-default"''; on-click-right = ''${pkgs.swayosd}/bin/swayosd-client --custom-message="Powermode is set to $(powerprofilesctl get)" --custom-icon="emblem-default"'';
}; };
"custom/vpn" = {
interval = 3;
format = "{}";
exec = ''
if ip add show | grep -qF "proton"; then
echo '{"text":"󰖂 VPN On","class":"vpn-on"}'
else
echo '{"text":"󰖂 VPN Off","class":"vpn-off"}'
fi
'';
return-type = "json";
max-length = "100";
on-click = "protonvpn-app";
};
cava = { cava = {
framerate = 240; framerate = 240;
bars = 20; bars = 20;
@@ -101,7 +116,7 @@
transition-duration = 300; transition-duration = 300;
transitition-left-to-right = false; transitition-left-to-right = false;
}; };
modules = ["custom/arrow-toggle" "tray"]; modules = ["custom/arrow-toggle" "tray" "custom/vpn"];
}; };
"hyprland/window" = { "hyprland/window" = {
@@ -193,6 +208,7 @@
#tray, #tray,
#cava, #cava,
#custom-notification, #custom-notification,
#custom-vpn,
#mpd { #mpd {
padding: 0 10px; padding: 0 10px;
border-radius: 15px; border-radius: 15px;
@@ -251,6 +267,14 @@
} }
} }
#custom-vpn.vpn-on {
color: #2ecc71;
}
#custom-vpn.vpn-off {
color: #e74c3c;
}
#battery.critical:not(.charging) { #battery.critical:not(.charging) {
background-color: #f38ba8; background-color: #f38ba8;
color:#bf5673; color:#bf5673;