diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2015-07-15 22:35:18 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2015-07-15 22:35:18 +0200 |
commit | a4f614f137f07891faa66177366957348e20548a (patch) | |
tree | 2417f21e299a72a7b5f8f1bc7944e9ff590176cd /.xmonad | |
parent | 4589fe7915a52ab216897782aea378b07076b61f (diff) | |
download | dotfiles-a4f614f137f07891faa66177366957348e20548a.tar dotfiles-a4f614f137f07891faa66177366957348e20548a.tar.gz dotfiles-a4f614f137f07891faa66177366957348e20548a.tar.bz2 dotfiles-a4f614f137f07891faa66177366957348e20548a.tar.xz dotfiles-a4f614f137f07891faa66177366957348e20548a.zip |
"Simplified" screen permutations
Diffstat (limited to '.xmonad')
-rw-r--r-- | .xmonad/xmonad.hs | 13 |
1 files changed, 4 insertions, 9 deletions
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 | |||
58 | , hWsp :: Integer -> WorkspaceId | 58 | , hWsp :: Integer -> WorkspaceId |
59 | , hCoWsp :: String -> Maybe WorkspaceId | 59 | , hCoWsp :: String -> Maybe WorkspaceId |
60 | , hKeysMod :: XConfig Layout -> (KeyMap -> KeyMap) | 60 | , hKeysMod :: XConfig Layout -> (KeyMap -> KeyMap) |
61 | , hScreenPerm :: [ScreenId] -> [ScreenId] | 61 | , hScreens :: [ScreenId] |
62 | } | 62 | } |
63 | 63 | ||
64 | defaultHost = Host { hName = "unkown" | 64 | defaultHost = Host { hName = "unkown" |
@@ -66,7 +66,7 @@ defaultHost = Host { hName = "unkown" | |||
66 | , hWsp = show | 66 | , hWsp = show |
67 | , hCoWsp = const Nothing | 67 | , hCoWsp = const Nothing |
68 | , hKeysMod = const id | 68 | , hKeysMod = const id |
69 | , hScreenPerm = id | 69 | , hScreens = [0..] |
70 | } | 70 | } |
71 | 71 | ||
72 | hostFromName :: HostName -> Host | 72 | hostFromName :: HostName -> Host |
@@ -79,18 +79,13 @@ hostFromName h@("vali") = defaultHost { hName = h | |||
79 | , hCoWsp = hCoWsp | 79 | , hCoWsp = hCoWsp |
80 | , hKeysMod = \conf -> Map.union $ Map.fromList $ join $ map (spawnBindings conf) [ (xK_d, ["dwb", "dwb $(xclip -o)"]) | 80 | , hKeysMod = \conf -> Map.union $ Map.fromList $ join $ map (spawnBindings conf) [ (xK_d, ["dwb", "dwb $(xclip -o)"]) |
81 | ] | 81 | ] |
82 | , hScreenPerm = hScreenPerm | 82 | , hScreens = [1, 0, 2..] |
83 | } | 83 | } |
84 | where | 84 | where |
85 | workspaceNames = Map.fromList [ (2, "web") | 85 | workspaceNames = Map.fromList [ (2, "web") |
86 | ] | 86 | ] |
87 | hWsp = wspFromMap workspaceNames | 87 | hWsp = wspFromMap workspaceNames |
88 | hCoWsp = coWspFromMap workspaceNames | 88 | hCoWsp = coWspFromMap workspaceNames |
89 | hScreenPerm = map hPrim | ||
90 | where | ||
91 | hPrim 1 = 2 | ||
92 | hPrim 2 = 1 | ||
93 | hPrim x = x | ||
94 | hostFromName _ = defaultHost | 89 | hostFromName _ = defaultHost |
95 | 90 | ||
96 | wspFromMap workspaceNames = \i -> case Map.lookup i workspaceNames of | 91 | wspFromMap workspaceNames = \i -> case Map.lookup i workspaceNames of |
@@ -307,7 +302,7 @@ myKeys' conf host = Map.fromList $ | |||
307 | ] | 302 | ] |
308 | ++ | 303 | ++ |
309 | [((m .|. modm .|. controlMask, k), screenWorkspace i >>= (flip whenJust) (windows . f)) | 304 | [((m .|. modm .|. controlMask, k), screenWorkspace i >>= (flip whenJust) (windows . f)) |
310 | | (i, k) <- zip (hScreenPerm host [0..]) [xK_g, xK_c, xK_r, xK_l] | 305 | | (i, k) <- zip (hScreens host) [xK_g, xK_c, xK_r, xK_l] |
311 | , (f, m) <- [(W.view, 0), (W.shift, shiftMask)] | 306 | , (f, m) <- [(W.view, 0), (W.shift, shiftMask)] |
312 | ] | 307 | ] |
313 | where | 308 | where |