made use of #{==:a,b} to implement #{root} when available
compare the output of _username() to 'root' instead of deferring to the _root() helper
This commit is contained in:
parent
f54cede368
commit
89bc03c612
1 changed files with 16 additions and 6 deletions
22
.tmux.conf
22
.tmux.conf
|
@ -552,7 +552,7 @@ run -b '[ -z "#{window_active}" ] && [ -z "#{version}" ] && tmux set display-tim
|
||||||
# fi
|
# fi
|
||||||
# fi
|
# fi
|
||||||
#
|
#
|
||||||
# printf '%s' "$username"
|
# printf '%s\n' "$username"
|
||||||
# }
|
# }
|
||||||
#
|
#
|
||||||
# _hostname() {
|
# _hostname() {
|
||||||
|
@ -582,7 +582,7 @@ run -b '[ -z "#{window_active}" ] && [ -z "#{version}" ] && tmux set display-tim
|
||||||
# fi
|
# fi
|
||||||
# fi
|
# fi
|
||||||
#
|
#
|
||||||
# printf '%s' "$hostname"
|
# printf '%s\n' "$hostname"
|
||||||
# }
|
# }
|
||||||
#
|
#
|
||||||
# _root() {
|
# _root() {
|
||||||
|
@ -935,8 +935,13 @@ run -b '[ -z "#{window_active}" ] && [ -z "#{version}" ] && tmux set display-tim
|
||||||
# tmux_conf_theme_status_left=$(echo "$tmux_conf_theme_status_left" | sed \
|
# tmux_conf_theme_status_left=$(echo "$tmux_conf_theme_status_left" | sed \
|
||||||
# -e "s/#{prefix}/#[fg=$tmux_conf_theme_prefix_fg]#[bg=$tmux_conf_theme_prefix_bg]#[$tmux_conf_theme_prefix_attr]#{?client_prefix,$tmux_conf_theme_prefix,}/g")
|
# -e "s/#{prefix}/#[fg=$tmux_conf_theme_prefix_fg]#[bg=$tmux_conf_theme_prefix_bg]#[$tmux_conf_theme_prefix_attr]#{?client_prefix,$tmux_conf_theme_prefix,}/g")
|
||||||
#
|
#
|
||||||
# tmux_conf_theme_status_left=$(echo "$tmux_conf_theme_status_left" | sed \
|
# if [ -n "$(tmux display -p '#{version}')" ]; then
|
||||||
# -e "s%#{root}%#[fg=$tmux_conf_theme_root_fg]#[bg=$tmux_conf_theme_root_bg]#[$tmux_conf_theme_root_attr]#(cut -c3- ~/.tmux.conf | sh -s _root #{pane_tty} $tmux_conf_theme_root #D)#[inherit]%g")
|
# tmux_conf_theme_status_left=$(echo "$tmux_conf_theme_status_left" | sed \
|
||||||
|
# -e "s%#{root}%#[fg=$tmux_conf_theme_root_fg]#[bg=$tmux_conf_theme_root_bg]#[$tmux_conf_theme_root_attr]#{?#{==:#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_tty} #D),root},$tmux_conf_theme_root,}#[inherit]%g")
|
||||||
|
# else
|
||||||
|
# tmux_conf_theme_status_left=$(echo "$tmux_conf_theme_status_left" | sed \
|
||||||
|
# -e "s%#{root}%#[fg=$tmux_conf_theme_root_fg]#[bg=$tmux_conf_theme_root_bg]#[$tmux_conf_theme_root_attr]#(cut -c3- ~/.tmux.conf | sh -s _root #{pane_tty} $tmux_conf_theme_root #D)#[inherit]%g")
|
||||||
|
# fi
|
||||||
#
|
#
|
||||||
# tmux_conf_theme_status_left=$(echo "$tmux_conf_theme_status_left" | sed \
|
# tmux_conf_theme_status_left=$(echo "$tmux_conf_theme_status_left" | sed \
|
||||||
# -e "s%#{synchronized}%#[fg=$tmux_conf_theme_synchronized_fg]#[bg=$tmux_conf_theme_synchronized_bg]#[$tmux_conf_theme_synchronized_attr]#{?pane_synchronized,$tmux_conf_theme_synchronized,}%g")
|
# -e "s%#{synchronized}%#[fg=$tmux_conf_theme_synchronized_fg]#[bg=$tmux_conf_theme_synchronized_bg]#[$tmux_conf_theme_synchronized_attr]#{?pane_synchronized,$tmux_conf_theme_synchronized,}%g")
|
||||||
|
@ -1023,8 +1028,13 @@ run -b '[ -z "#{window_active}" ] && [ -z "#{version}" ] && tmux set display-tim
|
||||||
# tmux_conf_theme_status_right=$(echo "$tmux_conf_theme_status_right" | sed \
|
# tmux_conf_theme_status_right=$(echo "$tmux_conf_theme_status_right" | sed \
|
||||||
# -e "s/#{prefix}/#[fg=$tmux_conf_theme_prefix_fg]#[bg=$tmux_conf_theme_prefix_bg]#[$tmux_conf_theme_prefix_attr]#{?client_prefix,$tmux_conf_theme_prefix,}/g")
|
# -e "s/#{prefix}/#[fg=$tmux_conf_theme_prefix_fg]#[bg=$tmux_conf_theme_prefix_bg]#[$tmux_conf_theme_prefix_attr]#{?client_prefix,$tmux_conf_theme_prefix,}/g")
|
||||||
#
|
#
|
||||||
# tmux_conf_theme_status_right=$(echo "$tmux_conf_theme_status_right" | sed \
|
# if [ -n "$(tmux display -p '#{version}')" ]; then
|
||||||
# -e "s%#{root}%#[fg=$tmux_conf_theme_root_fg]#[bg=$tmux_conf_theme_root_bg]#[$tmux_conf_theme_root_attr]#(cut -c3- ~/.tmux.conf | sh -s _root #{pane_tty} $tmux_conf_theme_root #D)#[inherit]%g")
|
# tmux_conf_theme_status_right=$(echo "$tmux_conf_theme_status_right" | sed \
|
||||||
|
# -e "s%#{root}%#[fg=$tmux_conf_theme_root_fg]#[bg=$tmux_conf_theme_root_bg]#[$tmux_conf_theme_root_attr]#{?#{==:#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_tty} #D),root},$tmux_conf_theme_root,}#[inherit]%g")
|
||||||
|
# else
|
||||||
|
# tmux_conf_theme_status_right=$(echo "$tmux_conf_theme_status_right" | sed \
|
||||||
|
# -e "s%#{root}%#[fg=$tmux_conf_theme_root_fg]#[bg=$tmux_conf_theme_root_bg]#[$tmux_conf_theme_root_attr]#(cut -c3- ~/.tmux.conf | sh -s _root #{pane_tty} $tmux_conf_theme_root #D)#[inherit]%g")
|
||||||
|
# fi
|
||||||
#
|
#
|
||||||
# tmux_conf_theme_status_right=$(echo "$tmux_conf_theme_status_right" | sed \
|
# tmux_conf_theme_status_right=$(echo "$tmux_conf_theme_status_right" | sed \
|
||||||
# -e "s%#{synchronized}%#[fg=$tmux_conf_theme_synchronized_fg]#[bg=$tmux_conf_theme_synchronized_bg]#[$tmux_conf_theme_synchronized_attr]#{?pane_synchronized,$tmux_conf_theme_synchronized,}%g")
|
# -e "s%#{synchronized}%#[fg=$tmux_conf_theme_synchronized_fg]#[bg=$tmux_conf_theme_synchronized_bg]#[$tmux_conf_theme_synchronized_attr]#{?pane_synchronized,$tmux_conf_theme_synchronized,}%g")
|
||||||
|
|
Loading…
Reference in a new issue