Oliver Davies
d1da7c6e15
Re-organise to use a bare repo, e.g. https://www.atlassian.com/git/tutorials/dotfiles.
23 lines
412 B
Bash
23 lines
412 B
Bash
_not_inside_tmux() {
|
|
[[ -z "$TMUX" ]]
|
|
}
|
|
|
|
_not_inside_phpstorm() {
|
|
if is_macos; then
|
|
# VS Code returns "vscode".
|
|
# iTerm returns "iTerm.app".
|
|
# PhpStorm returns nothing.
|
|
[[ "$TERM_PROGRAM" != "" ]]
|
|
elif is_linux; then
|
|
[[ "$TERMINAL_EMULATOR" != "JetBrains"* ]]
|
|
fi
|
|
}
|
|
|
|
ensure_tmux_is_running() {
|
|
if _not_inside_tmux && _not_inside_phpstorm; then
|
|
tat
|
|
fi
|
|
}
|
|
|
|
ensure_tmux_is_running
|