Created
March 12, 2013 12:54
-
-
Save erhan-/5142653 to your computer and use it in GitHub Desktop.
My dwmstatus
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#while true; do | |
#statements | |
# xsetroot -name "$(acpi +d'%d') $(date)" | |
# sleep 5 | |
#done | |
while true; do | |
akku=$(acpi +d'%d' | awk '{gsub("[%,]","");print $4}') | |
if [[ $akku -eq 5 ]]; then | |
notify-send -u critical "Achtung! Akku bei $akku %." | |
fi | |
# if [[ $akku < 2 ]]; then | |
# sudo pm-suspend | |
# fi | |
xsetroot -name "$(echo -e '\ue00E') $(free -m | grep 'buffers/cache' | awk '{print $3" MB / " $4" MB"}') | $(echo -e '\ue00E') $akku % | $(echo -e '\ue00E') $( date +"%F %R" )" | |
sleep 10 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment