summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2015-07-15 22:17:59 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2015-07-15 22:17:59 +0200
commitb660ccf2f4cab8b80596949cadd269a0d03a0325 (patch)
tree74d803d2921d383ab107376619a1253dece5c699
parent4fb45bb2e553f1447440f30e74877124aada68d5 (diff)
downloaddotfiles-b660ccf2f4cab8b80596949cadd269a0d03a0325.tar
dotfiles-b660ccf2f4cab8b80596949cadd269a0d03a0325.tar.gz
dotfiles-b660ccf2f4cab8b80596949cadd269a0d03a0325.tar.bz2
dotfiles-b660ccf2f4cab8b80596949cadd269a0d03a0325.tar.xz
dotfiles-b660ccf2f4cab8b80596949cadd269a0d03a0325.zip
Added XMonad.Layout.OnHost to xmonad.hs
-rw-r--r--.xmonad/xmonad.hs22
1 files changed, 12 insertions, 10 deletions
diff --git a/.xmonad/xmonad.hs b/.xmonad/xmonad.hs
index cdffaa8..50766ac 100644
--- a/.xmonad/xmonad.hs
+++ b/.xmonad/xmonad.hs
@@ -25,6 +25,7 @@ import XMonad.Layout.PerWorkspace
25import XMonad.Layout.SimplestFloat 25import XMonad.Layout.SimplestFloat
26import XMonad.Layout.Renamed 26import XMonad.Layout.Renamed
27import XMonad.Layout.Reflect 27import XMonad.Layout.Reflect
28import XMonad.Layout.OnHost
28import System.Process 29import System.Process
29import System.Directory (removeFile) 30import System.Directory (removeFile)
30import System.Posix.Files 31import System.Posix.Files
@@ -57,7 +58,6 @@ data Host l1 l2 = Host
57 , hWsp :: Integer -> WorkspaceId 58 , hWsp :: Integer -> WorkspaceId
58 , hCoWsp :: String -> Maybe WorkspaceId 59 , hCoWsp :: String -> Maybe WorkspaceId
59 , hKeysMod :: XConfig Layout -> (KeyMap -> KeyMap) 60 , hKeysMod :: XConfig Layout -> (KeyMap -> KeyMap)
60 , hWspList :: [Integer]
61 } 61 }
62 62
63defaultHost = Host { hName = "unkown" 63defaultHost = Host { hName = "unkown"
@@ -65,7 +65,6 @@ defaultHost = Host { hName = "unkown"
65 , hWsp = show 65 , hWsp = show
66 , hCoWsp = const Nothing 66 , hCoWsp = const Nothing
67 , hKeysMod = const id 67 , hKeysMod = const id
68 , hWspList = [1..]
69 } 68 }
70 69
71--hostFromName :: (LayoutClass l1 a, LayoutClass l2 a) => HostName -> Host (l1 a) (l2 a) 70--hostFromName :: (LayoutClass l1 a, LayoutClass l2 a) => HostName -> Host (l1 a) (l2 a)
@@ -78,7 +77,6 @@ hostFromName h@("vali") = defaultHost { hName = h
78 , hCoWsp = hCoWsp 77 , hCoWsp = hCoWsp
79 , hKeysMod = \conf -> Map.union $ Map.fromList $ join $ map (spawnBindings conf) [ (xK_d, ["dwb", "dwb $(xclip -o)"]) 78 , hKeysMod = \conf -> Map.union $ Map.fromList $ join $ map (spawnBindings conf) [ (xK_d, ["dwb", "dwb $(xclip -o)"])
80 ] 79 ]
81 , hWspList = [2..]
82 } 80 }
83 where 81 where
84 workspaceNames = Map.fromList [ (2, "web") 82 workspaceNames = Map.fromList [ (2, "web")
@@ -126,19 +124,23 @@ main = do
126 , logHook = dynamicLogWithPP xmobarPP' 124 , logHook = dynamicLogWithPP xmobarPP'
127 , modMask = mod4Mask 125 , modMask = mod4Mask
128 , keys = \conf -> hKeysMod host conf $ myKeys' conf 126 , keys = \conf -> hKeysMod host conf $ myKeys' conf
129 , workspaces = take (length numKeys) $ map wsp (hWspList host) 127 , workspaces = take (length numKeys) $ map wsp [1..]
130 , startupHook = assimilateKeychain >> (sequence autostart) >> (setDefaultCursor xC_left_ptr) >> banishScreen LowerRight >> return () 128 , startupHook = assimilateKeychain >> (sequence autostart) >> (setDefaultCursor xC_left_ptr) >> banishScreen LowerRight >> return ()
131 , normalBorderColor = "#202020" 129 , normalBorderColor = "#202020"
132 , focusedBorderColor = "white" 130 , focusedBorderColor = "white"
133 } 131 }
134 wsp = hWsp host 132 wsp = hWsp host
135 -- We can´t define per-host layout modifiers because we lack dependent types 133 -- We can´t define per-host layout modifiers because we lack dependent types
136 layout' = onWorkspace (wsp 1) (noBorders Full ||| withIM (1%5) (Title "Buddy List") (tabbedLayout tabbedBottomAlways)) $ 134 layout' = onHost "skadhi" ( onWorkspace (wsp 1) (noBorders Full ||| withIM (1%5) (Title "Buddy List") (tabbedLayout tabbedBottomAlways)) $
137 onWorkspace (wsp 10) (noBorders Full) $ 135 onWorkspace (wsp 10) (noBorders Full) $
138 onWorkspace (wsp 2) (noBorders Full ||| tabbedLayout tabbedBottomAlways) $ 136 onWorkspace (wsp 2) (noBorders Full ||| tabbedLayout tabbedBottomAlways) $
139 onWorkspace (wsp 5) (tabbedLayout tabbedBottomAlways) $ 137 onWorkspace (wsp 5) (tabbedLayout tabbedBottomAlways) $
140 onWorkspace (wsp 8) (withIM (1%5) (Title "Friends") (tabbedLayout tabbedBottomAlways)) $ 138 onWorkspace (wsp 8) (withIM (1%5) (Title "Friends") (tabbedLayout tabbedBottomAlways)) $
141 defaultLayouts 139 defaultLayouts
140 ) $
141 onHost "vali" ( onWorkspace (wsp 2) (noBorders Full ||| tabbedLayout tabbedBottomAlways) $
142 defaultLayouts
143 )
142 defaultLayouts = spiralWithDir East CW (1 % 2) ||| tabbedLayout tabbedBottom ||| noBorders Full ||| simplestFloat 144 defaultLayouts = spiralWithDir East CW (1 % 2) ||| tabbedLayout tabbedBottom ||| noBorders Full ||| simplestFloat
143 xmobarPP' = xmobarPP { ppOutput = hPutStrLn xmobarProc 145 xmobarPP' = xmobarPP { ppOutput = hPutStrLn xmobarProc
144 , ppTitle = shorten 50 146 , ppTitle = shorten 50