blob: d0e92e61b5db61ad07719b12f4065b94d7cb0c33 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#!/bin/sh
echo -n "SPKR: $(wpctl get-volume @DEFAULT_AUDIO_SINK@ 2> /dev/null | sed 's/\.//g' )% ; MIC: $(wpctl get-volume @DEFAULT_AUDIO_SOURCE@ 2> /dev/null | sed 's/\.//g')%"
echo -n " | "
echo -n "$(date)"
echo -n " | "
if [ $(hostname) == "sunflower" ]; then
echo -n "BATTERY: $(upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep 'percentage' | tr -d ' ' | sed 's/:/: /g'); "
echo -n "$(upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep 'state' | tr -d ' ' | sed 's/:/: /g')"
fi
pidof qmmp 2> /dev/null > /dev/null
if [ $? -eq 0 ]; then
echo -n " | "
nowplaying=$(qmmp --nowplaying '%p - %a: %t')
if [ ${#nowplaying} -gt 80 ]; then
echo -n "${nowplaying:0:77}... "
else
echo -n "$nowplaying"
fi
echo -n "$(qmmp --status | head -1)"
fi
for f in ${HOME}/.local/share/barmodules/enabled/*; do
[ -x "$f" ] && [ ! -d "$f" ] && "$f"
done
|