diff --git a/files/bin/tmux-reattach b/files/bin/tmux-reattach new file mode 100755 index 0000000..684f856 --- /dev/null +++ b/files/bin/tmux-reattach @@ -0,0 +1,9 @@ +#!/bin/sh + +if ! which tmux > /dev/null; then + exec screen -dRU +elif tmux list-sessions 2> /dev/null >&2; then + exec tmux attach +else + exec tmux new +fi