[Xmonad] Re: How to combine xmonad with Ubuntu? (offtopic)

Robert Manea rob.manea at googlemail.com
Tue Sep 11 16:35:44 EDT 2007


* Kai Grossjohann (kai at emptydomain.de) wrote:

> That's not what I meant.  What I meant is a replacement for the little
> tool in Gnome that pops up a window saying that there are updates and
> asks whether these should be installed.


You could do this easily with dzen, i use something alike:

$ cat duc.sh
#!/bin/sh
#
# Debian update checker
#
# (c) 2007 by Robert Manea
#

TMPFILE=/tmp/duc.$$

apt-get update > /dev/null && \
apt-get -s upgrade | sed -ne 's/^Inst \(.*\)/\1/p' > $TMPFILE

NRUPDATES=`cat $TMPFILE| wc -l`
if [ $NRUPDATES != "0" ]; then
    (echo "^fg(red)$NRUPDATES new system update(s) available"; \
     cat $TMPFILE) | \
    dzen2 -p -l 4 -w 600
fi

rm -rf $TMPFILE
exit 0

$

This script will show you the number of outstanding updates in dzen's
title window and the actual packages that need updating in the slave
window.

You could even use an action with dzen, like 'button1=exec:$UPGRADECOMMAND'
in order to initiate the upgrade with a button click.


Bye, Rob.



More information about the Xmonad mailing list