stumpwm-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[STUMP] mode-line formatting


From: Rohan Nicholls
Subject: [STUMP] mode-line formatting
Date: Tue, 12 Aug 2008 23:02:17 +0200

Hey there everyone,

I have a question about formatting the modeline.  I did an aptitude
dist-upgrade and gnome-panel went south.  Tried fixing it, but it was
doing some very strange things so I put the mode-line back and was
pleasantly surprised at the result.

I made a list of what it was useful for and am coming up with
solutions, but one of the things I liked was that I had all my statusy
stuff sitting on the right-hand side of the bar, and my other stuff
sitting and expanding and contracting on the left.  The inevitable
question follows: has anyone figured out a way to format this?  And in
a related vein, is there a way to generate an image, and have it
display in the modeline?  I was thinking something like streaming
images to browsers or something.

Btw. for a laugh, although I am finding it pretty useful, and it
actually gives me the info I want I created a poor man's pager.  Here
it is in case anyone finds it useful:

(defun text-pager ()
  "Poor man's workspace pager display.  It does none of the clicky
things a normal pager does but does let you know how many windows are
open in each group, and displays an asterisk for the currently active
group."
    (format nil "^B ++|~{~a|~}++ ^b"
                            (mapcar #'second
                                    (sort (mapcar
                                           #'(lambda (g)
                                               (list (group-number g)
                       (format nil "~:[~;*~]~a"
                               (eq g (screen-current-group (current-screen)))
                               (length (group-windows g)))))
                                           (screen-groups (current-screen)))
                                          #'< :key #'car))))

I use it like this:
(setf *screen-mode-line-format*
      (list '(:eval (text-pager))
      ... etc. etc.

Now to get the time, cpu and battery over the other side....

Thanks for all the contrib libraries, a notification system for the modeline
is next....

Rohan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]