Added Sway Configuration
This commit is contained in:
parent
a4bfd41951
commit
85e325f0ce
3 changed files with 281 additions and 0 deletions
20
sway/statusbar.sh
Normal file
20
sway/statusbar.sh
Normal file
|
@ -0,0 +1,20 @@
|
|||
while :
|
||||
do
|
||||
status="$(date +'%d.%m.%Y %X')"
|
||||
if command -v pamixer &> /dev/null; then
|
||||
vol_status="Volume: $(pamixer --get-volume)%"
|
||||
if pamixer --get-mute | grep -q 'true'; then
|
||||
vol_status="$vol_status (Muted)"
|
||||
fi
|
||||
status="$vol_status | $status"
|
||||
fi
|
||||
if [ -d "/sys/class/power_supply/BAT0" ]; then
|
||||
status="Battery: $(cat /sys/class/power_supply/BAT0/capacity)% ($(cat /sys/class/power_supply/BAT0/status)) | $status"
|
||||
fi
|
||||
if playerctl status | grep -q 'Playing'; then
|
||||
status="Playing: $(playerctl metadata xesam:title) - $(playerctl metadata xesam:artist) | $status"
|
||||
fi
|
||||
|
||||
echo "$status"
|
||||
sleep 0.5
|
||||
done
|
Loading…
Add table
Add a link
Reference in a new issue