power menu, redshift, polybar
This commit is contained in:
15
.config/polybar/scripts/vpn-openvpn-isrunning/README.md
Normal file
15
.config/polybar/scripts/vpn-openvpn-isrunning/README.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# Script: vpn-openvpn-isrunning
|
||||
|
||||
A simple script which shows if OpenVPN is running.
|
||||
|
||||

|
||||
|
||||
|
||||
## Module
|
||||
|
||||
```ini
|
||||
[module/vpn-openvpn-isrunning]
|
||||
type = custom/script
|
||||
exec = ~/polybar-scripts/vpn-openvpn-isrunning.sh
|
||||
interval = 5
|
||||
```
|
||||
BIN
.config/polybar/scripts/vpn-openvpn-isrunning/screenshots/1.png
Normal file
BIN
.config/polybar/scripts/vpn-openvpn-isrunning/screenshots/1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
@@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
connection=$(pgrep -a openvpn$ | head -n 1 | awk '{print $NF }' | cut -d '.' -f 1)
|
||||
|
||||
if [ -n "$connection" ]; then
|
||||
echo "VPN: connection"
|
||||
else
|
||||
echo ""
|
||||
fi
|
||||
Reference in New Issue
Block a user