+ Added script for dwm status bar (dwmbar no longer used, now using
dwmblocks)
This commit is contained in:
parent
57c06d99ce
commit
3d7272b103
3 changed files with 39 additions and 0 deletions
29
.scripts/dwmbar
Executable file
29
.scripts/dwmbar
Executable file
|
@ -0,0 +1,29 @@
|
|||
#!/bin/sh
|
||||
getdate() { \
|
||||
date +" %A, %d %b %Y • %H:%M %Z"
|
||||
}
|
||||
|
||||
gettemp() { \
|
||||
sensors | grep -A0 "Package" | cut -d"+" -f2 | cut -d"." -f1 | sed "s/$/°C/"
|
||||
}
|
||||
|
||||
getfree_HDD() { \
|
||||
df -h --output=source,avail /home | grep -A1 '/dev' | sed "s/^.* //;s/$/ free/"
|
||||
}
|
||||
|
||||
getupdate() { \
|
||||
aur=$(yay -Qu | wc -l)
|
||||
pac=$(pacman -Qu | wc -l)
|
||||
(( update=$pac+$aur ))
|
||||
printf " $update"
|
||||
}
|
||||
|
||||
bar() { \
|
||||
printf " %s | %s " "$(getupdate)" "$(getdate)"
|
||||
}
|
||||
|
||||
while true
|
||||
do
|
||||
xsetroot -name " $(bar)"
|
||||
sleep 1m
|
||||
done
|
Loading…
Add table
Add a link
Reference in a new issue