made the theme more flexible by adding configuration variables
This commit is contained in:
+131
-100
@@ -54,12 +54,6 @@ bind -n C-l send-keys C-l \; run 'tmux clear-history'
|
||||
set -g monitor-activity on
|
||||
set -g visual-activity off
|
||||
|
||||
# tmux theme, colors and status line
|
||||
# available themes:
|
||||
# - powerline (a powerline inspired theme)
|
||||
# - powerline_patched_font (a powerline inspired theme using a patched font)
|
||||
tmux_conf_theme=powerline
|
||||
|
||||
|
||||
# -- navigation ----------------------------------------------------------------
|
||||
|
||||
@@ -155,7 +149,7 @@ if '[ -f ~/.tmux.conf.local ]' 'source ~/.tmux.conf.local'
|
||||
|
||||
# -- 8< ------------------------------------------------------------------------
|
||||
|
||||
run 'cut -c3- ~/.tmux.conf | sh -s apply_theme $tmux_conf_theme'
|
||||
run 'cut -c3- ~/.tmux.conf | sh -s apply_theme'
|
||||
run 'cut -c3- ~/.tmux.conf | sh -s apply_configurable_bindings $tmux_conf_new_windows_retain_current_path $tmux_conf_new_panes_retain_current_path'
|
||||
run 'for name in $(printenv | grep -Eo ^tmux_conf_[^=]+); do tmux setenv -gu $name; done;'
|
||||
|
||||
@@ -166,101 +160,138 @@ run 'for name in $(printenv | grep -Eo ^tmux_conf_[^=]+); do tmux setenv -gu $na
|
||||
# set -e
|
||||
#
|
||||
# apply_theme() {
|
||||
# case "$1" in
|
||||
# powerline_patched_font)
|
||||
# tmux_conf_theme=${tmux_conf_theme:-default}
|
||||
# case "${tmux_conf_theme}" in
|
||||
# powerline|powerline_patched_font)
|
||||
# left_separator=''
|
||||
# left_separator_black=''
|
||||
# right_separator=''
|
||||
# right_separator_black=''
|
||||
# session_symbol=''
|
||||
# ;;
|
||||
# powerline)
|
||||
# ""|default)
|
||||
# left_separator='|'
|
||||
# left_separator_black=' '
|
||||
# left_separator_black=''
|
||||
# right_separator='|'
|
||||
# right_separator_black=' '
|
||||
# right_separator_black=''
|
||||
# ;;
|
||||
# esac
|
||||
#
|
||||
# case "$1" in
|
||||
# powerline*)
|
||||
# case "$tmux_conf_theme" in
|
||||
# ""|default|powerline)
|
||||
#
|
||||
# # panes
|
||||
# pane_border_fg=colour238 # light gray
|
||||
# pane_active_border_fg=colour39 # light blue
|
||||
# tmux_conf_theme_pane_border_fg=${tmux_conf_theme_pane_border_fg:-colour238} # light gray
|
||||
# tmux_conf_theme_pane_active_border_fg=${tmux_conf_theme_pane_active_border_fg:-colour39} # light blue
|
||||
#
|
||||
# tmux set -g pane-border-style fg=$pane_border_fg \; set -g pane-active-border-style fg=$pane_active_border_fg
|
||||
# tmux set -g pane-border-style fg=$tmux_conf_theme_pane_border_fg \; set -g pane-active-border-style fg=$tmux_conf_theme_pane_active_border_fg
|
||||
# #uncomment for fat borders
|
||||
# #tmux set -ga pane-border-style bg=$pane_border_fg \; set -ga pane-active-border-style bg=$pane_active_border_fg
|
||||
# #tmux set -ga pane-border-style bg=$tmux_conf_theme_pane_border_fg \; set -ga pane-active-border-style bg=$tmux_conf_theme_pane_active_border_fg
|
||||
#
|
||||
# display_panes_active_colour=colour39 # light blue
|
||||
# display_panes_colour=colour39 # light blue
|
||||
# tmux set -g display-panes-active-colour $display_panes_active_colour \; set -g display-panes-colour $display_panes_colour
|
||||
# tmux_conf_theme_display_panes_active_colour=${tmux_conf_theme_display_panes_active_colour:-colour39} # light blue
|
||||
# tmux_conf_theme_display_panes_colour=${tmux_conf_theme_display_panes_colour:-colour39} # light blue
|
||||
# tmux set -g display-panes-active-colour $tmux_conf_theme_display_panes_active_colour \; set -g display-panes-colour $tmux_conf_theme_display_panes_colour
|
||||
#
|
||||
# # messages
|
||||
# message_fg=colour16 # black
|
||||
# message_bg=colour226 # yellow
|
||||
# message_attr=bold
|
||||
# tmux set -g message-style fg=$message_fg,bg=$message_bg,$message_attr
|
||||
# tmux_conf_theme_message_fg=${tmux_conf_theme_message_fg:-colour16} # black
|
||||
# tmux_conf_theme_message_bg=${tmux_conf_theme_message_bg:-colour226} # yellow
|
||||
# tmux_conf_theme_message_attr=${tmux_conf_theme_message_attr:-bold}
|
||||
# tmux set -g message-style fg=$tmux_conf_theme_message_fg,bg=$tmux_conf_theme_message_bg,$tmux_conf_theme_message_attr
|
||||
#
|
||||
# message_command_fg=colour16 # black
|
||||
# message_command_bg=colour160 # light yellow
|
||||
# tmux set -g message-command-style fg=$message_command_fg,bg=$message_command_bg,$message_attr
|
||||
# tmux_conf_theme_message_command_fg=${tmux_conf_theme_message_command_fg:-colour16} # black
|
||||
# tmux_conf_theme_message_command_bg=${tmux_conf_theme_message_command_bg:-colour160} # light yellow
|
||||
# tmux set -g message-command-style fg=$tmux_conf_theme_message_command_fg,bg=$tmux_conf_theme_message_command_bg,$tmux_conf_theme_message_attr
|
||||
#
|
||||
# # windows mode
|
||||
# mode_fg=colour16 # black
|
||||
# mode_bg=colour226 # yellow
|
||||
# mode_attr=bold
|
||||
# tmux setw -g mode-style fg=$mode_fg,bg=$mode_bg,$mode_attr
|
||||
# tmux_conf_theme_mode_fg=${tmux_conf_theme_mode_fg:-colour16} # black
|
||||
# tmux_conf_theme_mode_bg=${tmux_conf_theme_mode_bg:-colour226} # yellow
|
||||
# tmux_conf_theme_mode_attr=${tmux_conf_theme_mode_attr:-bold}
|
||||
# tmux setw -g mode-style fg=$tmux_conf_theme_mode_fg,bg=$tmux_conf_theme_mode_bg,$tmux_conf_theme_mode_attr
|
||||
#
|
||||
# # status line
|
||||
# status_fg=colour253 # white
|
||||
# status_bg=colour232 # dark gray
|
||||
# tmux set -g status-style fg=$status_fg,bg=$status_bg
|
||||
# tmux_conf_theme_status_fg=${tmux_conf_theme_status_fg:-colour253} # white
|
||||
# tmux_conf_theme_status_bg=${tmux_conf_theme_status_bg:-colour232} # dark gray
|
||||
# tmux set -g status-style fg=$tmux_conf_theme_status_fg,bg=$tmux_conf_theme_status_bg
|
||||
#
|
||||
# session_fg=colour16 # black
|
||||
# session_bg=colour226 # yellow
|
||||
# status_left="#[fg=$session_fg,bg=$session_bg,bold] ❐ #S #[fg=$session_bg,bg=$status_bg,nobold]$left_separator_black"
|
||||
# tmux_conf_theme_session_fg=${tmux_conf_theme_session_fg:-colour16} # black
|
||||
# tmux_conf_theme_session_bg=${tmux_conf_theme_session_bg:-colour226} # yellow
|
||||
# status_left="#[fg=$tmux_conf_theme_session_fg,bg=$tmux_conf_theme_session_bg,bold] ❐ #S #[fg=$tmux_conf_theme_session_bg,bg=$tmux_conf_theme_status_bg,nobold]$left_separator_black"
|
||||
# if [ x"`tmux -q -L tmux_theme_status_left_test -f /dev/null new-session -d \; show -g -v status-left \; kill-session`" = x"[#S] " ] ; then
|
||||
# status_left="$status_left "
|
||||
# fi
|
||||
# tmux set -g status-left-length 32 \; set -g status-left "$status_left"
|
||||
#
|
||||
# window_status_fg=colour245 # light gray
|
||||
# window_status_bg=colour232 # dark gray
|
||||
# tmux_conf_theme_window_status_fg=${tmux_conf_theme_window_status_fg:-colour245} # light gray
|
||||
# tmux_conf_theme_window_status_bg=${tmux_conf_theme_window_status_bg:-colour232} # dark gray
|
||||
# window_status_format="#I #W"
|
||||
# tmux setw -g window-status-style fg=$window_status_fg,bg=$window_status_bg \; setw -g window-status-format "$window_status_format"
|
||||
# tmux setw -g window-status-style fg=$tmux_conf_theme_window_status_fg,bg=$tmux_conf_theme_window_status_bg \; setw -g window-status-format "$window_status_format"
|
||||
#
|
||||
# window_status_current_fg=colour16 # black
|
||||
# window_status_current_bg=colour39 # light blue
|
||||
# window_status_current_format="#[fg=$window_status_bg,bg=$window_status_current_bg]$left_separator_black#[fg=$window_status_current_fg,bg=$window_status_current_bg,bold] #I $left_separator #W #[fg=$window_status_current_bg,bg=$status_bg,nobold]$left_separator_black"
|
||||
# tmux_conf_theme_window_status_current_fg=${tmux_conf_theme_window_status_current_fg:-colour16} # black
|
||||
# tmux_conf_theme_window_status_current_bg=${tmux_conf_theme_window_status_current_bg:-colour39} # light blue
|
||||
# window_status_current_format="#[fg=$tmux_conf_theme_window_status_bg,bg=$tmux_conf_theme_window_status_current_bg]$left_separator_black#[fg=$tmux_conf_theme_window_status_current_fg,bg=$tmux_conf_theme_window_status_current_bg,bold] #I $left_separator #W #[fg=$tmux_conf_theme_window_status_current_bg,bg=$tmux_conf_theme_status_bg,nobold]$left_separator_black"
|
||||
# tmux setw -g window-status-current-format "$window_status_current_format"
|
||||
# tmux set -g status-justify left
|
||||
#
|
||||
# window_status_activity_fg=default
|
||||
# window_status_activity_bg=default
|
||||
# window_status_activity_attr=underscore
|
||||
# tmux setw -g window-status-activity-style fg=$window_status_activity_fg,bg=$window_status_activity_bg,$window_status_activity_attr
|
||||
# tmux_conf_theme_window_status_activity_fg=${tmux_conf_theme_window_status_activity_fg:-default}
|
||||
# tmux_conf_theme_window_status_activity_bg=${tmux_conf_theme_window_status_activity_bg:-default}
|
||||
# tmux_conf_theme_window_status_activity_attr=${tmux_conf_theme_window_status_activity_attr:-underscore}
|
||||
# tmux setw -g window-status-activity-style fg=$tmux_conf_theme_window_status_activity_fg,bg=$tmux_conf_theme_window_status_activity_bg,$tmux_conf_theme_window_status_activity_attr
|
||||
#
|
||||
# window_status_bell_fg=colour226 # yellow
|
||||
# window_status_bell_bg=default
|
||||
# window_status_bell_attr=blink,bold
|
||||
# tmux setw -g window-status-bell-style fg=$window_status_bell_fg,bg=$window_status_bell_bg,$window_status_bell_attr
|
||||
# tmux_conf_theme_window_status_bell_fg=${tmux_conf_theme_window_status_bell_fg:-colour226} # yellow
|
||||
# tmux_conf_theme_window_status_bell_bg=${tmux_conf_theme_window_status_bell_bg:-default}
|
||||
# tmux_conf_theme_window_status_bell_attr=${tmux_conf_theme_window_status_bell_attr:-blink,bold}
|
||||
# tmux setw -g window-status-bell-style fg=$tmux_conf_theme_window_status_bell_fg,bg=$tmux_conf_theme_window_status_bell_bg,$tmux_conf_theme_window_status_bell_attr
|
||||
#
|
||||
# window_status_last_fg=colour39 # light blue
|
||||
# window_status_last_attr=default
|
||||
# tmux setw -g window-status-last-style $window_status_last_attr,fg=$window_status_last_fg
|
||||
#
|
||||
# battery_full_fg=colour160 # red
|
||||
# battery_empty_fg=colour254 # white
|
||||
# battery_bg=colour160 # black
|
||||
# time_date_fg=colour245 # light gray
|
||||
# time_date_bg=colour232 # dark gray
|
||||
# whoami_fg=colour254 # white
|
||||
# whoami_bg=colour160 # red
|
||||
# host_fg=colour16 # black
|
||||
# host_bg=colour254 # white
|
||||
# status_right="${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})} #[fg=$time_date_fg,nobold]$right_separator %R $right_separator %d %b #[fg=$whoami_bg,bg=$time_date_bg,nobold]$right_separator_black#[fg=$whoami_fg,bg=$whoami_bg,nobold] #(whoami) $right_separator_black#[fg=$host_fg,bg=$host_bg,bold] #h "
|
||||
# tmux_conf_theme_battery=${tmux_conf_theme_battery:-enabled}
|
||||
# tmux_conf_theme_time=${tmux_conf_theme_time:-enabled}
|
||||
# tmux_conf_theme_date=${tmux_conf_theme_date:-enabled}
|
||||
# tmux_conf_theme_username=${tmux_conf_theme_username:-enabled}
|
||||
# tmux_conf_theme_hostname=${tmux_conf_theme_hostname:-enabled}
|
||||
# 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" )
|
||||
# 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" )
|
||||
# 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_time_date_bg=${tmux_conf_theme_time_date_bg:-colour232} # dark gray
|
||||
# tmux_conf_theme_username_fg=colour254 # white
|
||||
# tmux_conf_theme_username_bg=colour160 # red
|
||||
# tmux_conf_theme_hostname_fg=colour16 # black
|
||||
# tmux_conf_theme_hostname_bg=colour254 # white
|
||||
#
|
||||
# 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})} "
|
||||
# has_battery=$(eval echo \$${status_right_battery#\#})
|
||||
# if [ -n "$has_battery" ] && ([ x"$time_enabled" = x"true" ] || [ x"$date_enabled" = x"true" ]) ; then
|
||||
# status_right_battery="${status_right_battery}#[fg=$tmux_conf_theme_time_date_fg,nobold]$right_separator"
|
||||
# fi
|
||||
# fi
|
||||
# if [ x"$time_enabled" = x"true" ] ; then
|
||||
# status_right_time="#[fg=$tmux_conf_theme_time_date_fg,nobold]${status_right_time} %R "
|
||||
# if [ x"$date_enabled" = x"true" ] ; then
|
||||
# status_right_time="${status_right_time}#[fg=$tmux_conf_theme_time_date_fg,nobold]$right_separator"
|
||||
# fi
|
||||
# fi
|
||||
# if [ x"$date_enabled" = x"true" ] ; then
|
||||
# status_right_date="#[fg=$tmux_conf_theme_time_date_fg,nobold] %d %b "
|
||||
# fi
|
||||
# if [ x"$username_enabled" = x"true" ] ; then
|
||||
# status_right_username="#[fg=$tmux_conf_theme_username_bg,bg=$tmux_conf_theme_time_date_bg,nobold]$right_separator_black#[fg=$tmux_conf_theme_username_fg,bg=$tmux_conf_theme_username_bg,nobold] #(whoami) "
|
||||
# fi
|
||||
# if [ x"$hostname_enabled" = x"true" ] ; then
|
||||
# if [ x"$username_enabled" = x"true" ] ; then
|
||||
# status_right_hostname="#[bg=$tmux_conf_theme_username_bg]"
|
||||
# else
|
||||
# status_right_hostname="#[bg=$tmux_conf_theme_time-data_bg]"
|
||||
# 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 "
|
||||
# fi
|
||||
# status_right="${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"
|
||||
#
|
||||
# # clock
|
||||
@@ -336,25 +367,6 @@ run 'for name in $(printenv | grep -Eo ^tmux_conf_[^=]+); do tmux setenv -gu $na
|
||||
# }
|
||||
#
|
||||
# battery() {
|
||||
# battery_symbol=$1
|
||||
# battery_symbol_count=$2
|
||||
# battery_palette=$3
|
||||
# battery_status=$4
|
||||
# if [ x"$battery_symbol_count" = x"auto" ]; then
|
||||
# columns=$(tmux -q display -p '#{client_width}' 2> /dev/null || echo 80)
|
||||
# if [ $columns -ge 80 ]; then
|
||||
# battery_symbol_count=10
|
||||
# else
|
||||
# battery_symbol_count=5
|
||||
# fi
|
||||
# fi
|
||||
# battery_symbol_heart_full=♥
|
||||
# battery_symbol_heart_empty=♥
|
||||
# battery_symbol_block_full=◼
|
||||
# battery_symbol_block_empty=◻
|
||||
# eval battery_symbol_full='$battery_symbol_'"$battery_symbol"'_full'
|
||||
# eval battery_symbol_empty='$battery_symbol_'"$battery_symbol"'_empty'
|
||||
#
|
||||
# uname_s=$(uname -s)
|
||||
# if [ x"$uname_s" = x"Darwin" ]; then
|
||||
# batt=$(pmset -g batt)
|
||||
@@ -375,7 +387,26 @@ run 'for name in $(printenv | grep -Eo ^tmux_conf_[^=]+); do tmux setenv -gu $na
|
||||
# charge="$(cat $batnow) / $(cat $batfull)" || return
|
||||
# fi
|
||||
#
|
||||
# if [ x"$battery_status" = x"1" -o x"$battery_status" = x"true" ]; then
|
||||
# battery_symbol=$1
|
||||
# battery_symbol_count=$2
|
||||
# battery_palette=$3
|
||||
# battery_status=$4
|
||||
# if [ x"$battery_symbol_count" = x"auto" ]; then
|
||||
# columns=$(tmux -q display -p '#{client_width}' 2> /dev/null || echo 80)
|
||||
# if [ $columns -ge 80 ]; then
|
||||
# battery_symbol_count=10
|
||||
# else
|
||||
# battery_symbol_count=5
|
||||
# fi
|
||||
# fi
|
||||
# battery_symbol_heart_full=♥
|
||||
# battery_symbol_heart_empty=♥
|
||||
# battery_symbol_block_full=◼
|
||||
# battery_symbol_block_empty=◻
|
||||
# eval battery_symbol_full='$battery_symbol_'"$battery_symbol"'_full'
|
||||
# eval battery_symbol_empty='$battery_symbol_'"$battery_symbol"'_empty'
|
||||
#
|
||||
# if [ x"$battery_status" = x"1"] || [ x"$battery_status" = x"true" ] || [ x"$battery_status" = x"enabled" ] ; then
|
||||
# if [ x"$discharging" = x"true" ]; then
|
||||
# printf "%s " 🔋
|
||||
# else
|
||||
@@ -383,20 +414,7 @@ run 'for name in $(printenv | grep -Eo ^tmux_conf_[^=]+); do tmux setenv -gu $na
|
||||
# fi
|
||||
# fi
|
||||
#
|
||||
# if echo $battery_palette | grep -q -E '^(colour[0-9]{1,3},?){3}$'; then
|
||||
# battery_full_fg=$(echo $battery_palette | cut -d, -f1)
|
||||
# battery_empty_fg=$(echo $battery_palette | cut -d, -f2)
|
||||
# battery_bg=$(echo $battery_palette | cut -d, -f3)
|
||||
#
|
||||
# full=$(printf %.0f $(awk "BEGIN{print $charge * $battery_symbol_count}"))
|
||||
# [ $full -gt 0 ] && \
|
||||
# printf '#[fg=%s,bg=%s]' $battery_full_fg $battery_bg && \
|
||||
# printf "%0.s$battery_symbol_full" $(seq 1 $full)
|
||||
# empty=$(($battery_symbol_count - $full))
|
||||
# [ $empty -gt 0 ] && \
|
||||
# printf '#[fg=%s,bg=%s]' $battery_empty_fg $battery_bg && \
|
||||
# printf "%0.s$battery_symbol_empty" $(seq 1 $empty)
|
||||
# elif echo $battery_palette | grep -q -E '^heat|gradient(,colour[0-9]{1,3})?$'; then
|
||||
# if echo $battery_palette | grep -q -E '^heat|gradient(,[a-z0-9]{7,9})?$'; then
|
||||
# battery_style=$(echo $battery_palette | cut -d, -f1)
|
||||
# battery_bg=$(echo $battery_palette | cut -s -d, -f2)
|
||||
# battery_bg=${battery_bg:-colour16}
|
||||
@@ -421,19 +439,32 @@ run 'for name in $(printenv | grep -Eo ^tmux_conf_[^=]+); do tmux setenv -gu $na
|
||||
# [ $empty -gt 0 ] && \
|
||||
# printf "#[fg=colour%s]$battery_symbol_empty" $(echo $palette | cut -d' ' -f$((full+1))-$(($full + $empty)))
|
||||
# fi
|
||||
# elif echo $battery_palette | grep -q -E '^([#a-z0-9]{7,9},?){3}$'; then
|
||||
# battery_full_fg=$(echo $battery_palette | cut -d, -f1)
|
||||
# battery_empty_fg=$(echo $battery_palette | cut -d, -f2)
|
||||
# battery_bg=$(echo $battery_palette | cut -d, -f3)
|
||||
#
|
||||
# full=$(printf %.0f $(awk "BEGIN{print $charge * $battery_symbol_count}"))
|
||||
# [ $full -gt 0 ] && \
|
||||
# printf '#[fg=%s,bg=%s]' $battery_full_fg $battery_bg && \
|
||||
# printf "%0.s$battery_symbol_full" $(seq 1 $full)
|
||||
# empty=$(($battery_symbol_count - $full))
|
||||
# [ $empty -gt 0 ] && \
|
||||
# printf '#[fg=%s,bg=%s]' $battery_empty_fg $battery_bg && \
|
||||
# printf "%0.s$battery_symbol_empty" $(seq 1 $empty)
|
||||
# fi
|
||||
# }
|
||||
#
|
||||
# apply_configurable_bindings() {
|
||||
# windows_retain_current_path=${1:-false}
|
||||
# if [ x"$windows_retain_current_path" = x"true" -o x"$windows_retain_current_path" = x"1" ] ; then
|
||||
# tmux_conf_new_windows_retain_current_path=${tmux_conf_new_windows_retain_current_path:-false}
|
||||
# if [ x"$tmux_conf_new_windows_retain_current_path" = x"true" ] || [ x"$tmux_conf_new_windows_retain_current_path" = x"1" ] ; then
|
||||
# tmux bind c new-window -c '#{pane_current_path}'
|
||||
# else
|
||||
# tmux bind c new-window
|
||||
# fi
|
||||
#
|
||||
# panes_retain_current_path=${2:-true}
|
||||
# if [ x"$panes_retain_current_path" = x"true" -o x"$panes_retain_current_path" = x"1" ] ; then
|
||||
# tmux_conf_new_panes_retain_current_path=${tmux_conf_new_panes_retain_current_path:-true}
|
||||
# if [ x"$tmux_conf_new_panes_retain_current_path" = x"true" ] || [ x"$tmux_conf_new_panes_retain_current_path" = x"1" ] ; then
|
||||
# tmux bind '"' split-window -v -c "#{pane_current_path}" \;\
|
||||
# bind % split-window -h -c "#{pane_current_path}" \;\
|
||||
# bind - split-window -v -c "#{pane_current_path}" \;\
|
||||
|
||||
Reference in New Issue
Block a user