1
0
Fork 0
mirror of synced 2024-12-22 06:41:07 -05:00

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:
Gregory Pakosz 2019-09-22 14:20:41 +02:00
parent f54cede368
commit 89bc03c612

View file

@ -552,7 +552,7 @@ run -b '[ -z "#{window_active}" ] && [ -z "#{version}" ] && tmux set display-tim
# fi
# fi
#
# printf '%s' "$username"
# printf '%s\n' "$username"
# }
#
# _hostname() {
@ -582,7 +582,7 @@ run -b '[ -z "#{window_active}" ] && [ -z "#{version}" ] && tmux set display-tim
# fi
# fi
#
# printf '%s' "$hostname"
# printf '%s\n' "$hostname"
# }
#
# _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 \
# -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 \
# -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")
# if [ -n "$(tmux display -p '#{version}')" ]; then
# 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 \
# -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 \
# -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 \
# -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")
# if [ -n "$(tmux display -p '#{version}')" ]; then
# 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 \
# -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")