[xmonad] new extension: XMonad.Layout.ShowActive
Adam Vogt
vogt.adam at gmail.com
Thu Sep 10 15:58:50 EDT 2009
* On Wednesday, September 02 2009, smschm wrote:
>Hi XMonad list - long time user, first time extension submitter.
>
>I'm attaching an extension called ShowActive that it would be a
>stretch for me to say I wrote (it's about 99% ShowWName, I just cut
>parts out). On each layout it pops up a small square in each window
Regarding the lack of first-class functions for layouts (due to the
Read/Show restriction), you can get around this by encoding them as data
types which are mapped to functions inside the layout (cf.
XMonad.Util.WindowProperties), or perhaps the part that is parameterized
by a function could be written as a logHook which looks at some IORef
which is written by the layout part. Look through contrib and you will
find a number of different solutions.
If you have some time, perhaps it would be possible to factor out the
common parts of the two modules?
This extension also brought to my attention XMonad.Util.Timer, which
can be used to make a halfway decent (but still unusable IMHO) key
chording extension for xmonad (attached for the record, but it is
darcs-only).
>for a short time, with the active window colored differently. This
>works much better for me than borders when alt-tabbing to
>spot-identify which window got focus.
>
>Now, I'm just attaching the raw .hs file instead of a cabal patch
>since I cant get the development version of XMonadContrib to compile
>against my stock xmonad-8.1, and I don't want to upgrade to the
>bleeding edge in case it breaks anything. Maybe someone else, if
>they think this is useful, can make a patch out of it. Or, if
>someone else knows how to make a patch without requiring that
>XMonadContrib compiles, let me know.
>
>Enjoy,
>Steve
You could use 'darcs record --no-test', but please send that patch with
a warning that you did so. If your file can be loaded into ghci with
'ghci -Wall -Werror -fwarn-tabs File.hs', your patch stands a good
chance of passing the test.
If anybody is running a recent darcs build and wants to try this out
(and nobody has put this module into contrib), you can place smschm's
file in ~/.xmonad/lib/XMonad/Layout/ShowActive.hs, and then follow the
directions as if it was part of contrib.
--
Adam
More information about the xmonad
mailing list