[xmonad] list of visible workspaces
Bryan Huh
bhh1988 at gmail.com
Thu Aug 2 23:23:06 CEST 2012
Thanks a lot Brandon, that worked!
Mostly based on what you wrote, I wrote another mapping that allows me
to swap the left and right screens when I want to (it turns out that
with my settings as I've described them to you, it takes a few
keystrokes to switch the left and right screens, so I wanted to be able
to do it with one keystroke, mod-w). I'm posting that here, in case
anyone might ever try the same thing and won't know how to do it:
swapView :: X ()
swapView = do
ws <- gets windowset
windows $ W.greedyView $ W.tag . W.workspace $ W.visible ws !! 0
And then my keybinding is:
((modm , xK_w), swapView)
Probabl
On 08/02/2012 12:23 PM, Brandon Allbery wrote:
> On Thu, Aug 2, 2012 at 2:42 PM, Bryan Huh <bhh1988 at gmail.com
> <mailto:bhh1988 at gmail.com>> wrote:
>
> I see. That solved that problem, but now I get an error saying:
>
>
> *sigh* I tripped over the same problem I was trying to avoid in a
> different form... this will be harder to do than I'd hoped. (Forgot
> that it's already in a pure context; have to rearrange the whole thing
> to compensate)
>
> The viewHidden function now looks like
>
> viewHidden :: WorkspaceId -> X ()
> viewHidden w = do
> ws <- gets windowset
> when (w `notElem` (map (W.tag . W.workspace) $ W.current ws :
> W.visible ws))
> (windows $ W.view w)
>
>
> and the list comprehension defining the workspace switching keys has
> now been refactored into:
>
> [((m .|. modm,k),f i)
> | (i, k) <- zip (XMonad.workspaces conf) [xK_1 .. xK_9]
> , (f, m) <- [(viewHidden,0), (windows . W.shift,shiftMask)]
> ]
>
>
> --
> brandon s allbery allbery.b at gmail.com <mailto: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/20120802/21963b08/attachment.htm>
More information about the xmonad
mailing list