host=rmz.io
-if [[ "$(hostnamectl --static)" == "$host" ]]; then
- /usr/bin/weechat "$@"
+if tmux -L weechat has-session -t weechat; then
+ tmux -L weechat attach
else
- autossh -M0 -t $host "tmux -u new-session -As weechat weechat"
+ autossh -M0 -t $host "tmux -L weechat attach"
fi