summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bashrc/common/prompt.sh4
-rw-r--r--screenrc3
2 files changed, 5 insertions, 2 deletions
diff --git a/bashrc/common/prompt.sh b/bashrc/common/prompt.sh
index 0c14d84..00e95b6 100644
--- a/bashrc/common/prompt.sh
+++ b/bashrc/common/prompt.sh
@@ -27,7 +27,7 @@ __make_prompt() {
fi
# environment flags
- [[ "${TERM#screen}" != "${TERM}" ]] && PS1F="${PS1F}$(pcolor lcyan)s$(pcolor)"
+ [[ -n "${TMUX}" || -n "${SCREEN}" ]] && PS1F="${PS1F}$(pcolor lcyan)s$(pcolor)"
# python virtual env
[[ -n "${VIRTUAL_ENV}" ]] && PS1VE="$(pcolor lred)<${VIRTUAL_ENV#${WORKON_HOME}/}>$(pcolor) "
@@ -109,7 +109,7 @@ __make_prompt() {
export PS1="${PS1VE}${PS1UH}${PS1D} ${PS1BO}${PS1R}${PS1F}${PS1BC} ${s}${PS1P}"
- if [[ "${TERM#screen}" != "${TERM}" ]]; then
+ if [[ -n "${TMUX}" || -n "${TMUX}" ]]; then
echo -ne "\ek$(id -un)@${_hostname%%\.*}\e\\"
fi
}
diff --git a/screenrc b/screenrc
index 4e0a8a9..9761ca6 100644
--- a/screenrc
+++ b/screenrc
@@ -50,3 +50,6 @@ bind = resize =
bind + resize +3
bind - resize -3
bind _ resize max
+
+# register screen
+setenv SCREEN 1