various changes

This commit is contained in:
2021-02-26 09:06:18 +01:00
parent 3a78b16b79
commit 5ed3bbe122
28 changed files with 42 additions and 55 deletions

View File

@ -20,7 +20,6 @@ do
[ -n "$capacity" ] && [ "$capacity" -gt 100 ] && continue #do not print misreads
[ -z "$capacity" ] && continue #if battery fails during reading, quit
status=$(sed "s/Discharging/🔋/;s/Not charging/🛑/;s/Charging/🔌/;s/Unknown/🔋/;s/Full/⚡/" "$battery"/status)
# If it is discharging and 25% or less, we will add a ❗ as a warning.
[ "$capacity" -le 25 ] && [ "$status" = "🔋" ] && warn="❗"
printf "%s%s%s%%\n" "$status" "$warn" "$capacity"

View File

@ -1,6 +1,5 @@
#!/bin/bash
#!/bin/sh
if pactl list sinks | grep -qE 'device.icon_name = \"audio-(headset|headphones)-bluetooth\"'; then
echo 🎧
else
echo ""
printf '🎧'
fi
printf '\n'