summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2015-07-04 14:23:45 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2015-07-04 14:23:45 +0200
commit47a4a723f34f54a180e8e0e0e775e6262ef752b0 (patch)
tree1753f6c1e380fa0931a91611cea3ec6801a0776e
parent88250cf5e4ab01c2e20d8e9ba85db12eb2342b92 (diff)
downloaddotfiles-47a4a723f34f54a180e8e0e0e775e6262ef752b0.tar
dotfiles-47a4a723f34f54a180e8e0e0e775e6262ef752b0.tar.gz
dotfiles-47a4a723f34f54a180e8e0e0e775e6262ef752b0.tar.bz2
dotfiles-47a4a723f34f54a180e8e0e0e775e6262ef752b0.tar.xz
dotfiles-47a4a723f34f54a180e8e0e0e775e6262ef752b0.zip
Type finangling
-rw-r--r--.xmonad/xmonad.hs5
1 files changed, 2 insertions, 3 deletions
diff --git a/.xmonad/xmonad.hs b/.xmonad/xmonad.hs
index 2877be1..fadc49a 100644
--- a/.xmonad/xmonad.hs
+++ b/.xmonad/xmonad.hs
@@ -76,7 +76,7 @@ hostFromName h@("vali") = defaultHost { hName = h
76 ] 76 ]
77 , hWsp = hWsp 77 , hWsp = hWsp
78 , hCoWsp = hCoWsp 78 , hCoWsp = hCoWsp
79 , hLayoutMod = mkMod [ (\wsp -> onWorkspace wsp $ noBorders Full ||| tabbedLayout tabbedBottomAlways) <$> hCoWsp "web" 79 , hLayoutMod = mkMod [ (\wsp -> onWorkspace wsp (noBorders Full ||| tabbedLayout tabbedBottomAlways)) <$> hCoWsp "web"
80 ] 80 ]
81 , hKeysMod = \conf -> Map.union $ Map.fromList $ join $ map (spawnBindings conf) [ (xK_d, ["dwb", "dwb $(xclip -o)"]) 81 , hKeysMod = \conf -> Map.union $ Map.fromList $ join $ map (spawnBindings conf) [ (xK_d, ["dwb", "dwb $(xclip -o)"])
82 ] 82 ]
@@ -86,6 +86,7 @@ hostFromName h@("vali") = defaultHost { hName = h
86 ] 86 ]
87 hWsp = wspFromMap workspaceNames 87 hWsp = wspFromMap workspaceNames
88 hCoWsp = coWspFromMap workspaceNames 88 hCoWsp = coWspFromMap workspaceNames
89 mkMod = foldl (.) id . catMaybes
89hostFromName _ = defaultHost 90hostFromName _ = defaultHost
90 91
91wspFromMap workspaceNames = \i -> case Map.lookup i workspaceNames of 92wspFromMap workspaceNames = \i -> case Map.lookup i workspaceNames of
@@ -97,8 +98,6 @@ coWspFromMap workspaceNames = \str -> case filter ((== str) . snd) $ Map.toList
97 [(i, _)] -> Just $ wspFromMap workspaceNames i 98 [(i, _)] -> Just $ wspFromMap workspaceNames i
98 _ -> Nothing 99 _ -> Nothing
99 100
100mkMod = foldl (.) id . catMaybes
101
102spawnModifiers = [0, controlMask, shiftMask .|. controlMask] 101spawnModifiers = [0, controlMask, shiftMask .|. controlMask]
103spawnBindings conf (k, cmds) = zipWith (\m cmd -> ((modm .|. mod1Mask .|. m, k), spawn cmd)) spawnModifiers cmds 102spawnBindings conf (k, cmds) = zipWith (\m cmd -> ((modm .|. mod1Mask .|. m, k), spawn cmd)) spawnModifiers cmds
104 where 103 where