[xmonad] Manage hooks

Brandon Allbery allbery.b at gmail.com
Tue Dec 20 21:11:14 CET 2011


On Tue, Dec 20, 2011 at 14:47, adam vogt <vogt.adam at gmail.com> wrote:

> On Mon, Dec 19, 2011 at 12:41 PM, Norbert Zeh <nzeh at cs.dal.ca> wrote:
> > - Display a certain type of window (say emacs) on a certain screen
> (screen, not
> >  workspace)
>

You can't really address screens that way; a screen holds a workspace, and
workspaces are addressable.  You can determine the workspace currently on a
screen, though, and use that.  Alternately you could use IndependentScreens
which effectively gives each screen its own set of workspaces, which change
in concert across all screens.


> > - Toggle manage hooks (e.g., using a key binding).  As an example, I
> normally
> >  want no special handling of emacs windows, but for certain tasks I want
> every
> >  emacs window to pop up on my left screen.  Since I do not want to
> reconfigure
>
> doShiftScreen :: ScreenId -> ManageHook
> doShiftScreen screenId = flip whenJust doShift =<< liftX
> (screenWorkspace screenId) -- fairly sure this typechecks
>
> And then use it exactly as you would use doShift.
>

You *can* have conditional ManageHooks, using ExtensibleState.  I suspect
it's easier to use something in the same vein as FloatNext, though (but
that would mean remembering to activate it before creating each window).

I am tempted to say this is the wrong solution, though.  Looking at it from
a higher level, I think what you really want is IndependentScreens +
TopicSpaces; you would then be able to arrange that, in a given topicspace,
 emacs always opens on a particular screen.  (I don't know how well those
two compose, though.)

-- 
brandon s allbery                                      allbery.b at gmail.com
wandering unix systems administrator (available)     (412) 475-9364 vm/sms
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/xmonad/attachments/20111220/897f7644/attachment-0001.htm>


More information about the xmonad mailing list