From 1514c30e46768eb978996660ad46ca8e48cef5b7 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sat, 15 May 2021 15:27:19 +0200 Subject: ... --- accounts/gkleen@sif/xmonad/lib/XMonad/Prompt/MySsh.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'accounts/gkleen@sif/xmonad/lib') diff --git a/accounts/gkleen@sif/xmonad/lib/XMonad/Prompt/MySsh.hs b/accounts/gkleen@sif/xmonad/lib/XMonad/Prompt/MySsh.hs index c85d0f92..729941aa 100644 --- a/accounts/gkleen@sif/xmonad/lib/XMonad/Prompt/MySsh.hs +++ b/accounts/gkleen@sif/xmonad/lib/XMonad/Prompt/MySsh.hs @@ -80,9 +80,12 @@ moshCmd' p c = concat , " -- " , cCommand c ] -inTmux c +inTmux Nothing c | null $ cCommand c = c { cCommand = "tmux new-session" } | otherwise = c { cCommand = "tmux new-session \"" ++ (cCommand c) ++ "\"" } +inTmux (Just h) c + | null $ cCommand c = c { cCommand = "tmux new-session -As " <> h } + | otherwise = c { cCommand = "tmux new-session \"" ++ (cCommand c) ++ "\"" } withEnv :: [(String, String)] -> Conn -> Conn withEnv envs c = c { cCommand = "env" ++ (concat $ map (\(n, v) -> ' ' : (n ++ "=" ++ v)) envs) ++ " " ++ (cCommand c) } -- cgit v1.2.3