summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xmonad.hs9
1 files changed, 8 insertions, 1 deletions
diff --git a/xmonad.hs b/xmonad.hs
index 7f1373c..080a036 100644
--- a/xmonad.hs
+++ b/xmonad.hs
@@ -60,7 +60,7 @@ import XMonad.Util.Replace (replace)
import Control.Monad (when)
import System.Environment (getArgs)
-import Data.Maybe (fromMaybe, fromJust, isNothing, isJust, mapMaybe)
+import Data.Maybe (fromMaybe, fromJust, isNothing, isJust, mapMaybe, listToMaybe)
import Data.Ord (comparing)
-- for hostname handling (no windows key on "Australien")
@@ -531,6 +531,13 @@ myKeys c hostname =
"Australien" -> "M-S-q"
_ -> "M-M5-q"
+ -- Like X.A.TopicSpace.switchNthLastFocused but defaults to do nothing
+ -- if depth is too big and not to switch to the default topic.
+ switchNthLastFocused :: TopicConfig -> Int -> X ()
+ switchNthLastFocused tg depth = do
+ ws <- fmap (listToMaybe . drop depth) getLastFocusedTopics
+ whenJust ws $ switchTopic tg
+
myMouse modm c =
[ ((modm, button1),
(\w -> focus w >> mouseMoveWindow w >> snapMagicMove (Just 50) (Just 50) w))