Created
March 6, 2018 15:33
-
-
Save bronzehedwick/5eef02d298880c5a00afcb2dace137a4 to your computer and use it in GitHub Desktop.
Simple script to start or re-attach weechat with dtach
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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