From 761dabb23f00c06c1c336e97026d8ced35665147 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Sun, 23 Oct 2016 17:32:27 -0700 Subject: [PATCH] [XMonad] Make greedyFocusWindow focus window Before, greedyView greedyFocusWindow would only focus the workspace that the selected window was in. This change makes it so that the window is actually focused. --- dotfiles/xmonad/xmonad.hs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/dotfiles/xmonad/xmonad.hs b/dotfiles/xmonad/xmonad.hs index 05a557c5..b66d34eb 100644 --- a/dotfiles/xmonad/xmonad.hs +++ b/dotfiles/xmonad/xmonad.hs @@ -102,9 +102,13 @@ myLayoutHook = avoidStruts . smartSpacing 10 . noBorders . minimize . myStartup = spawn "systemctl --user start wm.target" -greedyFocusWindow w ws = W.greedyView (fromMaybe (W.currentTag ws) $ W.findTag w ws) ws +-- Use greedyView to switch to the correct workspace, and then focus on the +-- appropriate window within that workspace. +greedyFocusWindow w ws = W.focusWindow w $ W.greedyView + (fromMaybe (W.currentTag ws) $ W.findTag w ws) ws -shiftToEmptyAndView = doTo Next EmptyWS DWO.getSortByOrder (windows . shiftThenView) +shiftToEmptyAndView = doTo Next EmptyWS DWO.getSortByOrder + (windows . shiftThenView) addKeys conf@XConfig {modMask = modm} = [ ((modm, xK_p), spawn "rofi -show drun")