Add polybar config

This commit is contained in:
Riyyi
2019-12-30 23:13:04 +01:00
parent 9e1686fd99
commit 697a41fb19
5 changed files with 304 additions and 1 deletions
+13
View File
@@ -0,0 +1,13 @@
#!/bin/sh
BAT_INFO=${BLOCK_INSTANCE:-"$(acpi -b | grep ': [^Unknown]')"}
CAPACITY=$(echo "$BAT_INFO" | awk '{ print int($4) }')
if [ "$(echo "$BAT_INFO" | awk '{ print $6 }')" = "remaining" ]; then
if [ "$CAPACITY" -lt "20" ]; then
notify-send -u critical -r 1 -t 30000 "Battery critically low!"
fi
elif [ "$CAPACITY" -ge "95" ]; then
notify-send -u low -r 1 "You should probably unplug."
fi
+11
View File
@@ -0,0 +1,11 @@
#!/bin/sh
# Kill existing panels
while [ "$(pgrep -cx polybar)" -gt 1 ]; do
pkill -x -9 polybar;
done
# Start a panel on each monitor
for m in $(polybar --list-monitors | cut -d ":" -f1); do
MONITOR=$m polybar --reload polybar &
done
+12
View File
@@ -0,0 +1,12 @@
#!/bin/sh
WIRELESS="${1:-wlan0}"
SSID="$(iw dev "$WIRELESS" link | awk '/SSID/ { print $2 }')"
IP="$(ip a show "$WIRELESS" \
| awk '/inet / { print substr($2, 0, length($2) - 3) }')"
notify-send -r 3 "Wifi" "\
Interface: $WIRELESS
SSID: $SSID
IP: $IP"