added an indicator in the status line that shows if <prefix> has been pressed
This commit is contained in:
parent
b9943589e3
commit
c66be48314
3 changed files with 31 additions and 2 deletions
13
.tmux.conf
13
.tmux.conf
|
@ -243,24 +243,32 @@ run 'for name in $(printenv | grep -Eo ^tmux_conf_[^=]+); do tmux setenv -gu $na
|
||||||
# window_status_last_attr=default
|
# window_status_last_attr=default
|
||||||
# tmux setw -g window-status-last-style $window_status_last_attr,fg=$window_status_last_fg
|
# tmux setw -g window-status-last-style $window_status_last_attr,fg=$window_status_last_fg
|
||||||
#
|
#
|
||||||
|
# tmux_conf_theme_prefix=${tmux_conf_theme_prefix:-disabled}
|
||||||
# tmux_conf_theme_battery=${tmux_conf_theme_battery:-enabled}
|
# tmux_conf_theme_battery=${tmux_conf_theme_battery:-enabled}
|
||||||
# tmux_conf_theme_time=${tmux_conf_theme_time:-enabled}
|
# tmux_conf_theme_time=${tmux_conf_theme_time:-enabled}
|
||||||
# tmux_conf_theme_date=${tmux_conf_theme_date:-enabled}
|
# tmux_conf_theme_date=${tmux_conf_theme_date:-enabled}
|
||||||
# tmux_conf_theme_username=${tmux_conf_theme_username:-enabled}
|
# tmux_conf_theme_username=${tmux_conf_theme_username:-enabled}
|
||||||
# tmux_conf_theme_hostname=${tmux_conf_theme_hostname:-enabled}
|
# tmux_conf_theme_hostname=${tmux_conf_theme_hostname:-enabled}
|
||||||
|
#
|
||||||
|
# prefix_enabled=$( ([ x"$tmux_conf_theme_prefix" = x"enabled" ] || [ -z "$tmux_conf_theme_prefix" ]) && echo "true" || echo "false" )
|
||||||
# battery_enabled=$( ([ x"$tmux_conf_theme_battery" = x"enabled" ] || [ -z "$tmux_conf_theme_battery" ]) && echo "true" || echo "false" )
|
# battery_enabled=$( ([ x"$tmux_conf_theme_battery" = x"enabled" ] || [ -z "$tmux_conf_theme_battery" ]) && echo "true" || echo "false" )
|
||||||
# time_enabled=$( ([ x"$tmux_conf_theme_time" = x"enabled" ] || [ -z "$tmux_conf_theme_time" ]) && echo "true" || echo "false" )
|
# time_enabled=$( ([ x"$tmux_conf_theme_time" = x"enabled" ] || [ -z "$tmux_conf_theme_time" ]) && echo "true" || echo "false" )
|
||||||
# date_enabled=$( ([ x"$tmux_conf_theme_date" = x"enabled" ] || [ -z "$tmux_conf_theme_date" ]) && echo "true" || echo "false" )
|
# date_enabled=$( ([ x"$tmux_conf_theme_date" = x"enabled" ] || [ -z "$tmux_conf_theme_date" ]) && echo "true" || echo "false" )
|
||||||
# username_enabled=$( ([ x"$tmux_conf_theme_username" = x"enabled" ] || [ -z "$tmux_conf_theme_username" ] || ([ x"$tmux_conf_theme_username" = x"ssh" ] && ([ -n "$SSH_CLIENT" ] || [ -n "$SSH_CONNECTION" ] || [ -n "$SSH_TTY" ]))) && echo "true" || echo "false" )
|
# username_enabled=$( ([ x"$tmux_conf_theme_username" = x"enabled" ] || [ -z "$tmux_conf_theme_username" ] || ([ x"$tmux_conf_theme_username" = x"ssh" ] && ([ -n "$SSH_CLIENT" ] || [ -n "$SSH_CONNECTION" ] || [ -n "$SSH_TTY" ]))) && echo "true" || echo "false" )
|
||||||
# hostname_enabled=$( ([ x"$tmux_conf_theme_hostname" = x"enabled" ] || [ -z "$tmux_conf_theme_hostname" ] || ([ x"$tmux_conf_theme_hostname" = x"ssh" ] && ([ -n "$SSH_CLIENT" ] || [ -n "$SSH_CONNECTION" ] || [ -n "$SSH_TTY" ]))) && echo "true" || echo "false" )
|
# hostname_enabled=$( ([ x"$tmux_conf_theme_hostname" = x"enabled" ] || [ -z "$tmux_conf_theme_hostname" ] || ([ x"$tmux_conf_theme_hostname" = x"ssh" ] && ([ -n "$SSH_CLIENT" ] || [ -n "$SSH_CONNECTION" ] || [ -n "$SSH_TTY" ]))) && echo "true" || echo "false" )
|
||||||
#
|
#
|
||||||
# tmux_conf_theme_time_date_fg=${tmux_conf_theme_time_date_fg:-colour245} # light gray
|
# tmux_conf_theme_prefix_fg=${tmux_conf_theme_prefix_fg:-colour253} # white
|
||||||
|
# tmux_conf_theme_prefix_bg=${tmux_conf_theme_prefix_bg:-colour16} # black
|
||||||
|
# tmux_conf_theme_time_date_fg=${tmux_conf_theme_time_date_fg:-colour247} # light gray
|
||||||
# tmux_conf_theme_time_date_bg=${tmux_conf_theme_time_date_bg:-colour232} # dark gray
|
# tmux_conf_theme_time_date_bg=${tmux_conf_theme_time_date_bg:-colour232} # dark gray
|
||||||
# tmux_conf_theme_username_fg=colour254 # white
|
# tmux_conf_theme_username_fg=colour254 # white
|
||||||
# tmux_conf_theme_username_bg=colour160 # red
|
# tmux_conf_theme_username_bg=colour160 # red
|
||||||
# tmux_conf_theme_hostname_fg=colour16 # black
|
# tmux_conf_theme_hostname_fg=colour16 # black
|
||||||
# tmux_conf_theme_hostname_bg=colour254 # white
|
# tmux_conf_theme_hostname_bg=colour254 # white
|
||||||
#
|
#
|
||||||
|
# if [ x"$prefix_enabled" = x"true" ] ; then
|
||||||
|
# status_right_prefix="#{?client_prefix,#[fg=$tmux_conf_theme_prefix_fg]#[bg=$tmux_conf_theme_prefix_bg]#[bold]⌨ #[fg=$tmux_conf_theme_prefix_fg]#[bg=$tmux_conf_theme_status_bg]#[nobold],}"
|
||||||
|
# fi
|
||||||
# if [ x"$battery_enabled" = x"true" ] ; then
|
# if [ x"$battery_enabled" = x"true" ] ; then
|
||||||
# status_right_battery="${tmux_conf_battery:-#(cut -c3- ~/.tmux.conf | sh -s battery ${tmux_conf_battery_symbol:-block} ${tmux_conf_battery_symbol_count:-auto} \"${tmux_conf_battery_palette:-colour160,colour254,colour16}\" ${tmux_conf_battery_status:-enabled})} "
|
# status_right_battery="${tmux_conf_battery:-#(cut -c3- ~/.tmux.conf | sh -s battery ${tmux_conf_battery_symbol:-block} ${tmux_conf_battery_symbol_count:-auto} \"${tmux_conf_battery_palette:-colour160,colour254,colour16}\" ${tmux_conf_battery_status:-enabled})} "
|
||||||
# has_battery=$(eval echo \$${status_right_battery#\#})
|
# has_battery=$(eval echo \$${status_right_battery#\#})
|
||||||
|
@ -288,7 +296,8 @@ run 'for name in $(printenv | grep -Eo ^tmux_conf_[^=]+); do tmux setenv -gu $na
|
||||||
# fi
|
# fi
|
||||||
# status_right_hostname="#[fg=$tmux_conf_theme_hostname_bg,nobold]${status_right_hostname}$right_separator_black#[fg=$tmux_conf_theme_hostname_fg,bg=$tmux_conf_theme_hostname_bg,bold] #h "
|
# status_right_hostname="#[fg=$tmux_conf_theme_hostname_bg,nobold]${status_right_hostname}$right_separator_black#[fg=$tmux_conf_theme_hostname_fg,bg=$tmux_conf_theme_hostname_bg,bold] #h "
|
||||||
# fi
|
# fi
|
||||||
# status_right="${status_right_battery}${status_right_time}${status_right_date}${status_right_username}${status_right_hostname}"
|
#
|
||||||
|
# status_right="${status_right_prefix}${status_right_battery}${status_right_time}${status_right_date}${status_right_username}${status_right_hostname}"
|
||||||
# tmux set -g status-right-length 64 \; set -g status-right "$status_right"
|
# tmux set -g status-right-length 64 \; set -g status-right "$status_right"
|
||||||
#
|
#
|
||||||
# # clock
|
# # clock
|
||||||
|
|
|
@ -4,6 +4,13 @@
|
||||||
tmux_conf_theme=default
|
tmux_conf_theme=default
|
||||||
#tmux_conf_theme=powerline
|
#tmux_conf_theme=powerline
|
||||||
|
|
||||||
|
# display an indicator in the status line when the prefix key has been pressed,
|
||||||
|
# possible values are:
|
||||||
|
# - enabled
|
||||||
|
# - disabled
|
||||||
|
tmux_conf_theme_prefix=disabled
|
||||||
|
#tmux_conf_theme_prefix=enabled
|
||||||
|
|
||||||
# display the battery information in the status line, possible values are:
|
# display the battery information in the status line, possible values are:
|
||||||
# - enabled
|
# - enabled
|
||||||
# - disabled
|
# - disabled
|
||||||
|
|
13
README.md
13
README.md
|
@ -155,6 +155,19 @@ The possible values for `tmux_conf_theme` are `default` and `powerline`.
|
||||||
[fonts patched with powerline symbols]: https://github.com/Lokaltog/powerline-fonts
|
[fonts patched with powerline symbols]: https://github.com/Lokaltog/powerline-fonts
|
||||||
[powerline manual]: http://powerline.readthedocs.org/en/latest/installation.html#fonts-installation
|
[powerline manual]: http://powerline.readthedocs.org/en/latest/installation.html#fonts-installation
|
||||||
|
|
||||||
|
### Configuring the prefix indicator
|
||||||
|
|
||||||
|
To enable or disable the prefix indicator (whether the `<prefix>` key has been
|
||||||
|
pressed), edit the `~/.tmux.conf.local` file (`<prefix> e`) and adjust the
|
||||||
|
`tmux_conf_theme_prefix` variable:
|
||||||
|
|
||||||
|
tmux_conf_theme_prefix=enabled
|
||||||
|
|
||||||
|
![image](https://cloud.githubusercontent.com/assets/553208/10802009/722de4a2-7dba-11e5-8361-8d024cd3aa45.png)
|
||||||
|
|
||||||
|
The possible values for `tmux_conf_theme_prefix` are `enabled` or `disabled`
|
||||||
|
(default).
|
||||||
|
|
||||||
### Configuring the battery indicator
|
### Configuring the battery indicator
|
||||||
|
|
||||||
To enable or disable the battery indicator, edit the `~/.tmux.conf.local` file
|
To enable or disable the battery indicator, edit the `~/.tmux.conf.local` file
|
||||||
|
|
Loading…
Reference in a new issue