From 1dd589ac06e5899c1071e562c6827771f84ec132 Mon Sep 17 00:00:00 2001 From: Samir Benmendil Date: Thu, 10 Oct 2019 10:47:34 +0000 Subject: [PATCH] weechat: attach to local tmux session if available --- bin/weechat | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/weechat b/bin/weechat index 9971965..f13ff1e 100755 --- a/bin/weechat +++ b/bin/weechat @@ -3,4 +3,8 @@ jobs -Z weechat host=rmz.io -autossh -M0 -t $host "LANG=en_GB.UTF-8 tmux -L weechat attach" +if tmux -L weechat has-session -t weechat; then + tmux -L weechat attach +else + autossh -M0 -t $host "tmux -L weechat attach" +fi -- 2.48.1