VPN status
This commit is contained in:
parent
5cf1d64eaf
commit
0bc85afca0
|
@ -6,7 +6,7 @@
|
||||||
// Choose the order of the modules
|
// Choose the order of the modules
|
||||||
"modules-left": ["hyprland/workspaces"],
|
"modules-left": ["hyprland/workspaces"],
|
||||||
"modules-center": ["hyprland/window"],
|
"modules-center": ["hyprland/window"],
|
||||||
"modules-right": ["pulseaudio", "network", "custom/bandwidth", "cpu", "memory", "battery", "tray", "clock"],
|
"modules-right": ["pulseaudio", "custom/VPN", "network", "custom/bandwidth", "cpu", "memory", "battery", "tray", "clock"],
|
||||||
"hyprland/workspaces": {
|
"hyprland/workspaces": {
|
||||||
"disable-scroll": true,
|
"disable-scroll": true,
|
||||||
"all-outputs": false,
|
"all-outputs": false,
|
||||||
|
@ -56,6 +56,12 @@
|
||||||
"custom/bandwidth": {
|
"custom/bandwidth": {
|
||||||
"exec": "$HOME/.config/waybar/scripts/bandwidth"
|
"exec": "$HOME/.config/waybar/scripts/bandwidth"
|
||||||
},
|
},
|
||||||
|
"custom/VPN": {
|
||||||
|
"format": "{}",
|
||||||
|
"interval": 5,
|
||||||
|
"max-length": 20,
|
||||||
|
"exec": "$HOME/.config/waybar/scripts/vpn"
|
||||||
|
},
|
||||||
"pulseaudio": {
|
"pulseaudio": {
|
||||||
//"scroll-step": 1,
|
//"scroll-step": 1,
|
||||||
"format": "{volume}% {icon}",
|
"format": "{volume}% {icon}",
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
# Check if wireguard VPN is active
|
||||||
|
if nmcli c show --active | grep -q wireguard; then
|
||||||
|
echo ""
|
||||||
|
# If not, check if the connection named "YapiBiche" is active
|
||||||
|
elif nmcli c show --active | grep -q "YapiBiche"; then
|
||||||
|
echo ""
|
||||||
|
# If neither is active, return "NO"
|
||||||
|
else
|
||||||
|
echo ""
|
||||||
|
fi
|
Loading…
Reference in New Issue