satus bar for dwm

This commit is contained in:
cptbbVM 2023-12-13 17:57:35 +01:00
parent 7253ed2d8d
commit 997f34cd1f
1 changed files with 11 additions and 0 deletions

11
statusbar.sh Executable file
View File

@ -0,0 +1,11 @@
#!/bin/bash
date=$(date +"%a %d %b. %Y")
hour=$(date +"%H:%M")
battery=$(upower -i $(upower -e | grep BAT) | grep percentage | sed "s/ //g" | cut -d ":" -f2)
volume=$(amixer get Master | grep dB | head -n 1 | cut -f7 -d' ' | sed "s/\[\|\]//g")
brightness=$(echo "100 * $(xrandr --prop --verbose | grep -A10 " connected" | grep Brightness | cut -f2 -d' ')" | bc | sed "s/\.[0-9]$/%/g")
echo "statussed" >> /home/cptbb/tozi
xsetroot -name "| lum: $brightness | vol: $volume | bat: $battery | $date | $hour |"