From 920df251756c5de589f3a012778b714c32aac76b Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Fri, 3 Jul 2015 22:49:07 +0200 Subject: Additional xmonad libs --- .xmonad/xmonad.hs | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) (limited to '.xmonad/xmonad.hs') diff --git a/.xmonad/xmonad.hs b/.xmonad/xmonad.hs index cca4df1..f0e443f 100644 --- a/.xmonad/xmonad.hs +++ b/.xmonad/xmonad.hs @@ -40,7 +40,8 @@ import XMonad.Actions.Warp import XMonad.Layout.IM -import XMonad.Prompt.Shell +import XMonad.Prompt.MyShell +import XMonad.Prompt.MySsh wsp :: Int -> WorkspaceId wsp i = case Map.lookup i workspaceNames of @@ -135,6 +136,22 @@ xPConfig = defaultXPConfig { bgColor = "black" , borderColor = "white" } +sshOverrides = map (\h -> mkOverride { oHost = h, oCommand = moshCmd . inTmux } ) + [ + "odin", "odin.asgard.yggdrasil" + , "surtr", "yggdrasil.li", "surtr.yggdrasil.li", "praseodym.org", "surtr.praseodym.org", "surtr.141.li", "141.li" + , "vindler", "vindler.alfheim.yggdrasil" + , "ullr" + ] + ++ + map (\h -> mkOverride { oHost = h, oCommand = moshCmd' "/run/current-system/sw/bin/mosh-server" . withEnv [("TERM", "xterm")] . inTmux} ) + [ "bragi", "bragi.asgard.yggdrasil" + ] + ++ + map (\h -> mkOverride { oHost = h, oCommand = sshCmd . withEnv [("TERM", "xterm")] . inTmux } ) + [ "galois", "galois.praseodym.org" + ] + myKeys' conf = Map.fromList $ -- launch a terminal [ ((modm, xK_Return), spawn $ (XMonad.terminal conf) ++ " -e tmux") @@ -142,8 +159,9 @@ myKeys' conf = Map.fromList $ -- launch dmenu --, ((modm, xK_d ), spawn "exe=`dmenu_path | dmenu` && eval \"exec $exe\"") - , ((modm, xK_d ), shellPrompt xPConfig) - , ((modm .|. shiftMask, xK_d ), prompt ("urxvtc" ++ " -e") xPConfig) + , ((modm, xK_d ), shellPrompt "Run: " xPConfig) + , ((modm .|. shiftMask, xK_d ), prompt "Run in Terminal: " ("urxvtc" ++ " -e") xPConfig) + , ((modm, xK_at ), sshPrompt sshOverrides xPConfig) -- close focused window , ((modm .|. shiftMask, xK_q ), kill) -- cgit v1.2.3