X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/b879c5b2c5b47d6fe1e9f5fb99efd09bccaaf752..fa17f6dc11ab3a15f051dee0172f296fd0f2cf9d:/bin/weechat?ds=inline diff --git a/bin/weechat b/bin/weechat index 885837c..97d773d 100755 --- a/bin/weechat +++ b/bin/weechat @@ -1,10 +1,10 @@ -#!/usr/bin/zsh +#!/usr/bin/env zsh jobs -Z weechat host=rmz.io -if [[ "$(hostnamectl --static)" == "$host" ]]; then - /usr/bin/weechat "$@" +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 -u new-session -As weechat weechat" + ssh -t $host "LANG=en_GB.UTF-8 tmux -L weechat attach" fi