Reputation: 8277
Sometimes I want to send the whole current workspace to another screen instead of just the current window.
I know that greedyView
would get the designated workspace onto the current screen.
However, what if I
Don't want to go to the target screen first in order to run greedyView
, but instead want to directly send the currently focused workspace to another screen.
Don't want to swap the original workspace on the target screen onto the origin screen (i.e. that original workspace should now become unprojected to any screen)
greedyView
doesn't seem to be able to satisfy those two needs above. Also, I'd prefer to use view
instead of greedyView
with my default keybindings.
Is there any alternative? Googling doesn't seem to turn up any useful result.
Upvotes: 0
Views: 134
Reputation: 34081
You'd probably have to make your own function. If you look at how greedyView is implemented:
greedyView :: (Eq s, Eq i) => i -> StackSet i l a s sd -> StackSet i l a s sd
greedyView w ws
| any wTag (hidden ws) = view w ws
| (Just s) <- L.find (wTag . workspace) (visible ws)
= ws { current = (current ws) { workspace = workspace s }
, visible = s { workspace = workspace (current ws) }
: L.filter (not . wTag . workspace) (visible ws) }
| otherwise = ws
where wTag = (w == ) . tag
So the relevant lines are:
ws {
current = (current ws) { workspace = workspace s }
, visible = s { workspace = workspace (current ws) } : L.filter (not . wTag . workspace) (visible ws)
}
Upvotes: 1