#!/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"`"