Add useful information to the statusbar in wmii
Want your wmii statusbar to give a bit more information than the defaults? Not all that different than how you pull info into Gnu Screen’s statusbar with scripts/backticks, and pretty simple. See below:.
Once done with this proccess your statusbar will:
- Display how many unread emails in your gmail
- What artist and track is playing in MPD
- Percentage of disk usage
- Amount of free memory
- Amount of free swap
- Load average
- Day of the week, month, day of the month and year
- 12 hour clock
Step 1: Edit your ~/wmii-3.5/wmiirc file,
find the line:
# Status Bar Info
or
status() {
and place the following below.
status() { echo -n Unread: $(~/bin/get_gmail) ‘|’ Now Playing: $(~/bin/mpd_nowplaying.sh) ‘|’ Disk Usage of /: $(df -h | grep /dev/sda3 | awk ‘{print $5}’) docs/: $(df -h | grep /dev/sdd1 | awk ‘{print $5}’) docs2/: $(df -h | grep /dev/sdc1 | awk ‘{print $5}’) docs3 /: $(df -h | grep /dev/sdb1 | awk ‘{print $5}’) ‘|’ Mem: $(~/bin/get_freemem) MB ‘|’ Swap: $(~/bin/get_freeswap) MB ‘|’ Load: $(uptime | sed ’s/.*://; s/,//g’) ‘|’ $(date +”%a %b. %e %Y | %l:%M:%S %p”) }Note: the disk usage area covers 4 drives of mine and where they are mounted, you will have to edit as necessary for your drives and mountpoints.
Step 2: Download Scripts
Download the get_gmail, get_freemem, mpd_nowplaying.sh and get_freeswap scripts here:
http://tuxtraining.com/files/wmii_script_status.tar.gz
Step 3: Make executable
Once you download the scripts and place them in your ~/bin, make them executable with a chmod -R u+x ~/bin
Step 4: Change the scripts as necessary
The get_gmail script will require you to place your username and password in the file at the top.
Step 5: Reload wmii
Press: $MODKEY+A then selecting wmiirc.
Below is the result:







