power menu, redshift, polybar

This commit is contained in:
azpsen
2024-01-28 16:37:10 -06:00
parent 89516a6ce1
commit 319b44ecbd
307 changed files with 7642 additions and 5 deletions

View File

@@ -0,0 +1,24 @@
# Script: vpn-expressvpn-status
A small script that shows the status of ExpressVPN.
It includes a `--toggle` option to connect/disconnect.
![vpn-expressvpn-status](screenshots/1.png)
![vpn-expressvpn-status](screenshots/2.png)
## Dependencies
* [`ExpressVPN client`](https://www.expressvpn.com/vpn-software/vpn-linux)
## Module
```ini
[module/vpn-expressvpn-status]
type = custom/script
exec = ~/polybar-scripts/vpn-expressvpn-status.sh
click-left = ~/polybar-scripts/vpn-expressvpn-status.sh --toggle &
interval = 10
```

Binary file not shown.

After

Width:  |  Height:  |  Size: 883 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -0,0 +1,28 @@
#!/bin/sh
STATUS=$(expressvpn status)
expressvpn_toggle() {
if [ "$STATUS" != 'Not connected' ]; then
expressvpn disconnect
else
expressvpn connect
fi
}
expressvpn_status() {
if [ "$STATUS" != 'Not connected' ]; then
echo "$STATUS" | head -n1 | cut -d'-' -f2
else
echo 'not connected'
fi
}
case "$1" in
--toggle)
expressvpn_toggle
;;
*)
expressvpn_status
;;
esac