[xmonad] run a program when switching to a workspace
Roman Cheplyaka
roma at ro-che.info
Sun May 31 05:04:00 EDT 2009
* Sergey Manucharian <sergey at ingeniware.com> [2009-05-29 11:29:10-0600]
> On Thu, 28 May 2009 10:50:34 +0300
> Roman Cheplyaka <roma at ro-che.info> wrote:
>
> > * Brent Yorgey <byorgey at seas.upenn.edu> [2009-05-27 22:52:04-0400]
> > .......
> > > ...
> > > logHook = ...other stuff... >> checkKBLayout
> > >
> > > ...
> > >
> > > checkKBLayout :: X ()
> > > checkKBLayout = do
> > > curTag <- gets (W.currentTag . windowset)
> > > when (curTag == "foo") $ spawn "set keyboard layout"
> > .......
> >
> > Just to make it clear: the command will be spawned each time when
> > windowset changes -- e.g. when you change the focus. It's harmless
> > with setting kb layout, but if you use it for e.g. launching an
> > application you'll get a new instance each time you change focus.
>
> I wonder why it keeps and keeps spawning the program even if I stay on
> that workspace....
As I said,
"the command will be spawned each time when windowset changes -- e.g.
when you change the focus."
--
Roman I. Cheplyaka (aka Feuerbach @ IRC)
http://ro-che.info/docs/xmonad.hs
More information about the xmonad
mailing list