]> git.rmz.io Git - dotfiles.git/blobdiff - bin/weechat
lazyvim: absorb keymaps
[dotfiles.git] / bin / weechat
index 885837cada170e8408cec0f7a6bb5eacab639016..97d773de1e38ad19f32f55911fc7a7204b3199c9 100755 (executable)
@@ -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