[xmonad] run a program when switching to a workspace

Roman Cheplyaka roma at ro-che.info
Tue May 26 14:29:28 EDT 2009


* Sergey Manucharian <sergey at ingeniware.com> [2009-05-26 09:58:57-0600]
> On Mon, 25 May 2009 19:03:28 +0400
> Khudyakov Alexey <alexey.skladnoy at gmail.com> wrote:
> 
> > On Monday 25 of May 2009 18:47:42 Sergey Manucharian wrote:
> > > Hi folks,
> > >
> > > How can I configure xmonad to run a program when switching to a
> > > particular workspace? Example: I want to run a script changing the
> > > keyboard layout to "us" unconditionally when I'm on particular
> > > workspaces (with ssh, rdesktop etc.).
> > >
> > Why not.
> > 
> > Use something like this. I used key bindings description from
> > EZConfig. 
> > 
> > > (("M-w") , spawn "some-program" >>  windows $ W.greedyView "Some
> > > workspace") 
> 
> Thanks for the reply, Alexey.
> 
> Wouldn't it just add another key binding?
> What I meant is e.g. if I switch to the workspace "1" (no matter how)
> the keyboard layout falls to default one ("us") by running a script. In
> that case a key binding will not help...

Try TopicSpace module:
http://code.haskell.org/XMonadContrib/XMonad/Actions/TopicSpace.hs

-- 
Roman I. Cheplyaka (aka Feuerbach @ IRC)
http://ro-che.info/docs/xmonad.hs


More information about the xmonad mailing list