55 lines
927 B
Bash
Executable file
55 lines
927 B
Bash
Executable file
#!/bin/bash
|
|
|
|
HEADER_COLOR="#A0A57E"
|
|
|
|
header(){
|
|
echo "%{F$HEADER_COLOR}$1%{F-}"
|
|
}
|
|
|
|
### Filesystem info
|
|
|
|
filesystem() {
|
|
header "Diskspace"
|
|
for d in / /boot; do
|
|
df -h $d | tail -n 1 | awk '{printf "%-15s%10s%10s/%s\n",$6, $5, $3, $2}'
|
|
done
|
|
}
|
|
|
|
### Network info
|
|
network() {
|
|
header "Network"
|
|
wicd-cli --status
|
|
}
|
|
|
|
### Music info
|
|
music() {
|
|
header "Music"
|
|
mpc current -f "$(header Artist:) %artist%\n$(header Album:) %album%\n$(header Title:) %title%"
|
|
}
|
|
|
|
### Battery info
|
|
battery() {
|
|
header "Battery"
|
|
acpi -abt
|
|
}
|
|
|
|
### Clock info
|
|
clock() {
|
|
header "Clock"
|
|
date +"%A %d.%m.%Y"
|
|
date +"$(header KW:) %V"
|
|
}
|
|
|
|
### RUN CODE
|
|
|
|
if [ $# -lt 2 ]; then
|
|
echo "$0 <display> <x>"
|
|
exit 1
|
|
fi
|
|
|
|
#DATA=`$1`
|
|
#LINES=$[ $(echo "$DATA" | wc -l)-1 ]
|
|
|
|
$1 | popup -g 300x10+$2+20 -B "#88000000"
|
|
|
|
#echo "$DATA" | dzen2 -p -e 'onstart=uncollapse;button1=exit' -x "$2" -y 20 -w 300 -l $LINES -ta left
|