Created
August 15, 2016 20:34
-
-
Save ivoarch/faf4b69f7c75c5364c651429a4acd48a to your computer and use it in GitHub Desktop.
This file contains hidden or 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/sh | |
# ratpoison info | |
LIFE="$(($(($(date +%s) - $(date -d " $(head -1 /var/log/pacman.log | cut -d ' ' -f 1,2 | tr -d '[]')" +%s))) / 86400)) days" | |
PACKAGE="`pacman -Q | wc -l`" | |
KERNEL="`uname -r`" | |
MEM="`free -m | grep "buffers/" | awk {'print $3'}`" | |
FREQ=$(cpufreq-info | grep "current CPU frequency" | awk '{print $5"MHz"}') | |
VOL="$(exec amixer get Master | egrep -o "[0-9]+%" | head -1 | egrep -o "[0-9]*")%" | |
HOME="$(df /dev/sda4 | awk '/^\/dev/{printf "%s ", $5}' | sed '$s/.$//')" | |
ROOT="$(df / | awk '/^\/dev/{printf "%s ", $5}' | sed '$s/.$//')" | |
USB="$(df /mnt/usb | awk '/^\/dev/{printf "%s ", $5}' | sed '$s/.$//')" | |
DATE="$(date +"%d.%m.%Y/%H:%M")" | |
BAT=$" `acpi | awk '{print $4, $3, $5}' | tr -d ','`" | |
ratpoison -c "echo `echo -e "ARCHLIFE: $LIFE \nPACKAGE: $PACKAGE \nKERNEL: $KERNEL \nMEM: $MEM \nFREQ: $FREQ \nVOL: $VOL \nHDD: $HOME $ROOT $USB \nBAT:$BAT \nDATE: $DATE"`" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment