From a4f614f137f07891faa66177366957348e20548a Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Wed, 15 Jul 2015 22:35:18 +0200 Subject: "Simplified" screen permutations --- .xmonad/xmonad.hs | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to '.xmonad') diff --git a/.xmonad/xmonad.hs b/.xmonad/xmonad.hs index 287247d..903eff4 100644 --- a/.xmonad/xmonad.hs +++ b/.xmonad/xmonad.hs @@ -58,7 +58,7 @@ data Host = Host , hWsp :: Integer -> WorkspaceId , hCoWsp :: String -> Maybe WorkspaceId , hKeysMod :: XConfig Layout -> (KeyMap -> KeyMap) - , hScreenPerm :: [ScreenId] -> [ScreenId] + , hScreens :: [ScreenId] } defaultHost = Host { hName = "unkown" @@ -66,7 +66,7 @@ defaultHost = Host { hName = "unkown" , hWsp = show , hCoWsp = const Nothing , hKeysMod = const id - , hScreenPerm = id + , hScreens = [0..] } hostFromName :: HostName -> Host @@ -79,18 +79,13 @@ hostFromName h@("vali") = defaultHost { hName = h , hCoWsp = hCoWsp , hKeysMod = \conf -> Map.union $ Map.fromList $ join $ map (spawnBindings conf) [ (xK_d, ["dwb", "dwb $(xclip -o)"]) ] - , hScreenPerm = hScreenPerm + , hScreens = [1, 0, 2..] } where workspaceNames = Map.fromList [ (2, "web") ] hWsp = wspFromMap workspaceNames hCoWsp = coWspFromMap workspaceNames - hScreenPerm = map hPrim - where - hPrim 1 = 2 - hPrim 2 = 1 - hPrim x = x hostFromName _ = defaultHost wspFromMap workspaceNames = \i -> case Map.lookup i workspaceNames of @@ -307,7 +302,7 @@ myKeys' conf host = Map.fromList $ ] ++ [((m .|. modm .|. controlMask, k), screenWorkspace i >>= (flip whenJust) (windows . f)) - | (i, k) <- zip (hScreenPerm host [0..]) [xK_g, xK_c, xK_r, xK_l] + | (i, k) <- zip (hScreens host) [xK_g, xK_c, xK_r, xK_l] , (f, m) <- [(W.view, 0), (W.shift, shiftMask)] ] where -- cgit v1.2.3