[xmonad] run a program when switching to a workspace
Nicolas Pouillard
nicolas.pouillard at gmail.com
Wed May 27 04:39:35 EDT 2009
Excerpts from Roman Cheplyaka's message of Tue May 26 20:29:28 +0200 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
Currently TopicSpace have support for spawning a command when you enter an
empty workspace, not each time you enter it. However it could be a nice
addition. However I'm wondering if a hook would not be more appropriated.
Best regards,
--
Nicolas Pouillard
More information about the xmonad
mailing list