]> git.rmz.io Git - dotfiles.git/commitdiff
weechat: attach to local tmux session if available
authorSamir Benmendil <me@rmz.io>
Thu, 10 Oct 2019 10:47:34 +0000 (10:47 +0000)
committerSamir Benmendil <me@rmz.io>
Thu, 10 Oct 2019 10:47:34 +0000 (10:47 +0000)
bin/weechat

index 997196598c05b6e25085b0873f0f9b33e1e4bf13..f13ff1ea768b95a408ef2caba78eae11b8a596e4 100755 (executable)
@@ -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