Skip to content
Browse files

upgraded to tmux 1.7

  • Loading branch information...
1 parent 086fe27 commit 3e75bb49463c93fb4b4a22a62af8b6177e8038b1 @Soares committed Oct 14, 2012
Showing with 13 additions and 13 deletions.
  1. +1 −9 lib/multiplexor.zsh
  2. +12 −4 themes/so8res.zsh-theme
View
10 lib/multiplexor.zsh
@@ -1,13 +1,5 @@
if which tmux 2>&1 >/dev/null; then
- local SESSION_NAME="So8res"
-
- if [ $(tmux list-sessions 2>/dev/null | grep -c $SESSION_NAME) -eq 0 ]; then
- tmux -f $XDG_CONFIG_HOME/tmux/config new-session -s $SESSION_NAME -n main -d
- fi
-
if [[ $TERM == $GUI_TERM; ]]; then
- if [ -z $TMUX ]; then
- tmux attach-session -t $SESSION_NAME -d
- fi
+ tmux attach || tmux new
fi
fi
View
16 themes/so8res.zsh-theme
@@ -34,13 +34,18 @@ function battery_info {
echo "["$(battery_charge)"%%]"
fi
}
-function window_number {
- if which tmux 2>&1 >/dev/null; then
- if [[ $TERM == "tmux" ]]; then
- echo "%{$fg[blue]%}"$(tmux display-message -p "#I")"%{$fg[white]%}".
+function session_name {
+ if [[ $TERM == "tmux" ]]; then
+ if [[ $(tmux display-message -p "#S") == "0" ]]; then
+ echo "%{$fg[blue]%}"$(tmux display-message -p ":#S:")
fi
fi
}
+function window_number {
+ if [[ $TERM == "tmux" ]]; then
+ echo "%{$fg[blue]%}"$(tmux display-message -p "#I|#P")"%{$fg[white]%}".
+ fi
+}
COLOR_NAME='%{$fg[magenta]%}'
COLOR_HOST='%{$fg[yellow]%}'
@@ -65,3 +70,6 @@ RPROMPT=$COLOR_DAYNAME\$(date +"%a")' '$COLOR_DAYNUM\$(date +"%d")' '$COLOR_MONT
PROMPT=\$(window_number)$COLOR_NAME'%n'$COLOR_SPACE'@'$COLOR_HOST'%m'$COLOR_SPACE':'$COLOR_DIR\$(collapse_pwd)\$(git_prompt_info)$COLOR_ARROW'
'\$(prompt_char)' '$COLOR_RESET
+
+# Vim doesn't recognize .zsh-theme, I can't imagine why.
+# vim:ft=zsh

0 comments on commit 3e75bb4

Please sign in to comment.
Something went wrong with that request. Please try again.