]> git.rmz.io Git - dotfiles.git/blobdiff - bin/weechat
tmux: add tmux plugin manager (tpm) as a submodule
[dotfiles.git] / bin / weechat
index 997196598c05b6e25085b0873f0f9b33e1e4bf13..f95651d7ae0548b0749abae0960378d5bc45e057 100755 (executable)
@@ -1,6 +1,10 @@
-#!/usr/bin/zsh
+#!/usr/bin/env zsh
 jobs -Z weechat
 
 host=rmz.io
 
 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 2>/dev/null; then
+    tmux -L weechat attach
+else
+    autossh -M0 -t $host "LANG=en_GB.UTF-8 tmux -L weechat attach"
+fi