Skip to content

Instantly share code, notes, and snippets.

@typester
Created June 13, 2014 13:25
Show Gist options
  • Save typester/3a42a5be2dfeee43de93 to your computer and use it in GitHub Desktop.
Save typester/3a42a5be2dfeee43de93 to your computer and use it in GitHub Desktop.
#!/bin/sh
PATH=$HOME/homebrew/bin:$PATH
if [ -n "$TMUX" ]; then
echo "already in tmux session!!"
exit
fi
HELPER_RUNNING=$(ps aux | grep "[u]im-tmux-helper" 2>/dev/null)
if [ -z "$HELPER_RUNNING" ]; then
~/dev/bin/uim-tmux-helper &
fi
TMUX_SESSIONS=$(tmux ls 2>/dev/null)
if [ -z "$TMUX_SESSIONS" ]; then
uim-fep -s backtick -e tmux
else
uim-fep -s backtick -e tmux a -d
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment