From b660ccf2f4cab8b80596949cadd269a0d03a0325 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Wed, 15 Jul 2015 22:17:59 +0200 Subject: Added XMonad.Layout.OnHost to xmonad.hs --- .xmonad/xmonad.hs | 22 ++++++++++++---------- 1 file 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 import XMonad.Layout.SimplestFloat import XMonad.Layout.Renamed import XMonad.Layout.Reflect +import XMonad.Layout.OnHost import System.Process import System.Directory (removeFile) import System.Posix.Files @@ -57,7 +58,6 @@ data Host l1 l2 = Host , hWsp :: Integer -> WorkspaceId , hCoWsp :: String -> Maybe WorkspaceId , hKeysMod :: XConfig Layout -> (KeyMap -> KeyMap) - , hWspList :: [Integer] } defaultHost = Host { hName = "unkown" @@ -65,7 +65,6 @@ defaultHost = Host { hName = "unkown" , hWsp = show , hCoWsp = const Nothing , hKeysMod = const id - , hWspList = [1..] } --hostFromName :: (LayoutClass l1 a, LayoutClass l2 a) => HostName -> Host (l1 a) (l2 a) @@ -78,7 +77,6 @@ hostFromName h@("vali") = defaultHost { hName = h , hCoWsp = hCoWsp , hKeysMod = \conf -> Map.union $ Map.fromList $ join $ map (spawnBindings conf) [ (xK_d, ["dwb", "dwb $(xclip -o)"]) ] - , hWspList = [2..] } where workspaceNames = Map.fromList [ (2, "web") @@ -126,19 +124,23 @@ main = do , logHook = dynamicLogWithPP xmobarPP' , modMask = mod4Mask , keys = \conf -> hKeysMod host conf $ myKeys' conf - , workspaces = take (length numKeys) $ map wsp (hWspList host) + , workspaces = take (length numKeys) $ map wsp [1..] , startupHook = assimilateKeychain >> (sequence autostart) >> (setDefaultCursor xC_left_ptr) >> banishScreen LowerRight >> return () , normalBorderColor = "#202020" , focusedBorderColor = "white" } wsp = hWsp host -- We canĀ“t define per-host layout modifiers because we lack dependent types - layout' = onWorkspace (wsp 1) (noBorders Full ||| withIM (1%5) (Title "Buddy List") (tabbedLayout tabbedBottomAlways)) $ - onWorkspace (wsp 10) (noBorders Full) $ - onWorkspace (wsp 2) (noBorders Full ||| tabbedLayout tabbedBottomAlways) $ - onWorkspace (wsp 5) (tabbedLayout tabbedBottomAlways) $ - onWorkspace (wsp 8) (withIM (1%5) (Title "Friends") (tabbedLayout tabbedBottomAlways)) $ - defaultLayouts + layout' = onHost "skadhi" ( onWorkspace (wsp 1) (noBorders Full ||| withIM (1%5) (Title "Buddy List") (tabbedLayout tabbedBottomAlways)) $ + onWorkspace (wsp 10) (noBorders Full) $ + onWorkspace (wsp 2) (noBorders Full ||| tabbedLayout tabbedBottomAlways) $ + onWorkspace (wsp 5) (tabbedLayout tabbedBottomAlways) $ + onWorkspace (wsp 8) (withIM (1%5) (Title "Friends") (tabbedLayout tabbedBottomAlways)) $ + defaultLayouts + ) $ + onHost "vali" ( onWorkspace (wsp 2) (noBorders Full ||| tabbedLayout tabbedBottomAlways) $ + defaultLayouts + ) defaultLayouts = spiralWithDir East CW (1 % 2) ||| tabbedLayout tabbedBottom ||| noBorders Full ||| simplestFloat xmobarPP' = xmobarPP { ppOutput = hPutStrLn xmobarProc , ppTitle = shorten 50 -- cgit v1.2.3