From aa7aa6ab4548c4df79a417dda09b40fc1c69eeb0 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sat, 4 Jul 2015 13:40:10 +0200 Subject: Tweaked keychain command --- .xmonad/xmonad.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to '.xmonad/xmonad.hs') diff --git a/.xmonad/xmonad.hs b/.xmonad/xmonad.hs index 4e04fee..9566f99 100644 --- a/.xmonad/xmonad.hs +++ b/.xmonad/xmonad.hs @@ -132,7 +132,9 @@ autostart = [ spawnKeychain , safeSpawn "urxvtd" ["-q", "-f", "-o"] ] -spawnKeychain = runInTerm "" "keychain ~/.ssh/id_ecdsa ~/.ssh/id_rsa" +spawnKeychain = runInTerm "" $ "keychain " ++ concat keys + where + keys = map ("~/.ssh/id_" ++) ["ed25519", "ecdsa", "rsa"] assimilateKeychain :: X () assimilateKeychain = liftIO $ assimilateKeychain' >> return () -- cgit v1.2.3 From e43e604e967ed5df7b076b5e8f33e550cf0a1709 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sat, 4 Jul 2015 13:46:16 +0200 Subject: Changed order of autostarts --- .xmonad/xmonad.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '.xmonad/xmonad.hs') diff --git a/.xmonad/xmonad.hs b/.xmonad/xmonad.hs index 9566f99..f19606d 100644 --- a/.xmonad/xmonad.hs +++ b/.xmonad/xmonad.hs @@ -128,8 +128,8 @@ main = do } xmonad $ myConfig -autostart = [ spawnKeychain - , safeSpawn "urxvtd" ["-q", "-f", "-o"] +autostart = [ safeSpawn "urxvtd" ["-q", "-f", "-o"] + , spawnKeychain ] spawnKeychain = runInTerm "" $ "keychain " ++ concat keys -- cgit v1.2.3 From a4bd694b08b626ecd99ee17d121a05a2b1d15e19 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sat, 4 Jul 2015 13:54:56 +0200 Subject: explicitly spawning keychain as urxvt --- .xmonad/xmonad.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.xmonad/xmonad.hs') diff --git a/.xmonad/xmonad.hs b/.xmonad/xmonad.hs index f19606d..49778c5 100644 --- a/.xmonad/xmonad.hs +++ b/.xmonad/xmonad.hs @@ -132,7 +132,7 @@ autostart = [ safeSpawn "urxvtd" ["-q", "-f", "-o"] , spawnKeychain ] -spawnKeychain = runInTerm "" $ "keychain " ++ concat keys +spawnKeychain = safeSpawn "urxvt" $ ["-e", "keychain"] ++ keys where keys = map ("~/.ssh/id_" ++) ["ed25519", "ecdsa", "rsa"] -- cgit v1.2.3 From 7ee7f7ba3b55d89b2cbcf0fedf3bb5c25de7ae2b Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sat, 4 Jul 2015 14:16:59 +0200 Subject: Extension of xmonad.hs --- .xmonad/xmonad.hs | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) (limited to '.xmonad/xmonad.hs') diff --git a/.xmonad/xmonad.hs b/.xmonad/xmonad.hs index 49778c5..7245ad3 100644 --- a/.xmonad/xmonad.hs +++ b/.xmonad/xmonad.hs @@ -14,7 +14,7 @@ import Control.Monad.State (get) import XMonad.Layout.Spiral import Data.Ratio import Data.List -import Data.Maybe (fromMaybe, listToMaybe) +import Data.Maybe (fromMaybe, listToMaybe, catMaybes) import XMonad.Layout.Tabbed import XMonad.Prompt import XMonad.Util.Scratchpad @@ -53,6 +53,7 @@ data Host l1 l2 = Host { hName :: HostName , hManageHook :: ManageHook , hWsp :: Integer -> WorkspaceId + , hCoWsp :: String -> Maybe WorkspaceId , hLayoutMod :: l1 -> l2 , hKeysMod :: XConfig Layout -> (KeyMap -> KeyMap) } @@ -60,25 +61,42 @@ data Host l1 l2 = Host defaultHost = Host { hName = "unkown" , hManageHook = composeOne [manageScratchTerm] , hWsp = show + , hCoWsp = const Nothing , hLayoutMod = id , hKeysMod = const id } --hostFromName :: (LayoutClass l1 a, LayoutClass l2 a) => HostName -> Host (l1 a) (l2 a) hostFromName h@("vali") = defaultHost { hName = h - , hManageHook = hManageHook defaultHost - , hWsp = \i -> case Map.lookup i workspaceNames of - Just str -> show i ++ " " ++ str - Nothing -> show i - , hLayoutMod = id + , hManageHook = composeOne [ manageScratchTerm + , className =? ".dwb-wrapped" -?> doShift (wsp 2) + , className =? "Chromium" -?> doShift (wsp 2) + ] + , hWsp = hWsp + , hCoWsp = hCoWsp + , hLayoutMod = mkMod [ hCoWsp "web" >>= \wsp -> onWorkspace wsp (noBorders Full ||| tabbedLayout tabbedBottomAlways) + ] , hKeysMod = \conf -> Map.union $ Map.fromList $ join $ map (spawnBindings conf) [ (xK_d, ["dwb", "dwb $(xclip -o)"]) ] } where workspaceNames = Map.fromList [ (1, "web") ] + hWsp = wspFromMap workspaceNames + hCoWsp = coWspFromMap workspaceNames hostFromName _ = defaultHost +wspFromMap workspaceNames = \i -> case Map.lookup i workspaceNames of + Just str -> show i ++ " " ++ str + Nothing -> show i + +coWspFromMap workspaceNames = \str -> case filter ((== str) . snd) $ Map.toList workspaceNames of + [] -> Nothing + [(i, _)] -> Just $ wspFromMap workspaceNames i + _ -> Nothing + +mkMod = foldl (.) id . catMaybes + spawnModifiers = [0, controlMask, shiftMask .|. controlMask] spawnBindings conf (k, cmds) = zipWith (\m cmd -> ((modm .|. mod1Mask .|. m, k), spawn cmd)) spawnModifiers cmds where -- cgit v1.2.3 From 2eac61501ed8f1a5fe5d94edfafd35ba5043b898 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sat, 4 Jul 2015 14:20:28 +0200 Subject: code cleanup --- .xmonad/xmonad.hs | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) (limited to '.xmonad/xmonad.hs') diff --git a/.xmonad/xmonad.hs b/.xmonad/xmonad.hs index 7245ad3..c5d4532 100644 --- a/.xmonad/xmonad.hs +++ b/.xmonad/xmonad.hs @@ -68,10 +68,10 @@ defaultHost = Host { hName = "unkown" --hostFromName :: (LayoutClass l1 a, LayoutClass l2 a) => HostName -> Host (l1 a) (l2 a) hostFromName h@("vali") = defaultHost { hName = h - , hManageHook = composeOne [ manageScratchTerm - , className =? ".dwb-wrapped" -?> doShift (wsp 2) - , className =? "Chromium" -?> doShift (wsp 2) - ] + , hManageHook = composeOne $ catMaybes [ Just manageScratchTerm + , hCoWsp "web" >>= \wsp -> (className =? ".dwb-wrapped" -?> doShift wsp) + , hCoWsp "web" >>= \wsp -> (className =? "Chromium" -?> doShift wsp) + ] , hWsp = hWsp , hCoWsp = hCoWsp , hLayoutMod = mkMod [ hCoWsp "web" >>= \wsp -> onWorkspace wsp (noBorders Full ||| tabbedLayout tabbedBottomAlways) @@ -104,6 +104,19 @@ spawnBindings conf (k, cmds) = zipWith (\m cmd -> ((modm .|. mod1Mask .|. m, k), manageScratchTerm = resource =? "scratchpad" -?> doRectFloat $ RationalRect (1 % 16) (1 % 16) (7 % 8) (7 % 8) +tabbedLayout t = renamed [Replace "Tabbed"] $ reflectHoriz $ t CustomShrink $ tabbedTheme +tabbedTheme = defaultTheme { activeColor = "black" + , inactiveColor = "black" + , urgentColor = "black" + , activeBorderColor = "white" + , inactiveBorderColor = "#202020" + , urgentBorderColor = "#bb0000" + , activeTextColor = "white" + , inactiveTextColor = "white" + , urgentTextColor = "white" + , decoHeight = 16 + } + main = do xmobarProc <- spawnPipe "xmobar" host <- getHostName >>= return . hostFromName @@ -121,18 +134,6 @@ main = do } layout' = hLayoutMod host $ defaultLayouts defaultLayouts = spiralWithDir East CW (1 % 2) ||| tabbedLayout tabbedBottom ||| noBorders Full ||| simplestFloat - tabbedLayout t = renamed [Replace "Tabbed"] $ reflectHoriz $ t CustomShrink $ tabbedTheme - tabbedTheme = defaultTheme { activeColor = "black" - , inactiveColor = "black" - , urgentColor = "black" - , activeBorderColor = "white" - , inactiveBorderColor = "#202020" - , urgentBorderColor = "#bb0000" - , activeTextColor = "white" - , inactiveTextColor = "white" - , urgentTextColor = "white" - , decoHeight = 16 - } xmobarPP' = xmobarPP { ppOutput = hPutStrLn xmobarProc , ppTitle = shorten 50 , ppSort = (liftM2 (.)) getSortByIndex $ return scratchpadFilterOutWorkspace -- cgit v1.2.3 From 31e504757ac68ea2b3ad1303665453f7e0342806 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sat, 4 Jul 2015 14:22:15 +0200 Subject: Switched to applicative --- .xmonad/xmonad.hs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to '.xmonad/xmonad.hs') diff --git a/.xmonad/xmonad.hs b/.xmonad/xmonad.hs index c5d4532..8321f25 100644 --- a/.xmonad/xmonad.hs +++ b/.xmonad/xmonad.hs @@ -47,6 +47,8 @@ import XMonad.Prompt.MySsh import Network.HostName +import Control.Applicative (<$>) + type KeyMap = Map (ButtonMask, KeySym) (X ()) data Host l1 l2 = Host @@ -69,12 +71,12 @@ defaultHost = Host { hName = "unkown" --hostFromName :: (LayoutClass l1 a, LayoutClass l2 a) => HostName -> Host (l1 a) (l2 a) hostFromName h@("vali") = defaultHost { hName = h , hManageHook = composeOne $ catMaybes [ Just manageScratchTerm - , hCoWsp "web" >>= \wsp -> (className =? ".dwb-wrapped" -?> doShift wsp) - , hCoWsp "web" >>= \wsp -> (className =? "Chromium" -?> doShift wsp) + , (\wsp -> className =? ".dwb-wrapped" -?> doShift wsp) <$> hCoWsp "web" + , (\wsp -> className =? "Chromium" -?> doShift wsp) <$> hCoWsp "web" ] , hWsp = hWsp , hCoWsp = hCoWsp - , hLayoutMod = mkMod [ hCoWsp "web" >>= \wsp -> onWorkspace wsp (noBorders Full ||| tabbedLayout tabbedBottomAlways) + , hLayoutMod = mkMod [ (\wsp -> onWorkspace wsp $ noBorders Full ||| tabbedLayout tabbedBottomAlways) <$> hCoWsp "web" ] , hKeysMod = \conf -> Map.union $ Map.fromList $ join $ map (spawnBindings conf) [ (xK_d, ["dwb", "dwb $(xclip -o)"]) ] -- cgit v1.2.3 From 88250cf5e4ab01c2e20d8e9ba85db12eb2342b92 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sat, 4 Jul 2015 14:22:39 +0200 Subject: syntax --- .xmonad/xmonad.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.xmonad/xmonad.hs') diff --git a/.xmonad/xmonad.hs b/.xmonad/xmonad.hs index 8321f25..2877be1 100644 --- a/.xmonad/xmonad.hs +++ b/.xmonad/xmonad.hs @@ -47,7 +47,7 @@ import XMonad.Prompt.MySsh import Network.HostName -import Control.Applicative (<$>) +import Control.Applicative ((<$>)) type KeyMap = Map (ButtonMask, KeySym) (X ()) -- cgit v1.2.3 From 47a4a723f34f54a180e8e0e0e775e6262ef752b0 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sat, 4 Jul 2015 14:23:45 +0200 Subject: Type finangling --- .xmonad/xmonad.hs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to '.xmonad/xmonad.hs') 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 ] , hWsp = hWsp , hCoWsp = hCoWsp - , hLayoutMod = mkMod [ (\wsp -> onWorkspace wsp $ noBorders Full ||| tabbedLayout tabbedBottomAlways) <$> hCoWsp "web" + , hLayoutMod = mkMod [ (\wsp -> onWorkspace wsp (noBorders Full ||| tabbedLayout tabbedBottomAlways)) <$> hCoWsp "web" ] , hKeysMod = \conf -> Map.union $ Map.fromList $ join $ map (spawnBindings conf) [ (xK_d, ["dwb", "dwb $(xclip -o)"]) ] @@ -86,6 +86,7 @@ hostFromName h@("vali") = defaultHost { hName = h ] hWsp = wspFromMap workspaceNames hCoWsp = coWspFromMap workspaceNames + mkMod = foldl (.) id . catMaybes hostFromName _ = defaultHost wspFromMap workspaceNames = \i -> case Map.lookup i workspaceNames of @@ -97,8 +98,6 @@ coWspFromMap workspaceNames = \str -> case filter ((== str) . snd) $ Map.toList [(i, _)] -> Just $ wspFromMap workspaceNames i _ -> Nothing -mkMod = foldl (.) id . catMaybes - spawnModifiers = [0, controlMask, shiftMask .|. controlMask] spawnBindings conf (k, cmds) = zipWith (\m cmd -> ((modm .|. mod1Mask .|. m, k), spawn cmd)) spawnModifiers cmds where -- cgit v1.2.3 From d8a45dd9e240ae16c42db0b79c50a8e63c0daaff Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sat, 4 Jul 2015 14:28:03 +0200 Subject: more type wrangling --- .xmonad/xmonad.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to '.xmonad/xmonad.hs') diff --git a/.xmonad/xmonad.hs b/.xmonad/xmonad.hs index fadc49a..8813651 100644 --- a/.xmonad/xmonad.hs +++ b/.xmonad/xmonad.hs @@ -76,8 +76,7 @@ hostFromName h@("vali") = defaultHost { hName = h ] , hWsp = hWsp , hCoWsp = hCoWsp - , hLayoutMod = mkMod [ (\wsp -> onWorkspace wsp (noBorders Full ||| tabbedLayout tabbedBottomAlways)) <$> hCoWsp "web" - ] + , hLayoutMod = maybe' applyWeb , hKeysMod = \conf -> Map.union $ Map.fromList $ join $ map (spawnBindings conf) [ (xK_d, ["dwb", "dwb $(xclip -o)"]) ] } @@ -86,7 +85,8 @@ hostFromName h@("vali") = defaultHost { hName = h ] hWsp = wspFromMap workspaceNames hCoWsp = coWspFromMap workspaceNames - mkMod = foldl (.) id . catMaybes + maybe' = fromMaybe id + applyWeb = (\wsp -> onWorkspace wsp (noBorders Full ||| tabbedLayout tabbedBottomAlways)) <$> hCoWsp "web" hostFromName _ = defaultHost wspFromMap workspaceNames = \i -> case Map.lookup i workspaceNames of -- cgit v1.2.3 From 99bbf037e6966dd17c5dd1026b1dc5d1cedba13c Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sat, 4 Jul 2015 14:29:24 +0200 Subject: workspace numbers need to be statically known because layouts are type-level --- .xmonad/xmonad.hs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to '.xmonad/xmonad.hs') diff --git a/.xmonad/xmonad.hs b/.xmonad/xmonad.hs index 8813651..e1ed49b 100644 --- a/.xmonad/xmonad.hs +++ b/.xmonad/xmonad.hs @@ -76,7 +76,7 @@ hostFromName h@("vali") = defaultHost { hName = h ] , hWsp = hWsp , hCoWsp = hCoWsp - , hLayoutMod = maybe' applyWeb + , hLayoutMod = onWorkspace (hWsp 1) (noBorders Full ||| tabbedLayout tabbedBottomAlways) , hKeysMod = \conf -> Map.union $ Map.fromList $ join $ map (spawnBindings conf) [ (xK_d, ["dwb", "dwb $(xclip -o)"]) ] } @@ -85,8 +85,6 @@ hostFromName h@("vali") = defaultHost { hName = h ] hWsp = wspFromMap workspaceNames hCoWsp = coWspFromMap workspaceNames - maybe' = fromMaybe id - applyWeb = (\wsp -> onWorkspace wsp (noBorders Full ||| tabbedLayout tabbedBottomAlways)) <$> hCoWsp "web" hostFromName _ = defaultHost wspFromMap workspaceNames = \i -> case Map.lookup i workspaceNames of -- cgit v1.2.3 From 903cb3786747f04e01a6a5f35a6bd9f10a3ff14c Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sat, 4 Jul 2015 14:34:04 +0200 Subject: Removed per-host layout modifiers --- .xmonad/xmonad.hs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to '.xmonad/xmonad.hs') diff --git a/.xmonad/xmonad.hs b/.xmonad/xmonad.hs index e1ed49b..4cc7f63 100644 --- a/.xmonad/xmonad.hs +++ b/.xmonad/xmonad.hs @@ -56,7 +56,6 @@ data Host l1 l2 = Host , hManageHook :: ManageHook , hWsp :: Integer -> WorkspaceId , hCoWsp :: String -> Maybe WorkspaceId - , hLayoutMod :: l1 -> l2 , hKeysMod :: XConfig Layout -> (KeyMap -> KeyMap) } @@ -64,7 +63,6 @@ defaultHost = Host { hName = "unkown" , hManageHook = composeOne [manageScratchTerm] , hWsp = show , hCoWsp = const Nothing - , hLayoutMod = id , hKeysMod = const id } @@ -76,7 +74,6 @@ hostFromName h@("vali") = defaultHost { hName = h ] , hWsp = hWsp , hCoWsp = hCoWsp - , hLayoutMod = onWorkspace (hWsp 1) (noBorders Full ||| tabbedLayout tabbedBottomAlways) , hKeysMod = \conf -> Map.union $ Map.fromList $ join $ map (spawnBindings conf) [ (xK_d, ["dwb", "dwb $(xclip -o)"]) ] } @@ -131,7 +128,13 @@ main = do , normalBorderColor = "#202020" , focusedBorderColor = "white" } - layout' = hLayoutMod host $ defaultLayouts + -- 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 defaultLayouts = spiralWithDir East CW (1 % 2) ||| tabbedLayout tabbedBottom ||| noBorders Full ||| simplestFloat xmobarPP' = xmobarPP { ppOutput = hPutStrLn xmobarProc , ppTitle = shorten 50 -- cgit v1.2.3 From 8f008a3c52e156e07dd35edd1e69651a6f17c648 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sat, 4 Jul 2015 14:34:57 +0200 Subject: Fixed copied code part --- .xmonad/xmonad.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to '.xmonad/xmonad.hs') diff --git a/.xmonad/xmonad.hs b/.xmonad/xmonad.hs index 4cc7f63..e6a581d 100644 --- a/.xmonad/xmonad.hs +++ b/.xmonad/xmonad.hs @@ -123,11 +123,12 @@ main = do , logHook = dynamicLogWithPP xmobarPP' , modMask = mod4Mask , keys = \conf -> hKeysMod host conf $ myKeys' conf - , workspaces = take (length numKeys) $ map (hWsp host) [1..] + , 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) $ -- cgit v1.2.3 From b444dd254cc983228afa61795d25a4ea11e0bc31 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sat, 4 Jul 2015 14:36:43 +0200 Subject: per-host selection of available workspaces --- .xmonad/xmonad.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to '.xmonad/xmonad.hs') diff --git a/.xmonad/xmonad.hs b/.xmonad/xmonad.hs index e6a581d..c0f1049 100644 --- a/.xmonad/xmonad.hs +++ b/.xmonad/xmonad.hs @@ -64,6 +64,7 @@ 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) @@ -76,9 +77,10 @@ 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 [ (1, "web") + workspaceNames = Map.fromList [ (2, "web") ] hWsp = wspFromMap workspaceNames hCoWsp = coWspFromMap workspaceNames @@ -123,7 +125,7 @@ main = do , logHook = dynamicLogWithPP xmobarPP' , modMask = mod4Mask , keys = \conf -> hKeysMod host conf $ myKeys' conf - , workspaces = take (length numKeys) $ map wsp [1..] + , workspaces = take (length numKeys) $ map wsp (hWspList host) , startupHook = assimilateKeychain >> (sequence autostart) >> (setDefaultCursor xC_left_ptr) >> banishScreen LowerRight >> return () , normalBorderColor = "#202020" , focusedBorderColor = "white" -- cgit v1.2.3 From 92fdd2b1e4c24066f777c4f1a77e277642accb4b Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sat, 4 Jul 2015 14:37:18 +0200 Subject: Record fix --- .xmonad/xmonad.hs | 1 + 1 file changed, 1 insertion(+) (limited to '.xmonad/xmonad.hs') diff --git a/.xmonad/xmonad.hs b/.xmonad/xmonad.hs index c0f1049..cdffaa8 100644 --- a/.xmonad/xmonad.hs +++ b/.xmonad/xmonad.hs @@ -57,6 +57,7 @@ data Host l1 l2 = Host , hWsp :: Integer -> WorkspaceId , hCoWsp :: String -> Maybe WorkspaceId , hKeysMod :: XConfig Layout -> (KeyMap -> KeyMap) + , hWspList :: [Integer] } defaultHost = Host { hName = "unkown" -- cgit v1.2.3 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(-) (limited to '.xmonad/xmonad.hs') 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 From 8325e5ea5d93712e158568da1434b3beb42e52a2 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Wed, 15 Jul 2015 22:21:25 +0200 Subject: Added missing argument --- .xmonad/xmonad.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to '.xmonad/xmonad.hs') diff --git a/.xmonad/xmonad.hs b/.xmonad/xmonad.hs index 50766ac..87d780f 100644 --- a/.xmonad/xmonad.hs +++ b/.xmonad/xmonad.hs @@ -140,7 +140,8 @@ main = do ) $ onHost "vali" ( onWorkspace (wsp 2) (noBorders Full ||| tabbedLayout tabbedBottomAlways) $ defaultLayouts - ) + ) $ + defaultLayouts defaultLayouts = spiralWithDir East CW (1 % 2) ||| tabbedLayout tabbedBottom ||| noBorders Full ||| simplestFloat xmobarPP' = xmobarPP { ppOutput = hPutStrLn xmobarProc , ppTitle = shorten 50 -- cgit v1.2.3 From b0c55c16b555aa6d5d1a30b327f77b42399ea66e Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Wed, 15 Jul 2015 22:26:57 +0200 Subject: Introduced permutations to screen numbers in order to be more intuitive --- .xmonad/xmonad.hs | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to '.xmonad/xmonad.hs') diff --git a/.xmonad/xmonad.hs b/.xmonad/xmonad.hs index 87d780f..6ee9140 100644 --- a/.xmonad/xmonad.hs +++ b/.xmonad/xmonad.hs @@ -52,12 +52,13 @@ import Control.Applicative ((<$>)) type KeyMap = Map (ButtonMask, KeySym) (X ()) -data Host l1 l2 = Host +data Host = Host { hName :: HostName , hManageHook :: ManageHook , hWsp :: Integer -> WorkspaceId , hCoWsp :: String -> Maybe WorkspaceId , hKeysMod :: XConfig Layout -> (KeyMap -> KeyMap) + , hScreenPerm :: [Integer] -> [Integer] } defaultHost = Host { hName = "unkown" @@ -65,9 +66,10 @@ defaultHost = Host { hName = "unkown" , hWsp = show , hCoWsp = const Nothing , hKeysMod = const id + , hScreenPerm = id } ---hostFromName :: (LayoutClass l1 a, LayoutClass l2 a) => HostName -> Host (l1 a) (l2 a) +hostFromName :: HostName -> Host (l1 a) (l2 a) hostFromName h@("vali") = defaultHost { hName = h , hManageHook = composeOne $ catMaybes [ Just manageScratchTerm , (\wsp -> className =? ".dwb-wrapped" -?> doShift wsp) <$> hCoWsp "web" @@ -77,12 +79,16 @@ 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 } where workspaceNames = Map.fromList [ (2, "web") ] hWsp = wspFromMap workspaceNames hCoWsp = coWspFromMap workspaceNames + hScreenPerm 1 = 2 + hScreenPerm 2 = 1 + hScreenPerm x = x hostFromName _ = defaultHost wspFromMap workspaceNames = \i -> case Map.lookup i workspaceNames of @@ -123,7 +129,7 @@ main = do , layoutHook = smartBorders $ avoidStruts layout' , logHook = dynamicLogWithPP xmobarPP' , modMask = mod4Mask - , keys = \conf -> hKeysMod host conf $ myKeys' conf + , keys = \conf -> hKeysMod host conf $ myKeys' conf host , workspaces = take (length numKeys) $ map wsp [1..] , startupHook = assimilateKeychain >> (sequence autostart) >> (setDefaultCursor xC_left_ptr) >> banishScreen LowerRight >> return () , normalBorderColor = "#202020" @@ -213,7 +219,7 @@ sshOverrides = map (\h -> mkOverride { oHost = h, oCommand = moshCmd . inTmux } [ "galois", "galois.praseodym.org" ] -myKeys' conf = Map.fromList $ +myKeys' conf host = Map.fromList $ -- launch a terminal [ ((modm, xK_Return), spawn $ (XMonad.terminal conf) ++ " -e tmux") , ((modm .|. controlMask, xK_Return), scratchpadSpawnActionCustom $ (XMonad.terminal conf) ++ " -name scratchpad -title scratchpad -e tmux") @@ -299,7 +305,7 @@ myKeys' conf = Map.fromList $ ] ++ [((m .|. modm .|. controlMask, k), screenWorkspace i >>= (flip whenJust) (windows . f)) - | (i, k) <- zip [0..] [xK_g, xK_c, xK_r, xK_l] + | (i, k) <- zip (hScreenPerm host [0..]) [xK_g, xK_c, xK_r, xK_l] , (f, m) <- [(W.view, 0), (W.shift, shiftMask)] ] where -- cgit v1.2.3 From 20926877d27f448e038159c037a94e55aed38325 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Wed, 15 Jul 2015 22:28:15 +0200 Subject: Removed type artifact --- .xmonad/xmonad.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.xmonad/xmonad.hs') diff --git a/.xmonad/xmonad.hs b/.xmonad/xmonad.hs index 6ee9140..a41e4d0 100644 --- a/.xmonad/xmonad.hs +++ b/.xmonad/xmonad.hs @@ -69,7 +69,7 @@ defaultHost = Host { hName = "unkown" , hScreenPerm = id } -hostFromName :: HostName -> Host (l1 a) (l2 a) +hostFromName :: HostName -> Host hostFromName h@("vali") = defaultHost { hName = h , hManageHook = composeOne $ catMaybes [ Just manageScratchTerm , (\wsp -> className =? ".dwb-wrapped" -?> doShift wsp) <$> hCoWsp "web" -- cgit v1.2.3 From 912c33e92c5981a5275572030986790d13a2acf5 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Wed, 15 Jul 2015 22:29:31 +0200 Subject: ScreenIds are ScreenId's not Integer's --- .xmonad/xmonad.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.xmonad/xmonad.hs') diff --git a/.xmonad/xmonad.hs b/.xmonad/xmonad.hs index a41e4d0..569d428 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 :: [Integer] -> [Integer] + , hScreenPerm :: [ScreenId] -> [ScreenId] } defaultHost = Host { hName = "unkown" -- cgit v1.2.3 From 4589fe7915a52ab216897782aea378b07076b61f Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Wed, 15 Jul 2015 22:31:21 +0200 Subject: Proper type for hScreenPerm --- .xmonad/xmonad.hs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to '.xmonad/xmonad.hs') diff --git a/.xmonad/xmonad.hs b/.xmonad/xmonad.hs index 569d428..287247d 100644 --- a/.xmonad/xmonad.hs +++ b/.xmonad/xmonad.hs @@ -86,9 +86,11 @@ hostFromName h@("vali") = defaultHost { hName = h ] hWsp = wspFromMap workspaceNames hCoWsp = coWspFromMap workspaceNames - hScreenPerm 1 = 2 - hScreenPerm 2 = 1 - hScreenPerm x = x + hScreenPerm = map hPrim + where + hPrim 1 = 2 + hPrim 2 = 1 + hPrim x = x hostFromName _ = defaultHost wspFromMap workspaceNames = \i -> case Map.lookup i workspaceNames of -- cgit v1.2.3 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/xmonad.hs') 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 From 00bf13197996c7db9cc7bee07e423bef75ffdb93 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Wed, 15 Jul 2015 22:38:01 +0200 Subject: Tweaked list ranges for syntax --- .xmonad/xmonad.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '.xmonad/xmonad.hs') diff --git a/.xmonad/xmonad.hs b/.xmonad/xmonad.hs index 903eff4..c172147 100644 --- a/.xmonad/xmonad.hs +++ b/.xmonad/xmonad.hs @@ -66,7 +66,7 @@ defaultHost = Host { hName = "unkown" , hWsp = show , hCoWsp = const Nothing , hKeysMod = const id - , hScreens = [0..] + , hScreens = [0,1..] } hostFromName :: HostName -> Host @@ -79,7 +79,7 @@ hostFromName h@("vali") = defaultHost { hName = h , hCoWsp = hCoWsp , hKeysMod = \conf -> Map.union $ Map.fromList $ join $ map (spawnBindings conf) [ (xK_d, ["dwb", "dwb $(xclip -o)"]) ] - , hScreens = [1, 0, 2..] + , hScreens = [1, 0] ++ [2,3..] } where workspaceNames = Map.fromList [ (2, "web") -- cgit v1.2.3 From 4cb0c1bfd386a3a9bf69bc94d8d394988565dffe Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Wed, 15 Jul 2015 22:43:03 +0200 Subject: Better workspace assignments & emacs on vali --- .xmonad/xmonad.hs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to '.xmonad/xmonad.hs') diff --git a/.xmonad/xmonad.hs b/.xmonad/xmonad.hs index c172147..c0a18c3 100644 --- a/.xmonad/xmonad.hs +++ b/.xmonad/xmonad.hs @@ -72,8 +72,9 @@ defaultHost = Host { hName = "unkown" hostFromName :: HostName -> Host hostFromName h@("vali") = defaultHost { hName = h , hManageHook = composeOne $ catMaybes [ Just manageScratchTerm - , (\wsp -> className =? ".dwb-wrapped" -?> doShift wsp) <$> hCoWsp "web" - , (\wsp -> className =? "Chromium" -?> doShift wsp) <$> hCoWsp "web" + , assign "web" $ className =? ".dwb-wrapped" + , assign "web" $ className =? "Chromium" + , assign "work" $ className =? "Emacs" ] , hWsp = hWsp , hCoWsp = hCoWsp @@ -83,9 +84,11 @@ hostFromName h@("vali") = defaultHost { hName = h } where workspaceNames = Map.fromList [ (2, "web") + , (3, "work") ] hWsp = wspFromMap workspaceNames hCoWsp = coWspFromMap workspaceNames + assign wsp test = (\wsp -> test -?> doShift wsp) <$> hCoWsp wsp hostFromName _ = defaultHost wspFromMap workspaceNames = \i -> case Map.lookup i workspaceNames of -- cgit v1.2.3 From 1ebe553662f95c877acd716555aee404af994420 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Wed, 15 Jul 2015 22:50:43 +0200 Subject: Removed urxvtd from xmonad.hs due to now existant systemd unit --- .xmonad/xmonad.hs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to '.xmonad/xmonad.hs') diff --git a/.xmonad/xmonad.hs b/.xmonad/xmonad.hs index c0a18c3..0687afb 100644 --- a/.xmonad/xmonad.hs +++ b/.xmonad/xmonad.hs @@ -162,8 +162,7 @@ main = do } xmonad $ myConfig -autostart = [ safeSpawn "urxvtd" ["-q", "-f", "-o"] - , spawnKeychain +autostart = [ spawnKeychain ] spawnKeychain = safeSpawn "urxvt" $ ["-e", "keychain"] ++ keys -- cgit v1.2.3 From ef6720c055c91c75b1f00467bbcead6ff52d23d5 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Wed, 15 Jul 2015 23:21:36 +0200 Subject: Emacs keybinding for xmonad on vali --- .xmonad/xmonad.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to '.xmonad/xmonad.hs') diff --git a/.xmonad/xmonad.hs b/.xmonad/xmonad.hs index 0687afb..91af611 100644 --- a/.xmonad/xmonad.hs +++ b/.xmonad/xmonad.hs @@ -79,7 +79,8 @@ hostFromName h@("vali") = defaultHost { hName = h , hWsp = hWsp , hCoWsp = hCoWsp , hKeysMod = \conf -> Map.union $ Map.fromList $ join $ map (spawnBindings conf) [ (xK_d, ["dwb", "dwb $(xclip -o)"]) - ] + (xK_e, ["emacsclient", "-c"]) + ] , hScreens = [1, 0] ++ [2,3..] } where -- cgit v1.2.3 From f730cf5e57ae33ddef1b74c2ee9a9386e51e9ea8 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Wed, 15 Jul 2015 23:23:38 +0200 Subject: , --- .xmonad/xmonad.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.xmonad/xmonad.hs') diff --git a/.xmonad/xmonad.hs b/.xmonad/xmonad.hs index 91af611..1deaabf 100644 --- a/.xmonad/xmonad.hs +++ b/.xmonad/xmonad.hs @@ -79,7 +79,7 @@ hostFromName h@("vali") = defaultHost { hName = h , hWsp = hWsp , hCoWsp = hCoWsp , hKeysMod = \conf -> Map.union $ Map.fromList $ join $ map (spawnBindings conf) [ (xK_d, ["dwb", "dwb $(xclip -o)"]) - (xK_e, ["emacsclient", "-c"]) + , (xK_e, ["emacsclient", "-c"]) ] , hScreens = [1, 0] ++ [2,3..] } -- cgit v1.2.3 From 7e14dc64630e39adf884f229a57b5431fec434a5 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Wed, 15 Jul 2015 23:24:57 +0200 Subject: semantic fix --- .xmonad/xmonad.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.xmonad/xmonad.hs') diff --git a/.xmonad/xmonad.hs b/.xmonad/xmonad.hs index 1deaabf..35112a5 100644 --- a/.xmonad/xmonad.hs +++ b/.xmonad/xmonad.hs @@ -79,7 +79,7 @@ hostFromName h@("vali") = defaultHost { hName = h , hWsp = hWsp , hCoWsp = hCoWsp , hKeysMod = \conf -> Map.union $ Map.fromList $ join $ map (spawnBindings conf) [ (xK_d, ["dwb", "dwb $(xclip -o)"]) - , (xK_e, ["emacsclient", "-c"]) + , (xK_e, ["emacsclient -c"]) ] , hScreens = [1, 0] ++ [2,3..] } -- cgit v1.2.3 From 8f0c21a828f9f2b854f5850b454a3b0b76476493 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Thu, 16 Jul 2015 19:29:03 +0200 Subject: Moved urxvtd back into xmonad; Fixed spawnKeychain in xmonad --- .xmonad/xmonad.hs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to '.xmonad/xmonad.hs') diff --git a/.xmonad/xmonad.hs b/.xmonad/xmonad.hs index 35112a5..621d1e1 100644 --- a/.xmonad/xmonad.hs +++ b/.xmonad/xmonad.hs @@ -40,6 +40,9 @@ import Control.Monad (when) import Graphics.X11.ExtraTypes.XF86 import XMonad.Util.Cursor import XMonad.Actions.Warp +import XMonad.Util.SpawnOnce +import System.Directory +import System.FilePath import XMonad.Layout.IM @@ -164,11 +167,13 @@ main = do xmonad $ myConfig autostart = [ spawnKeychain + , spawnOnce "urxvtd -o" ] -spawnKeychain = safeSpawn "urxvt" $ ["-e", "keychain"] ++ keys - where - keys = map ("~/.ssh/id_" ++) ["ed25519", "ecdsa", "rsa"] +spawnKeychain = do + home <- liftIO getHomeDirectory + let keys = map ((home ) . ("/.ssh/id_" ++)) ["ed25519", "ecdsa", "rsa"] + safeSpawn "urxvt" $ ["-e", "keychain"] ++ keys assimilateKeychain :: X () assimilateKeychain = liftIO $ assimilateKeychain' >> return () -- cgit v1.2.3 From e62a346d035773783ae0ce72963f9bdfb5a03601 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Thu, 16 Jul 2015 19:33:04 +0200 Subject: Managing keychain terminal like scratchpad --- .xmonad/xmonad.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '.xmonad/xmonad.hs') diff --git a/.xmonad/xmonad.hs b/.xmonad/xmonad.hs index 621d1e1..ab3bc4c 100644 --- a/.xmonad/xmonad.hs +++ b/.xmonad/xmonad.hs @@ -109,7 +109,7 @@ spawnBindings conf (k, cmds) = zipWith (\m cmd -> ((modm .|. mod1Mask .|. m, k), where modm = XMonad.modMask conf -manageScratchTerm = resource =? "scratchpad" -?> doRectFloat $ RationalRect (1 % 16) (1 % 16) (7 % 8) (7 % 8) +manageScratchTerm = (resource =? "scratchpad" <||> resource =? "keysetup") -?> doRectFloat $ RationalRect (1 % 16) (1 % 16) (7 % 8) (7 % 8) tabbedLayout t = renamed [Replace "Tabbed"] $ reflectHoriz $ t CustomShrink $ tabbedTheme tabbedTheme = defaultTheme { activeColor = "black" @@ -173,7 +173,7 @@ autostart = [ spawnKeychain spawnKeychain = do home <- liftIO getHomeDirectory let keys = map ((home ) . ("/.ssh/id_" ++)) ["ed25519", "ecdsa", "rsa"] - safeSpawn "urxvt" $ ["-e", "keychain"] ++ keys + safeSpawn "urxvt" $ ["-title", "keysetup", "-e", "keychain"] ++ keys assimilateKeychain :: X () assimilateKeychain = liftIO $ assimilateKeychain' >> return () -- cgit v1.2.3 From 48cd5862c2982ec6f48d086e8683d486588e3f4f Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 13 Sep 2015 22:13:34 +0200 Subject: Switched from broken dwb to chromium on vali --- .xmonad/xmonad.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.xmonad/xmonad.hs') diff --git a/.xmonad/xmonad.hs b/.xmonad/xmonad.hs index ab3bc4c..353041d 100644 --- a/.xmonad/xmonad.hs +++ b/.xmonad/xmonad.hs @@ -81,7 +81,7 @@ hostFromName h@("vali") = defaultHost { hName = h ] , hWsp = hWsp , hCoWsp = hCoWsp - , hKeysMod = \conf -> Map.union $ Map.fromList $ join $ map (spawnBindings conf) [ (xK_d, ["dwb", "dwb $(xclip -o)"]) + , hKeysMod = \conf -> Map.union $ Map.fromList $ join $ map (spawnBindings conf) [ (xK_d, ["chromium", "chromium $(xclip -o)"]) , (xK_e, ["emacsclient -c"]) ] , hScreens = [1, 0] ++ [2,3..] -- cgit v1.2.3