Merge branch 'master' of git.darkou.fr:dbroqua/home
This commit is contained in:
commit
78497ba62a
3 changed files with 23 additions and 9 deletions
|
@ -149,7 +149,7 @@
|
||||||
"custom/clock",
|
"custom/clock",
|
||||||
],
|
],
|
||||||
"modules-right": [
|
"modules-right": [
|
||||||
"network#openvpn",
|
"custom/vpn",
|
||||||
"network",
|
"network",
|
||||||
"temperature",
|
"temperature",
|
||||||
"cpu",
|
"cpu",
|
||||||
|
@ -204,6 +204,14 @@
|
||||||
"tooltip": true,
|
"tooltip": true,
|
||||||
"interval": 60,
|
"interval": 60,
|
||||||
},
|
},
|
||||||
|
"custom/vpn": {
|
||||||
|
"format": "{icon}",
|
||||||
|
"tooltip-format": "{icon}",
|
||||||
|
"exec": "$HOME/.config/waybar/modules/vpn_echo.sh",
|
||||||
|
"return-type": "json",
|
||||||
|
"interval": 5,
|
||||||
|
"format-icons": ["",""]
|
||||||
|
},
|
||||||
"network#openvpn": {
|
"network#openvpn": {
|
||||||
"interface": "tun0",
|
"interface": "tun0",
|
||||||
"format": "🔒",
|
"format": "🔒",
|
||||||
|
|
4
config/waybar/modules/vpn_echo.sh
Executable file
4
config/waybar/modules/vpn_echo.sh
Executable file
|
@ -0,0 +1,4 @@
|
||||||
|
#!/bin/bash
|
||||||
|
ip addr | grep -q '10.10.10.2' \
|
||||||
|
&& echo '{"text":"Connected","class":"connected","percentage":100}' \
|
||||||
|
|| echo '{"text":"Disconnected","class":"disconnected","percentage":0}'
|
|
@ -20,6 +20,7 @@ window#waybar.laptop {
|
||||||
#mode,
|
#mode,
|
||||||
#disk,
|
#disk,
|
||||||
#network,
|
#network,
|
||||||
|
#custom-vpn,
|
||||||
#cpu,
|
#cpu,
|
||||||
#memory,
|
#memory,
|
||||||
#temperature,
|
#temperature,
|
||||||
|
@ -59,6 +60,7 @@ window#waybar.laptop {
|
||||||
background: rgba(208, 135, 112, 0.7);
|
background: rgba(208, 135, 112, 0.7);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#custom-vpn.disconnected,
|
||||||
#network.disconnected {
|
#network.disconnected {
|
||||||
background: rgba(191, 97, 106, 0.7);
|
background: rgba(191, 97, 106, 0.7);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue