[XMonad] Filter out visible windows when bringing again

This commit is contained in:
Ivan Malison 2018-06-25 19:36:40 -07:00
parent 627b6c5317
commit edd1ae1cff
No known key found for this signature in database
GPG Key ID: 62530EFBE99DC2F8
3 changed files with 17 additions and 13 deletions

View File

@ -14,10 +14,6 @@ function get_exe_dir {
fi fi
} }
function do_rebuild {
}
SRC_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" SRC_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
EXE_NAME=imalison-xmonad EXE_NAME=imalison-xmonad

@ -1 +1 @@
Subproject commit 4931215c4363efbe53e9dcc11932520ad4615df7 Subproject commit b0936f47422913e87ad6275c78e4a0f8d12007bc

View File

@ -433,11 +433,19 @@ chromeTabAction doSplit action selected =
-- This needs access to X in order to unminimize, which means that it can't be -- This needs access to X in order to unminimize, which means that it can't be
-- done with the existing window bringer interface -- done with the existing window bringer interface
myWindowAct c@WindowBringerConfig {menuCommand = cmd, menuArgs = args} action = do myWindowAct c@WindowBringerConfig {menuCommand = cmd, menuArgs = args} filterVisible action = do
visible <- visibleWindows visible <- visibleWindows
currentlyFullscreen <- isToggleActiveInCurrent NBFULL
-- Uncomment filter to remove windows that are visible -- Uncomment filter to remove windows that are visible
ws <- windowMap' c -- {windowFilter = not . flip elem visible} let actualConfig =
-- chromeTabs <- liftIO getChromeTabInfo if fromMaybe False currentlyFullscreen
then c
else
if filterVisible
then c {windowFilter = not . flip elem visible}
else c
ws <- windowMap' actualConfig
-- chromeTabs <- liftIO getChromeTabInfo
let options = M.union (M.map Left ws) (M.map Right M.empty) let options = M.union (M.map Left ws) (M.map Right M.empty)
selection <- DM.menuMapArgs cmd args options selection <- DM.menuMapArgs cmd args options
whenJust selection action whenJust selection action
@ -445,17 +453,17 @@ myWindowAct c@WindowBringerConfig {menuCommand = cmd, menuArgs = args} action =
doBringWindow window = doBringWindow window =
maximizeWindow window >> windows (W.focusWindow window . bringWindow window) maximizeWindow window >> windows (W.focusWindow window . bringWindow window)
myWindowAction = andDeactivateFull . maybeUnminimizeAfter . myWindowAction filterVisible =
myWindowAct myWindowBringerConfig andDeactivateFull . maybeUnminimizeAfter . myWindowAct myWindowBringerConfig filterVisible
myGoToWindow = myGoToWindow =
myWindowAction $ chromeTabAction False $ windows . greedyFocusWindow myWindowAction False $ chromeTabAction False $ windows . greedyFocusWindow
myBringWindow = myWindowAction $ chromeTabAction True doBringWindow myBringWindow = myWindowAction True $ chromeTabAction True doBringWindow
myReplaceWindow = myReplaceWindow =
swapMinimizeStateAfter $ swapMinimizeStateAfter $
myWindowAct myWindowBringerConfig $ myWindowAct myWindowBringerConfig True $
chromeTabAction True (windows . swapFocusedWith) chromeTabAction True (windows . swapFocusedWith)
-- Workspace Names for EWMH -- Workspace Names for EWMH