Skip to content

Instantly share code, notes, and snippets.

@bronzehedwick
Created March 6, 2018 15:33
Show Gist options
  • Save bronzehedwick/5eef02d298880c5a00afcb2dace137a4 to your computer and use it in GitHub Desktop.
Save bronzehedwick/5eef02d298880c5a00afcb2dace137a4 to your computer and use it in GitHub Desktop.
Simple script to start or re-attach weechat with dtach
#!/bin/sh
command -v dtach >/dev/null 2>&1 || { echo >&2 "Need dtach installed. Aborting." exit 1; }
command -v weechat >/dev/null 2>&1 || { echo >&2 "Need weechat installed. Aborting." exit 1; }
if [ -f /tmp/weechat ]; then
dtach -a /tmp/weechat
else
dtach -A /tmp/weechat weechat
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment