mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-08-01 20:51:52 -07:00
X.U.PureX Add shiftWin
This commit is contained in:
@@ -46,7 +46,7 @@ module XMonad.Util.PureX (
|
|||||||
getStack, putStack, peek,
|
getStack, putStack, peek,
|
||||||
focusWindow, focusNth,
|
focusWindow, focusNth,
|
||||||
view, greedyView, invisiView,
|
view, greedyView, invisiView,
|
||||||
shift, curScreen, curWorkspace,
|
shift, shiftWin, curScreen, curWorkspace,
|
||||||
curTag, curScreenId,
|
curTag, curScreenId,
|
||||||
) where
|
) where
|
||||||
|
|
||||||
@@ -271,6 +271,16 @@ shift tag = withFocii $ \ctag fw ->
|
|||||||
mfw' <- peek
|
mfw' <- peek
|
||||||
return (Any $ Just fw /= mfw')
|
return (Any $ Just fw /= mfw')
|
||||||
|
|
||||||
|
-- | A refresh tracking version of @W.shiftWin@.
|
||||||
|
shiftWin :: XLike m => WorkspaceId -> Window -> m Any
|
||||||
|
shiftWin tag w = do
|
||||||
|
mtag <- gets $ W.findTag w . windowset
|
||||||
|
whenJust' mtag $ \wtag ->
|
||||||
|
when' (tag /= wtag) $ do
|
||||||
|
modifyWindowSet' $ W.shiftWin tag w
|
||||||
|
ntag <- gets $ W.findTag w . windowset
|
||||||
|
return (Any $ mtag /= ntag)
|
||||||
|
|
||||||
-- | Internal. Refresh-tracking logic of focus operations.
|
-- | Internal. Refresh-tracking logic of focus operations.
|
||||||
focusWith :: XLike m => (WindowSet -> WindowSet) -> m Any
|
focusWith :: XLike m => (WindowSet -> WindowSet) -> m Any
|
||||||
focusWith focuser = do
|
focusWith focuser = do
|
||||||
|
Reference in New Issue
Block a user