[xmonad] Issue 548 in xmonad: Feature request: greedyFocusWindow

codesite-noreply at google.com codesite-noreply at google.com
Wed Jun 19 08:15:12 CEST 2013


Updates:
	Status: Accepted
	Owner: vogt.a... at gmail.com
	Labels: Component-Core Component-Contrib Type-Enhancement Priority-Low

Comment #1 on issue 548 by vogt.a... at gmail.com: Feature request:  
greedyFocusWindow
http://code.google.com/p/xmonad/issues/detail?id=548

Yes these are useful. A good question is whether these versions/copies  
belong alongside the versions based on W.view, or maybe there's a better  
approach:

It should be possible to write a function which corrects which workspaces  
are on each screen after some other action runs (which is slightly bad  
because then you have two calls to `XMonad.Operations.windows'):

greedy :: X () -> X ()


It could do something similar to the following:

greedy2 :: (Eq s, Eq i) => (W.StackSet i l1 a1 s sd1 -> W.StackSet i l a s  
sd) -> W.StackSet i l1 a1 s sd1 -> W.StackSet i l a s sd
greedy2 f ws0 = let
         swap a b = W.greedyView a . W.view b
         s0 = W.screen $ W.current ws0
         ws1 = f ws0
     in if s0 == W.screen (W.current ws1) then ws1 else swap (W.currentTag  
ws1) (W.currentTag ws0) ws1

At least to some approximation, greedy2 . W.view == W.greedyView




-- 
You received this message because this project is configured to send all  
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings



More information about the xmonad mailing list