all repos

dotfiles @ 00a1fea

i use rach linux btw
4 files changed, 1581 insertions(+), 46 deletions(-)
Update install.sh and add zsh, tmux config
Author: Smirnov-O ss2316544@gmail.com
Committed at: 2020-05-25 22:48:43 +0300
Parent: d6d447e
M install.sh
···
                1
                
                -#/bin/bash

              
                2
                
                -read -p "\e[31m All your git, vim, bash, tmux, zsh settings will be deleted [y/n]" CONTINUE

              
                3
                
                -if [[ "$CONTINUE" == "y" ]]; then

              
                4
                
                -	rm -rf ~/.vimrc ~/.vim

              
                5
                
                -	rm -rf ~/.gitconfig ~/.git*

              
                6
                
                -	rm -rf ~/.bashrc ~/.bash*

              
                7
                
                -	rm -rf ~/.tmux ~/.tmux*

              
                8
                
                -	rm -rf ~/.zshrc ~/.oh-my-zsh

              
                9
                
                -	

              
                10
                
                -	read -p "Install vim config [y/n]: " VIM_CONF

              
                11
                
                -	read -p "Install git config [y/n]: " GIT_CONF

              
                12
                
                -	read -p "Install bash config [y/n]: " BASH_CONF

              
                13
                
                -	read -p "Intall tmux config [y/n]: " TMUX_CONF

              
                14
                
                -	read -p "Install zsh config [y/n]: " ZSH_CONF

              
                
                1
                +#!/bin/bash

              
                
                2
                +read -p "All your git, vim, bash, tmux, zsh settings will be deleted [y/n]" CONTINUE

              
                
                3
                +

              
                
                4
                +if [[ "$CONTINUE" = "y" ]] || [[ "$CONTINUE" = "Y" ]]; then

              
                
                5
                +    rm -rf ~/.vimrc ~/.vim

              
                
                6
                +    rm -rf ~/.gitconfig ~/.git

              
                
                7
                +    rm -rf ~/.bashrc ~/.bash

              
                
                8
                +    rm -rf ~/.tmux ~/.tmux

              
                
                9
                +    rm -rf ~/.zshrci

              
                
                10
                +fi

              
                
                11
                +

              
                
                12
                +read -p "Install vim config [y/n]: " VIM_CONF

              
                
                13
                +if [[ "$VIM_CONF" = "y" ]] || [[ "$VIM_CONF" = "Y" ]]; then

              
                
                14
                +	sudo apt-get install vim vim-gui-common curl -y

              
                
                15
                +	curl -fLo ~.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

              
                
                16
                +	mv vimrc ~/.vimrc

              
                
                17
                +fi

              
                
                18
                +

              
                
                19
                +read -p "Install git config [y/n]: " GIT_CONF

              
                
                20
                +if [[ "$GIT_CONF" = "y" ]] || [[ "$GIT_CONF" = "Y" ]] ; then

              
                
                21
                +	mv gitconfig ~/.gitconfig

              
                
                22
                +	mv gitignore_global ~/.gitignore_global

              
                
                23
                +fi

              
                
                24
                +

              
                
                25
                +read -p "Install bash config [y/n]: " BASH_CONF

              
                
                26
                +if [[ "$BASH_CONF" = "y" ]] || [[ "$BASH_CONF" = "Y" ]]; then

              
                
                27
                +	sudo apt-get install bash -y

              
                
                28
                +	mv bashrc ~/.bashrc

              
                
                29
                +fi

              
                
                30
                +

              
                
                31
                +read -p "Intall tmux config [y/n]: " TMUX_CONF

              
                
                32
                +if [[ "$TMUX_CONF" = "y" ]] || [[ "$TMUX_CONF" = "y" ]]; then

              
                
                33
                +	sudo apt-get install tmux -y

              
                
                34
                +	mv tmux.conf ~/.tmux.conf

              
                
                35
                +	mv tmux.conf.local ~/.tmux.conf.local

              
                
                36
                +fi

              
                15
                37
                 

              
                16
                
                -	cd ~/.dotfiles

              
                17
                
                -	if [[ "$VIM_CONF" = "y" ]]; then

              
                18
                
                -		sudo apt-get install vim vim-gui-common curl -y

              
                19
                
                -		curl -fLo ~.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

              
                20
                
                -		ln vimrc  ~/.vimrc

              
                21
                
                -		#vim +source~/.vimrc +PlugInstall

              
                22
                
                -	elif [[ "$GIT_CONF" = "y" ]]; then

              
                23
                
                -		ln gitconfig ~/.gitconfig

              
                24
                
                -		ln gitignore_global ~/.gitignore_global

              
                25
                
                -	elif [[ "$BASH_CONF" = "y" ]]; then

              
                26
                
                -		sudo apt-get install bash -y

              
                27
                
                -		ln bashrc ~/.bashrc

              
                28
                
                -	elif [[ "$TMUX_CONF" = "y" ]]; then

              
                29
                
                -		sudo apt-get install tmux -y

              
                30
                
                -		git clone https://github.com/gpakosz/.tmux.git ~/.tmux

              
                31
                
                -		mv ~/.tmux/.tmux.conf ~/.tmux.conf

              
                32
                
                -		mv ~/.tmux/.tmux.conf.local ~/.tmux.conf.local

              
                33
                
                -	elif [[ "$ZSH_CONF" = "y" ]]; then

              
                34
                
                -		sudo apt-get install zsh curl -y

              
                35
                
                -		sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

              
                36
                
                -		echo "alias cls='clear'" >> ~/.zshrc

              
                37
                
                -		echo "alias sl='ls'" >> ~/.zshrc

              
                38
                
                -		echo "alias cd..='cd ..'" >> ~/.zshrc

              
                39
                
                -		echo "alias py='python3'" >> ~/.zshrc

              
                40
                
                -		echo "alias py3='python3'" >> ~/.zshrc

              
                41
                
                -		echo "alias ipy='ipython3'" >> ~/.zshrc

              
                42
                
                -		echo "alias ipy3='ipython3'" >> ~/.zshrc

              
                43
                
                -		sed -i "s/plugins=(git)/plugins=(autopep8 djando pip git tmux docker)"

              
                44
                
                -		sed -i "s/ZSH_THEME=\"robbyrussell\"/ZSH_THEME=\"simple\"" ~/.zshrc

              
                45
                
                -	else

              
                46
                
                -		echo ""

              
                47
                
                -	fi

              
                
                38
                +read -p "Install zsh config [y/n]: " ZSH_CONF

              
                
                39
                +if [[ "$ZSH_CONF" = "y" ]] || [[ "$ZSH_CONF" = "Y" ]]; then

              
                
                40
                +	sudo apt-get install zsh curl git -y

              
                
                41
                +	sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

              
                
                42
                +	mv zshrc ~/.zshrc

              
                48
                43
                 fi
              
A tmux.conf
···
                
                1
                +# cat << EOF > /dev/null

              
                
                2
                +# -- general ------------------------------------------------------------------

              
                
                3
                +

              
                
                4
                +set -g default-terminal "screen-256color" # colors!

              
                
                5
                +setw -g xterm-keys on

              
                
                6
                +set -s escape-time 10                     # faster command sequences

              
                
                7
                +set -sg repeat-time 600                   # increase repeat timeout

              
                
                8
                +set -s focus-events on

              
                
                9
                +

              
                
                10
                +set -g prefix2 C-a                        # GNU-Screen compatible prefix

              
                
                11
                +bind C-a send-prefix -2

              
                
                12
                +

              
                
                13
                +set -q -g status-utf8 on                  # expect UTF-8 (tmux < 2.2)

              
                
                14
                +setw -q -g utf8 on

              
                
                15
                +

              
                
                16
                +set -g history-limit 5000                 # boost history

              
                
                17
                +

              
                
                18
                +# edit configuration

              
                
                19
                +bind e new-window -n "~/.tmux.conf.local" "sh -c '\${EDITOR:-vim} ~/.tmux.conf.local && tmux source ~/.tmux.conf && tmux display \"~/.tmux.conf sourced\"'"

              
                
                20
                +

              
                
                21
                +# reload configuration

              
                
                22
                +bind r source-file ~/.tmux.conf \; display '~/.tmux.conf sourced'

              
                
                23
                +

              
                
                24
                +

              
                
                25
                +# -- display -------------------------------------------------------------------

              
                
                26
                +

              
                
                27
                +set -g base-index 1           # start windows numbering at 1

              
                
                28
                +setw -g pane-base-index 1     # make pane numbering consistent with windows

              
                
                29
                +

              
                
                30
                +setw -g automatic-rename on   # rename window to reflect current program

              
                
                31
                +set -g renumber-windows on    # renumber windows when a window is closed

              
                
                32
                +

              
                
                33
                +set -g set-titles on          # set terminal title

              
                
                34
                +

              
                
                35
                +set -g display-panes-time 800 # slightly longer pane indicators display time

              
                
                36
                +set -g display-time 1000      # slightly longer status messages display time

              
                
                37
                +

              
                
                38
                +set -g status-interval 10     # redraw status line every 10 seconds

              
                
                39
                +

              
                
                40
                +# clear both screen and history

              
                
                41
                +bind -n C-l send-keys C-l \; run 'sleep 0.1' \; clear-history

              
                
                42
                +

              
                
                43
                +# activity

              
                
                44
                +set -g monitor-activity on

              
                
                45
                +set -g visual-activity off

              
                
                46
                +

              
                
                47
                +

              
                
                48
                +# -- navigation ----------------------------------------------------------------

              
                
                49
                +

              
                
                50
                +# create session

              
                
                51
                +bind C-c new-session

              
                
                52
                +

              
                
                53
                +# find session

              
                
                54
                +bind C-f command-prompt -p find-session 'switch-client -t %%'

              
                
                55
                +

              
                
                56
                +# split current window horizontally

              
                
                57
                +bind - split-window -v

              
                
                58
                +# split current window vertically

              
                
                59
                +bind _ split-window -h

              
                
                60
                +

              
                
                61
                +# pane navigation

              
                
                62
                +bind -r h select-pane -L  # move left

              
                
                63
                +bind -r j select-pane -D  # move down

              
                
                64
                +bind -r k select-pane -U  # move up

              
                
                65
                +bind -r l select-pane -R  # move right

              
                
                66
                +bind > swap-pane -D       # swap current pane with the next one

              
                
                67
                +bind < swap-pane -U       # swap current pane with the previous one

              
                
                68
                +

              
                
                69
                +# maximize current pane

              
                
                70
                +bind + run 'cut -c3- ~/.tmux.conf | sh -s _maximize_pane "#{session_name}" #D'

              
                
                71
                +

              
                
                72
                +# pane resizing

              
                
                73
                +bind -r H resize-pane -L 2

              
                
                74
                +bind -r J resize-pane -D 2

              
                
                75
                +bind -r K resize-pane -U 2

              
                
                76
                +bind -r L resize-pane -R 2

              
                
                77
                +

              
                
                78
                +# window navigation

              
                
                79
                +unbind n

              
                
                80
                +unbind p

              
                
                81
                +bind -r C-h previous-window # select previous window

              
                
                82
                +bind -r C-l next-window     # select next window

              
                
                83
                +bind Tab last-window        # move to last active window

              
                
                84
                +

              
                
                85
                +# toggle mouse

              
                
                86
                +bind m run "cut -c3- ~/.tmux.conf | sh -s _toggle_mouse"

              
                
                87
                +

              
                
                88
                +

              
                
                89
                +# -- urlview -------------------------------------------------------------------

              
                
                90
                +

              
                
                91
                +bind U run "cut -c3- ~/.tmux.conf | sh -s _urlview #{pane_id}"

              
                
                92
                +

              
                
                93
                +

              
                
                94
                +# -- facebook pathpicker -------------------------------------------------------

              
                
                95
                +

              
                
                96
                +bind F run "cut -c3- ~/.tmux.conf | sh -s _fpp #{pane_id}"

              
                
                97
                +

              
                
                98
                +

              
                
                99
                +# -- list choice (tmux < 2.4) --------------------------------------------------

              
                
                100
                +

              
                
                101
                +# vi-choice is gone in tmux >= 2.4

              
                
                102
                +run -b 'tmux bind -t vi-choice h tree-collapse 2> /dev/null || true'

              
                
                103
                +run -b 'tmux bind -t vi-choice l tree-expand 2> /dev/null || true'

              
                
                104
                +run -b 'tmux bind -t vi-choice K start-of-list 2> /dev/null || true'

              
                
                105
                +run -b 'tmux bind -t vi-choice J end-of-list 2> /dev/null || true'

              
                
                106
                +run -b 'tmux bind -t vi-choice H tree-collapse-all 2> /dev/null || true'

              
                
                107
                +run -b 'tmux bind -t vi-choice L tree-expand-all 2> /dev/null || true'

              
                
                108
                +run -b 'tmux bind -t vi-choice Escape cancel 2> /dev/null || true'

              
                
                109
                +

              
                
                110
                +

              
                
                111
                +# -- edit mode (tmux < 2.4) ----------------------------------------------------

              
                
                112
                +

              
                
                113
                +# vi-edit is gone in tmux >= 2.4

              
                
                114
                +run -b 'tmux bind -ct vi-edit H start-of-line 2> /dev/null || true'

              
                
                115
                +run -b 'tmux bind -ct vi-edit L end-of-line 2> /dev/null || true'

              
                
                116
                +run -b 'tmux bind -ct vi-edit q cancel 2> /dev/null || true'

              
                
                117
                +run -b 'tmux bind -ct vi-edit Escape cancel 2> /dev/null || true'

              
                
                118
                +

              
                
                119
                +

              
                
                120
                +# -- copy mode -----------------------------------------------------------------

              
                
                121
                +

              
                
                122
                +bind Enter copy-mode # enter copy mode

              
                
                123
                +

              
                
                124
                +run -b 'tmux bind -t vi-copy v begin-selection 2> /dev/null || true'

              
                
                125
                +run -b 'tmux bind -T copy-mode-vi v send -X begin-selection 2> /dev/null || true'

              
                
                126
                +run -b 'tmux bind -t vi-copy C-v rectangle-toggle 2> /dev/null || true'

              
                
                127
                +run -b 'tmux bind -T copy-mode-vi C-v send -X rectangle-toggle 2> /dev/null || true'

              
                
                128
                +run -b 'tmux bind -t vi-copy y copy-selection 2> /dev/null || true'

              
                
                129
                +run -b 'tmux bind -T copy-mode-vi y send -X copy-selection-and-cancel 2> /dev/null || true'

              
                
                130
                +run -b 'tmux bind -t vi-copy Escape cancel 2> /dev/null || true'

              
                
                131
                +run -b 'tmux bind -T copy-mode-vi Escape send -X cancel 2> /dev/null || true'

              
                
                132
                +run -b 'tmux bind -t vi-copy H start-of-line 2> /dev/null || true'

              
                
                133
                +run -b 'tmux bind -T copy-mode-vi H send -X start-of-line 2> /dev/null || true'

              
                
                134
                +run -b 'tmux bind -t vi-copy L end-of-line 2> /dev/null || true'

              
                
                135
                +run -b 'tmux bind -T copy-mode-vi L send -X end-of-line 2> /dev/null || true'

              
                
                136
                +

              
                
                137
                +# copy to macOS clipboard

              
                
                138
                +if -b 'command -v pbcopy > /dev/null 2>&1' 'bind y run -b "tmux save-buffer - | pbcopy"'

              
                
                139
                +if -b 'command -v reattach-to-user-namespace > /dev/null 2>&1' 'bind y run -b "tmux save-buffer - | reattach-to-user-namespace pbcopy"'

              
                
                140
                +# copy to X11 clipboard

              
                
                141
                +if -b 'command -v xsel > /dev/null 2>&1' 'bind y run -b "tmux save-buffer - | xsel -i -b"'

              
                
                142
                +if -b '! command -v xsel > /dev/null 2>&1 && command -v xclip > /dev/null 2>&1' 'bind y run -b "tmux save-buffer - | xclip -i -selection clipboard >/dev/null 2>&1"'

              
                
                143
                +# copy to Windows clipboard

              
                
                144
                +if -b 'command -v clip.exe > /dev/null 2>&1' 'bind y run -b "tmux save-buffer - | clip.exe"'

              
                
                145
                +if -b '[ -c /dev/clipboard ]' 'bind y run -b "tmux save-buffer - > /dev/clipboard"'

              
                
                146
                +

              
                
                147
                +

              
                
                148
                +# -- buffers -------------------------------------------------------------------

              
                
                149
                +

              
                
                150
                +bind b list-buffers  # list paste buffers

              
                
                151
                +bind p paste-buffer  # paste from the top paste buffer

              
                
                152
                +bind P choose-buffer # choose which buffer to paste from

              
                
                153
                +

              
                
                154
                +

              
                
                155
                +# -- user defined overrides ----------------------------------------------------

              
                
                156
                +

              
                
                157
                +if '[ -f ~/.tmux.conf.local ]' 'source ~/.tmux.conf.local'

              
                
                158
                +

              
                
                159
                +

              
                
                160
                +# -- 8< ------------------------------------------------------------------------

              
                
                161
                +

              
                
                162
                +run 'cut -c3- ~/.tmux.conf | sh -s _apply_configuration'

              
                
                163
                +run -b '[ -z "#{window_active}" ] && [ -z "#{version}" ] && tmux set display-time 3000 \; display "This configuration will soon require tmux >= 2.4" \; set -u display-time || true'

              
                
                164
                +

              
                
                165
                +

              
                
                166
                +# EOF

              
                
                167
                +#

              
                
                168
                +# # exit the script if any statement returns a non-true return value

              
                
                169
                +# set -e

              
                
                170
                +#

              
                
                171
                +# unset GREP_OPTIONS

              
                
                172
                +# export LC_NUMERIC=C

              
                
                173
                +#

              
                
                174
                +# if ! printf '' | sed -E 's///' 2>/dev/null; then

              
                
                175
                +#   if printf '' | sed -r 's///' 2>/dev/null; then

              
                
                176
                +#     sed () {

              
                
                177
                +#       n=$#; while [ "$n" -gt 0 ]; do arg=$1; shift; case $arg in -E*) arg=-r${arg#-E};; esac; set -- "$@" "$arg"; n=$(( n - 1 )); done

              
                
                178
                +#       command sed "$@"

              
                
                179
                +#     }

              
                
                180
                +#   fi

              
                
                181
                +# fi

              
                
                182
                +#

              
                
                183
                +# __newline='

              
                
                184
                +# '

              
                
                185
                +#

              
                
                186
                +# _is_enabled() {

              
                
                187
                +#   ( ([ x"$1" = x"enabled" ] || [ x"$1" = x"true" ] || [ x"$1" = x"yes" ] || [ x"$1" = x"1" ]) && return 0 ) || return 1

              
                
                188
                +# }

              
                
                189
                +#

              
                
                190
                +# _circled() {

              
                
                191
                +#   circled_digits='⓪ ① ② ③ ④ ⑤ ⑥ ⑦ ⑧ ⑨ ⑩ ⑪ ⑫ ⑬ ⑭ ⑮ ⑯ ⑰ ⑱ ⑲ ⑳'

              
                
                192
                +#   if [ "$1" -le 20 ] 2>/dev/null; then

              
                
                193
                +#     i=$(( $1 + 1 ))

              
                
                194
                +#     eval set -- "$circled_digits"

              
                
                195
                +#     eval echo "\${$i}"

              
                
                196
                +#   else

              
                
                197
                +#     echo "$1"

              
                
                198
                +#   fi

              
                
                199
                +# }

              
                
                200
                +#

              
                
                201
                +# _decode_unicode_escapes() {

              
                
                202
                +#   printf '%s' "$*" | perl -CS -pe 's/(\\u([0-9A-Fa-f]{1,4})|\\U([0-9A-Fa-f]{1,8}))/chr(hex($2.$3))/eg' 2>/dev/null

              
                
                203
                +# }

              
                
                204
                +#

              
                
                205
                +# _maximize_pane() {

              
                
                206
                +#   current_session=${1:-$(tmux display -p '#{session_name}')}

              
                
                207
                +#   current_pane=${2:-$(tmux display -p '#{pane_id}')}

              
                
                208
                +#

              
                
                209
                +#   dead_panes=$(tmux list-panes -s -t "$current_session" -F '#{pane_dead} #{pane_id} #{pane_start_command}' | grep -E -o '^1 %.+maximized.+$' || true)

              
                
                210
                +#   restore=$(echo "$dead_panes" | sed -n -E -e "s/^1 $current_pane .+maximized.+'(%[0-9]+)'$/tmux swap-pane -s \1 -t $current_pane \; kill-pane -t $current_pane/p" -e "s/^1 (%[0-9]+) .+maximized.+'$current_pane'$/tmux swap-pane -s \1 -t $current_pane \; kill-pane -t \1/p" )

              
                
                211
                +#

              
                
                212
                +#   if [ -z "$restore" ]; then

              
                
                213
                +#     [ "$(tmux list-panes -t "$current_session:" | wc -l | sed 's/^ *//g')" -eq 1 ] && tmux display "Can't maximize with only one pane" && return

              
                
                214
                +#     window=$(tmux new-window -t "$current_session:" -P "exec maximized... 2> /dev/null & tmux setw -t \"$current_session:\" remain-on-exit on; printf \"Pane has been maximized, press <prefix>+ to restore. %s\" '$current_pane'")

              
                
                215
                +#     window=${window%.*}

              
                
                216
                +#

              
                
                217
                +#     retry=1000

              
                
                218
                +#     while [ x"$(tmux list-panes -t "$window" -F '#{session_name}:#{window_index} #{pane_dead}' 2>/dev/null)" != x"$window 1" ] && [ "$retry" -ne 0 ]; do

              
                
                219
                +#       sleep 0.1

              
                
                220
                +#       retry=$((retry - 1))

              
                
                221
                +#     done

              
                
                222
                +#     if [ "$retry" -eq 0 ]; then

              
                
                223
                +#       tmux display 'Unable to maximize pane'

              
                
                224
                +#     fi

              
                
                225
                +#

              
                
                226
                +#     new_pane=$(tmux display -t "$window" -p '#{pane_id}')

              
                
                227
                +#     tmux setw -t "$window" remain-on-exit off \; swap-pane -s "$current_pane" -t "$new_pane"

              
                
                228
                +#   else

              
                
                229
                +#     $restore || tmux kill-pane

              
                
                230
                +#   fi

              
                
                231
                +# }

              
                
                232
                +#

              
                
                233
                +# _toggle_mouse() {

              
                
                234
                +#   old=$(tmux show -gv mouse)

              
                
                235
                +#   new=""

              
                
                236
                +#

              
                
                237
                +#   if [ "$old" = "on" ]; then

              
                
                238
                +#     new="off"

              
                
                239
                +#   else

              
                
                240
                +#     new="on"

              
                
                241
                +#   fi

              
                
                242
                +#

              
                
                243
                +#   tmux set -g mouse $new \;\

              
                
                244
                +#        display "mouse: $new"

              
                
                245
                +# }

              
                
                246
                +#

              
                
                247
                +# _battery() {

              
                
                248
                +#   count=0

              
                
                249
                +#   charge=0

              
                
                250
                +#   uname_s=$(uname -s)

              
                
                251
                +#   case "$uname_s" in

              
                
                252
                +#     *Darwin*)

              
                
                253
                +#       while IFS= read -r line; do

              
                
                254
                +#         if [ x"$discharging" != x"true" ]; then

              
                
                255
                +#           discharging=$(printf '%s' "$line" | grep -qi "discharging" && echo "true" || echo "false")

              
                
                256
                +#         fi

              
                
                257
                +#         percentage=$(printf '%s' "$line" | grep -E -o '[0-9]+%')

              
                
                258
                +#         charge=$(awk -v charge="$charge" -v percentage="${percentage%%%}" 'BEGIN { print charge + percentage / 100 }')

              
                
                259
                +#         count=$((count + 1))

              
                
                260
                +#       done  << EOF

              
                
                261
                +# $(pmset -g batt | grep 'InternalBattery')

              
                
                262
                +# EOF

              
                
                263
                +#       ;;

              
                
                264
                +#     *Linux*)

              
                
                265
                +#       while IFS= read -r batpath; do

              
                
                266
                +#         grep -i -q device "$batpath/scope" 2> /dev/null && continue

              
                
                267
                +#

              
                
                268
                +#         if [ x"$discharging" != x"true" ]; then

              
                
                269
                +#           discharging=$(grep -qi "discharging" "$batpath/status" && echo "true" || echo "false")

              
                
                270
                +#         fi

              
                
                271
                +#         bat_capacity="$batpath/capacity"

              
                
                272
                +#         if [ -r "$bat_capacity" ]; then

              
                
                273
                +#           charge=$(awk -v charge="$charge" -v capacity="$(cat "$bat_capacity")" 'BEGIN { print charge + capacity / 100 }')

              
                
                274
                +#         else

              
                
                275
                +#           bat_energy_full="$batpath/energy_full"

              
                
                276
                +#           bat_energy_now="$batpath/energy_now"

              
                
                277
                +#           if [ -r "$bat_energy_full" ] && [ -r "$bat_energy_now" ]; then

              
                
                278
                +#             charge=$(awk -v charge="$charge" -v energy_now="$(cat "$bat_energy_now")" -v energy_full="$(cat "$bat_energy_full")" 'BEGIN { print charge + energy_now / energy_full }')

              
                
                279
                +#           fi

              
                
                280
                +#         fi

              
                
                281
                +#         count=$((count + 1))

              
                
                282
                +#       done  << EOF

              
                
                283
                +# $(find /sys/class/power_supply -maxdepth 1 -iname '*bat*')

              
                
                284
                +# EOF

              
                
                285
                +#       ;;

              
                
                286
                +#     *CYGWIN*|*MSYS*|*MINGW*)

              
                
                287
                +#       while IFS= read -r line; do

              
                
                288
                +#         [ -z "$line" ] && continue

              
                
                289
                +#         if [ x"$discharging" != x"true" ]; then

              
                
                290
                +#           discharging=$(printf '%s' "$line" | awk '{ s = ($1 == 1) ? "true" : "false"; print s }')

              
                
                291
                +#         fi

              
                
                292
                +#         charge=$(printf '%s' "$line" | awk -v charge="$charge" '{ print charge + $2 / 100 }')

              
                
                293
                +#         count=$((count + 1))

              
                
                294
                +#       done  << EOF

              
                
                295
                +# $(wmic path Win32_Battery get BatteryStatus, EstimatedChargeRemaining | tr -d '\r' | tail -n +2)

              
                
                296
                +# EOF

              
                
                297
                +#       ;;

              
                
                298
                +#     *OpenBSD*)

              
                
                299
                +#       for batid in 0 1 2; do

              
                
                300
                +#         sysctl -n "hw.sensors.acpibat$batid.raw0" 2>&1 | grep -q 'not found' && continue

              
                
                301
                +#         if [ x"$discharging" != x"true" ]; then

              
                
                302
                +#           discharging=$(sysctl -n "hw.sensors.acpibat$batid.raw0" | grep -q 1 && echo "true" || echo "false")

              
                
                303
                +#         fi

              
                
                304
                +#         if sysctl -n "hw.sensors.acpibat$batid" | grep -q amphour; then

              
                
                305
                +#           charge=$(awk -v charge="$charge" -v remaining="$(sysctl -n hw.sensors.acpibat$batid.amphour3 | cut -d' ' -f1)" -v full="$(sysctl -n hw.sensors.acpibat$batid.amphour0 | cut -d' ' -f1)" 'BEGIN { print charge + remaining / full }')

              
                
                306
                +#         else

              
                
                307
                +#           charge=$(awk -v charge="$charge" -v remaining="$(sysctl -n hw.sensors.acpibat$batid.watthour3 | cut -d' ' -f1)" -v full="$(sysctl -n hw.sensors.acpibat$batid.watthour0 | cut -d' ' -f1)" 'BEGIN { print charge + remaining / full }')

              
                
                308
                +#         fi

              
                
                309
                +#         count=$((count + 1))

              
                
                310
                +#       done

              
                
                311
                +#       ;;

              
                
                312
                +#   esac

              
                
                313
                +#   [ "$count" -ne 0 ] && charge=$(awk -v charge="$charge" -v count="$count" 'BEGIN { print charge / count }')

              
                
                314
                +#   if [ "$charge" -eq 0 ]; then

              
                
                315
                +#     tmux  set -ug '@battery_status'  \;\

              
                
                316
                +#           set -ug '@battery_bar'     \;\

              
                
                317
                +#           set -ug '@battery_hbar'    \;\

              
                
                318
                +#           set -ug '@battery_vbar'    \;\

              
                
                319
                +#           set -ug '@battery_percentage'

              
                
                320
                +#     return

              
                
                321
                +#   fi

              
                
                322
                +#

              
                
                323
                +#   variables=$(tmux  show -gqv '@battery_bar_symbol_full' \;\

              
                
                324
                +#                     show -gqv '@battery_bar_symbol_empty' \;\

              
                
                325
                +#                     show -gqv '@battery_bar_length' \;\

              
                
                326
                +#                     show -gqv '@battery_bar_palette' \;\

              
                
                327
                +#                     show -gqv '@battery_hbar_palette' \;\

              
                
                328
                +#                     show -gqv '@battery_vbar_palette' \;\

              
                
                329
                +#                     show -gqv '@battery_status_charging' \;\

              
                
                330
                +#                     show -gqv '@battery_status_discharging')

              
                
                331
                +#   # shellcheck disable=SC2086

              
                
                332
                +#   { set -f; IFS="$__newline"; set -- $variables; unset IFS; set +f; }

              
                
                333
                +#

              
                
                334
                +#   battery_bar_symbol_full=$1

              
                
                335
                +#   battery_bar_symbol_empty=$2

              
                
                336
                +#   battery_bar_length=$3

              
                
                337
                +#   battery_bar_palette=$4

              
                
                338
                +#   battery_hbar_palette=$5

              
                
                339
                +#   battery_vbar_palette=$6

              
                
                340
                +#   battery_status_charging=$7

              
                
                341
                +#   battery_status_discharging=$8

              
                
                342
                +#

              
                
                343
                +#   if [ x"$battery_bar_length" = x"auto" ]; then

              
                
                344
                +#     columns=$(tmux -q display -p '#{client_width}' 2> /dev/null || echo 80)

              
                
                345
                +#     if [ "$columns" -ge 80 ]; then

              
                
                346
                +#       battery_bar_length=10

              
                
                347
                +#     else

              
                
                348
                +#       battery_bar_length=5

              
                
                349
                +#     fi

              
                
                350
                +#   fi

              
                
                351
                +#

              
                
                352
                +#   if [ x"$discharging" = x"true" ]; then

              
                
                353
                +#     battery_status="$battery_status_discharging"

              
                
                354
                +#   else

              
                
                355
                +#     battery_status="$battery_status_charging"

              
                
                356
                +#   fi

              
                
                357
                +#

              
                
                358
                +#   if echo "$battery_bar_palette" | grep -q -E '^heat|gradient(,[#a-z0-9]{7,9})?$'; then

              
                
                359
                +#     # shellcheck disable=SC2086

              
                
                360
                +#     { set -f; IFS=,; set -- $battery_bar_palette; unset IFS; set +f; }

              
                
                361
                +#     palette_style=$1

              
                
                362
                +#     battery_bg=${2:-none}

              
                
                363
                +#     [ x"$palette_style" = x"gradient" ] && \

              
                
                364
                +#       palette="196 202 208 214 220 226 190 154 118 82 46"

              
                
                365
                +#     [ x"$palette_style" = x"heat" ] && \

              
                
                366
                +#       palette="243 245 247 144 143 142 184 214 208 202 196"

              
                
                367
                +#

              
                
                368
                +#     palette=$(echo "$palette" | awk -v n="$battery_bar_length" '{ for (i = 0; i < n; ++i) printf $(1 + (i * NF / n))" " }')

              
                
                369
                +#     eval set -- "$palette"

              
                
                370
                +#

              
                
                371
                +#     full=$(awk "BEGIN { printf \"%.0f\", ($charge) * $battery_bar_length }")

              
                
                372
                +#     battery_bar="#[bg=$battery_bg]"

              
                
                373
                +#     # shellcheck disable=SC2046

              
                
                374
                +#     [ "$full" -gt 0 ] && \

              
                
                375
                +#       battery_bar="$battery_bar$(printf "#[fg=colour%s]$battery_bar_symbol_full" $(echo "$palette" | cut -d' ' -f1-"$full"))"

              
                
                376
                +#     # shellcheck disable=SC2046

              
                
                377
                +#     empty=$((battery_bar_length - full))

              
                
                378
                +#     # shellcheck disable=SC2046

              
                
                379
                +#     [ "$empty" -gt 0 ] && \

              
                
                380
                +#       battery_bar="$battery_bar$(printf "#[fg=colour%s]$battery_bar_symbol_empty" $(echo "$palette" | cut -d' ' -f$((full + 1))-$((full + empty))))"

              
                
                381
                +#       eval battery_bar="$battery_bar#[fg=colour\${$((full == 0 ? 1 : full))}]"

              
                
                382
                +#   elif echo "$battery_bar_palette" | grep -q -E '^(([#a-z0-9]{7,9}|none),?){3}$'; then

              
                
                383
                +#     # shellcheck disable=SC2086

              
                
                384
                +#     { set -f; IFS=,; set -- $battery_bar_palette; unset IFS; set +f; }

              
                
                385
                +#     battery_full_fg=$1

              
                
                386
                +#     battery_empty_fg=$2

              
                
                387
                +#     battery_bg=$3

              
                
                388
                +#

              
                
                389
                +#     full=$(awk "BEGIN { printf \"%.0f\", ($charge) * $battery_bar_length }")

              
                
                390
                +#     [ x"$battery_bg" != x"none" ] && \

              
                
                391
                +#       battery_bar="#[bg=$battery_bg]"

              
                
                392
                +#     #shellcheck disable=SC2046

              
                
                393
                +#     [ "$full" -gt 0 ] && \

              
                
                394
                +#       battery_bar="$battery_bar#[fg=$battery_full_fg]$(printf "%0.s$battery_bar_symbol_full" $(seq 1 "$full"))"

              
                
                395
                +#     empty=$((battery_bar_length - full))

              
                
                396
                +#     #shellcheck disable=SC2046

              
                
                397
                +#     [ "$empty" -gt 0 ] && \

              
                
                398
                +#       battery_bar="$battery_bar#[fg=$battery_empty_fg]$(printf "%0.s$battery_bar_symbol_empty" $(seq 1 "$empty"))" && \

              
                
                399
                +#       battery_bar="$battery_bar#[fg=$battery_empty_fg]"

              
                
                400
                +#   fi

              
                
                401
                +#

              
                
                402
                +#   if echo "$battery_hbar_palette" | grep -q -E '^heat|gradient(,[#a-z0-9]{7,9})?$'; then

              
                
                403
                +#     # shellcheck disable=SC2086

              
                
                404
                +#     { set -f; IFS=,; set -- $battery_hbar_palette; unset IFS; set +f; }

              
                
                405
                +#     palette_style=$1

              
                
                406
                +#     [ x"$palette_style" = x"gradient" ] && \

              
                
                407
                +#       palette="196 202 208 214 220 226 190 154 118 82 46"

              
                
                408
                +#     [ x"$palette_style" = x"heat" ] && \

              
                
                409
                +#       palette="233 234 235 237 239 241 243 245 247 144 143 142 184 214 208 202 196"

              
                
                410
                +#

              
                
                411
                +#     palette=$(echo "$palette" | awk -v n="$battery_bar_length" '{ for (i = 0; i < n; ++i) printf $(1 + (i * NF / n))" " }')

              
                
                412
                +#     eval set -- "$palette"

              
                
                413
                +#

              
                
                414
                +#     full=$(awk "BEGIN { printf \"%.0f\", ($charge) * $battery_bar_length }")

              
                
                415
                +#     eval battery_hbar_fg="colour\${$((full == 0 ? 1 : full))}"

              
                
                416
                +#   elif echo "$battery_hbar_palette" | grep -q -E '^([#a-z0-9]{7,9},?){3}$'; then

              
                
                417
                +#     # shellcheck disable=SC2086

              
                
                418
                +#     { set -f; IFS=,; set -- $battery_hbar_palette; unset IFS; set +f; }

              
                
                419
                +#

              
                
                420
                +#     # shellcheck disable=SC2046

              
                
                421
                +#     eval $(awk "BEGIN { printf \"battery_hbar_fg=$%d\", (($charge) - 0.001) * $# + 1 }")

              
                
                422
                +#   fi

              
                
                423
                +#

              
                
                424
                +#   eval set -- "▏ ▎ ▍ ▌ ▋ ▊ ▉ █"

              
                
                425
                +#   # shellcheck disable=SC2046

              
                
                426
                +#   eval $(awk "BEGIN { printf \"battery_hbar_symbol=$%d\", ($charge) * ($# - 1) + 1 }")

              
                
                427
                +#   battery_hbar="#[fg=${battery_hbar_fg?}]${battery_hbar_symbol?}"

              
                
                428
                +#

              
                
                429
                +#   if echo "$battery_vbar_palette" | grep -q -E '^heat|gradient(,[#a-z0-9]{7,9})?$'; then

              
                
                430
                +#     # shellcheck disable=SC2086

              
                
                431
                +#     { set -f; IFS=,; set -- $battery_vbar_palette; unset IFS; set +f; }

              
                
                432
                +#     palette_style=$1

              
                
                433
                +#     [ x"$palette_style" = x"gradient" ] && \

              
                
                434
                +#       palette="196 202 208 214 220 226 190 154 118 82 46"

              
                
                435
                +#     [ x"$palette_style" = x"heat" ] && \

              
                
                436
                +#       palette="233 234 235 237 239 241 243 245 247 144 143 142 184 214 208 202 196"

              
                
                437
                +#

              
                
                438
                +#     palette=$(echo "$palette" | awk -v n="$battery_bar_length" '{ for (i = 0; i < n; ++i) printf $(1 + (i * NF / n))" " }')

              
                
                439
                +#     eval set -- "$palette"

              
                
                440
                +#

              
                
                441
                +#     full=$(awk "BEGIN { printf \"%.0f\", ($charge) * $battery_bar_length }")

              
                
                442
                +#     eval battery_vbar_fg="colour\${$((full == 0 ? 1 : full))}"

              
                
                443
                +#   elif echo "$battery_vbar_palette" | grep -q -E '^([#a-z0-9]{7,9},?){3}$'; then

              
                
                444
                +#     # shellcheck disable=SC2086

              
                
                445
                +#     { set -f; IFS=,; set -- $battery_vbar_palette; unset IFS; set +f; }

              
                
                446
                +#

              
                
                447
                +#     # shellcheck disable=SC2046

              
                
                448
                +#     eval $(awk "BEGIN { printf \"battery_vbar_fg=$%d\", (($charge) - 0.001) * $# + 1 }")

              
                
                449
                +#   fi

              
                
                450
                +#

              
                
                451
                +#   eval set -- "▁ ▂ ▃ ▄ ▅ ▆ ▇ █"

              
                
                452
                +#   # shellcheck disable=SC2046

              
                
                453
                +#   eval $(awk "BEGIN { printf \"battery_vbar_symbol=$%d\", ($charge) * ($# - 1) + 1 }")

              
                
                454
                +#   battery_vbar="#[fg=${battery_vbar_fg?}]${battery_vbar_symbol?}"

              
                
                455
                +#

              
                
                456
                +#   battery_percentage="$(awk "BEGIN { printf \"%.0f%%\", ($charge) * 100 }")"

              
                
                457
                +#

              
                
                458
                +#   tmux  set -g '@battery_status' "$battery_status" \;\

              
                
                459
                +#         set -g '@battery_bar' "$battery_bar" \;\

              
                
                460
                +#         set -g '@battery_hbar' "$battery_hbar" \;\

              
                
                461
                +#         set -g '@battery_vbar' "$battery_vbar" \;\

              
                
                462
                +#         set -g '@battery_percentage' "$battery_percentage"

              
                
                463
                +# }

              
                
                464
                +#

              
                
                465
                +# _tty_info() {

              
                
                466
                +#   tty="${1##/dev/}"

              
                
                467
                +#   uname -s | grep -q "CYGWIN" && cygwin=true

              
                
                468
                +#

              
                
                469
                +#   if [ x"$cygwin" = x"true" ]; then

              
                
                470
                +#     ps -af | tail -n +2 | awk -v tty="$tty" '

              
                
                471
                +#       ((/ssh/ && !/-W/) || !/ssh/) && $4 == tty {

              
                
                472
                +#         user[$2] = $1; parent[$2] = $3; child[$3] = $2

              
                
                473
                +#       }

              
                
                474
                +#       END {

              
                
                475
                +#         for (i in parent)

              
                
                476
                +#         {

              
                
                477
                +#           j = i

              
                
                478
                +#           while (parent[j])

              
                
                479
                +#             j = parent[j]

              
                
                480
                +#

              
                
                481
                +#           if (!(i in child) && j != 1)

              
                
                482
                +#           {

              
                
                483
                +#             file = "/proc/" i "/cmdline"; getline command < file; close(file)

              
                
                484
                +#             gsub(/\0/, " ", command)

              
                
                485
                +#             print i, user[i], command

              
                
                486
                +#             exit

              
                
                487
                +#           }

              
                
                488
                +#         }

              
                
                489
                +#       }

              
                
                490
                +#     '

              
                
                491
                +#   else

              
                
                492
                +#     ps -t "$tty" -o user=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX -o pid= -o ppid= -o command= | awk '

              
                
                493
                +#       NR > 1 && ((/ssh/ && !/-W/) || !/ssh/) {

              
                
                494
                +#         user[$2] = $1; parent[$2] = $3; child[$3] = $2; for (i = 4 ; i <= NF; ++i) command[$2] = i > 4 ? command[$2] FS $i : $i

              
                
                495
                +#       }

              
                
                496
                +#       END {

              
                
                497
                +#         for (i in parent)

              
                
                498
                +#         {

              
                
                499
                +#           j = i

              
                
                500
                +#           while (parent[j])

              
                
                501
                +#             j = parent[j]

              
                
                502
                +#

              
                
                503
                +#           if (!(i in child) && j != 1)

              
                
                504
                +#           {

              
                
                505
                +#             print i, user[i], command[i]

              
                
                506
                +#             exit

              
                
                507
                +#           }

              
                
                508
                +#         }

              
                
                509
                +#       }

              
                
                510
                +#     '

              
                
                511
                +#   fi

              
                
                512
                +# }

              
                
                513
                +#

              
                
                514
                +# _ssh_or_mosh_args() {

              
                
                515
                +#   args=$(printf '%s' "$1" | awk '/ssh/ && !/vagrant ssh/ && !/autossh/ && !/-W/ { $1=""; print $0; exit }')

              
                
                516
                +#   if [ -z "$args" ]; then

              
                
                517
                +#     args=$(printf '%s' "$1" | grep 'mosh-client' | sed -E -e 's/.*mosh-client -# (.*)\|.*$/\1/' -e 's/-[^ ]*//g' -e 's/\d:\d//g')

              
                
                518
                +#   fi

              
                
                519
                +#

              
                
                520
                +#  printf '%s' "$args"

              
                
                521
                +# }

              
                
                522
                +#

              
                
                523
                +# _username() {

              
                
                524
                +#   tty=${1:-$(tmux display -p '#{pane_tty}')}

              
                
                525
                +#   ssh_only=$2

              
                
                526
                +#

              
                
                527
                +#   tty_info=$(_tty_info "$tty")

              
                
                528
                +#   command=$(printf '%s' "$tty_info" | cut -d' ' -f3-)

              
                
                529
                +#

              
                
                530
                +#   ssh_or_mosh_args=$(_ssh_or_mosh_args "$command")

              
                
                531
                +#   if [ -n "$ssh_or_mosh_args" ]; then

              
                
                532
                +#     # shellcheck disable=SC2086

              
                
                533
                +#     username=$(ssh -G $ssh_or_mosh_args 2>/dev/null | awk 'NR > 2 { exit } ; /^user / { print $2 }')

              
                
                534
                +#     # shellcheck disable=SC2086

              
                
                535
                +#     [ -z "$username" ] && username=$(ssh -T -o ControlPath=none -o ProxyCommand="sh -c 'echo %%username%% %r >&2'" $ssh_or_mosh_args 2>&1 | awk '/^%username% / { print $2; exit }')

              
                
                536
                +#   else

              
                
                537
                +#     if ! _is_enabled "$ssh_only"; then

              
                
                538
                +#       username=$(printf '%s' "$tty_info" | cut -d' ' -f2)

              
                
                539
                +#     fi

              
                
                540
                +#   fi

              
                
                541
                +#

              
                
                542
                +#   printf '%s' "$username"

              
                
                543
                +# }

              
                
                544
                +#

              
                
                545
                +# _hostname() {

              
                
                546
                +#   tty=${1:-$(tmux display -p '#{pane_tty}')}

              
                
                547
                +#   ssh_only=$2

              
                
                548
                +#

              
                
                549
                +#   tty_info=$(_tty_info "$tty")

              
                
                550
                +#   command=$(printf '%s' "$tty_info" | cut -d' ' -f3-)

              
                
                551
                +#

              
                
                552
                +#   ssh_or_mosh_args=$(_ssh_or_mosh_args "$command")

              
                
                553
                +#   if [ -n "$ssh_or_mosh_args" ]; then

              
                
                554
                +#     # shellcheck disable=SC2086

              
                
                555
                +#     hostname=$(ssh -G $ssh_or_mosh_args 2>/dev/null | awk 'NR > 2 { exit } ; /^hostname / { print $2 }')

              
                
                556
                +#     # shellcheck disable=SC2086

              
                
                557
                +#     [ -z "$hostname" ] && hostname=$(ssh -T -o ControlPath=none -o ProxyCommand="sh -c 'echo %%hostname%% %h >&2'" $ssh_or_mosh_args 2>&1 | awk '/^%hostname% / { print $2; exit }')

              
                
                558
                +#     #shellcheck disable=SC1004

              
                
                559
                +#     hostname=$(echo "$hostname" | awk '\

              
                
                560
                +#     { \

              
                
                561
                +#       if ($1~/^[0-9.:]+$/) \

              
                
                562
                +#         print $1; \

              
                
                563
                +#       else \

              
                
                564
                +#         split($1, a, ".") ; print a[1] \

              
                
                565
                +#     }')

              
                
                566
                +#   else

              
                
                567
                +#     if ! _is_enabled "$ssh_only"; then

              
                
                568
                +#       hostname=$(command hostname -s)

              
                
                569
                +#     fi

              
                
                570
                +#   fi

              
                
                571
                +#

              
                
                572
                +#   printf '%s' "$hostname"

              
                
                573
                +# }

              
                
                574
                +#

              
                
                575
                +# _root() {

              
                
                576
                +#   tty=${1:-$(tmux display -p '#{pane_tty}')}

              
                
                577
                +#   username=$(_username "$tty" false)

              
                
                578
                +#

              
                
                579
                +#   if [ x"$username" = x"root" ]; then

              
                
                580
                +#     tmux show -gqv '@root'

              
                
                581
                +#   else

              
                
                582
                +#     echo ""

              
                
                583
                +#   fi

              
                
                584
                +# }

              
                
                585
                +#

              
                
                586
                +# _uptime() {

              
                
                587
                +#   case $(uname -s) in

              
                
                588
                +#     *Darwin*)

              
                
                589
                +#       boot=$(sysctl -q -n kern.boottime | awk -F'[ ,:]+' '{ print $4 }')

              
                
                590
                +#       now=$(date +%s)

              
                
                591
                +#       ;;

              
                
                592
                +#     *Linux*|*CYGWIN*|*MSYS*|*MINGW*)

              
                
                593
                +#       boot=0

              
                
                594
                +#       now=$(cut -d' ' -f1 < /proc/uptime)

              
                
                595
                +#       ;;

              
                
                596
                +#     *OpenBSD*)

              
                
                597
                +#       boot=$(sysctl -n kern.boottime)

              
                
                598
                +#       now=$(date +%s)

              
                
                599
                +#   esac

              
                
                600
                +#   # shellcheck disable=SC1004

              
                
                601
                +#   awk -v boot="$boot" -v now="$now" '

              
                
                602
                +#     BEGIN {

              
                
                603
                +#       uptime = now - boot

              
                
                604
                +#       y = int(uptime / 31536000)

              
                
                605
                +#       dy = int(uptime / 86400) % 365

              
                
                606
                +#       d = int(uptime / 86400)

              
                
                607
                +#       h = int(uptime / 3600) % 24

              
                
                608
                +#       m = int(uptime / 60) % 60

              
                
                609
                +#       s = int(uptime) % 60

              
                
                610
                +#

              
                
                611
                +#       system("tmux  set -g @uptime_y " y + 0 " \\; " \

              
                
                612
                +#                    "set -g @uptime_dy " dy + 0 " \\; " \

              
                
                613
                +#                    "set -g @uptime_d " d + 0 " \\; " \

              
                
                614
                +#                    "set -g @uptime_h " h + 0 " \\; " \

              
                
                615
                +#                    "set -g @uptime_m " m + 0 " \\; " \

              
                
                616
                +#                    "set -g @uptime_s " s + 0)

              
                
                617
                +#     }'

              
                
                618
                +# }

              
                
                619
                +#

              
                
                620
                +# _loadavg() {

              
                
                621
                +#   case $(uname -s) in

              
                
                622
                +#     *Darwin*)

              
                
                623
                +#       tmux set -g @loadavg "$(sysctl -q -n vm.loadavg | cut -d' ' -f2)"

              
                
                624
                +#       ;;

              
                
                625
                +#     *Linux*)

              
                
                626
                +#       tmux set -g @loadavg "$(cut -d' ' -f1 < /proc/loadavg)"

              
                
                627
                +#       ;;

              
                
                628
                +#     *OpenBSD*)

              
                
                629
                +#       tmux set -g @loadavg "$(sysctl -q -n vm.loadavg | cut -d' ' -f1)"

              
                
                630
                +#       ;;

              
                
                631
                +#   esac

              
                
                632
                +# }

              
                
                633
                +#

              
                
                634
                +# _split_window() {

              
                
                635
                +#   tty=${1:-$(tmux display -p '#{pane_tty}')}

              
                
                636
                +#   shift

              
                
                637
                +#

              
                
                638
                +#   tty_info=$(_tty_info "$tty")

              
                
                639
                +#   command=$(printf '%s' "$tty_info" | cut -d' ' -f3-)

              
                
                640
                +#

              
                
                641
                +#   case "$command" in

              
                
                642
                +#     *mosh-client*)

              
                
                643
                +#       # shellcheck disable=SC2046

              
                
                644
                +#        tmux split-window "$@" mosh $(echo "$command" | sed -E -e 's/.*mosh-client -# (.*)\|.*$/\1/')

              
                
                645
                +#      ;;

              
                
                646
                +#     *ssh*)

              
                
                647
                +#       # shellcheck disable=SC2046

              
                
                648
                +#       tmux split-window "$@" $(echo "$command" | sed -e 's/;/\\;/g')

              
                
                649
                +#       ;;

              
                
                650
                +#     *)

              
                
                651
                +#       tmux split-window "$@"

              
                
                652
                +#   esac

              
                
                653
                +# }

              
                
                654
                +#

              
                
                655
                +# _apply_overrides() {

              
                
                656
                +#   tmux_conf_theme_24b_colour=${tmux_conf_theme_24b_colour:-false}

              
                
                657
                +#   if _is_enabled "$tmux_conf_theme_24b_colour"; then

              
                
                658
                +#   case "$TERM" in

              
                
                659
                +#     screen-*|tmux-*)

              
                
                660
                +#       ;;

              
                
                661
                +#     *)

              
                
                662
                +#       tmux set-option -ga terminal-overrides ",*256col*:Tc"

              
                
                663
                +#       ;;

              
                
                664
                +#   esac

              
                
                665
                +#   fi

              
                
                666
                +# }

              
                
                667
                +#

              
                
                668
                +# _apply_bindings() {

              
                
                669
                +#   cfg=$(mktemp) && trap 'rm -f $cfg*' EXIT

              
                
                670
                +#

              
                
                671
                +#   tmux list-keys | grep -vF 'tmux.conf.local' | grep -E '(new-window|split(-|_)window|new-session|copy-selection|copy-pipe)' > "$cfg"

              
                
                672
                +#

              
                
                673
                +#   # tmux 3.0 doesn't include 02254d1e5c881be95fd2fc37b4c4209640b6b266 and the

              
                
                674
                +#   # output of list-keys can be truncated

              
                
                675
                +#   perl -p -i -e "s/'#\{\?window_zoomed_flag,Unzoom,Zoom\}' 'z' \{resize-pane -$/'#{?window_zoomed_flag,Unzoom,Zoom}' 'z' {resize-pane -Z}\"/g" "$cfg"

              
                
                676
                +#

              
                
                677
                +#   tmux_conf_new_window_retain_current_path=${tmux_conf_new_window_retain_current_path:-false}

              
                
                678
                +#   if _is_enabled "$tmux_conf_new_window_retain_current_path"; then

              
                
                679
                +#     perl -p -i \

              
                
                680
                +#       -e "s/\b(new-window)\b(?!\s+-)/{$&}/g if /\bdisplay-menu\b/" \

              
                
                681
                +#       -e ';' \

              
                
                682
                +#       -e "s/\bnew-window\b(?!([^;}\n\"]*?)(?:\s+-c\s+(\\\?\"?|'?)#\{pane_current_path\}\2))/new-window -c '#{pane_current_path}'/g" \

              
                
                683
                +#       "$cfg"

              
                
                684
                +#   else

              
                
                685
                +#     perl -p -i -e "s/\bnew-window\b([^;}\n\"]*?)(?:\s+-c\s+(\\\?\"?|'?)#\{pane_current_path\}\2)/new-window\1/g" "$cfg"

              
                
                686
                +#   fi

              
                
                687
                +#

              
                
                688
                +#   tmux_conf_new_pane_retain_current_path=${tmux_conf_new_pane_retain_current_path:-false}

              
                
                689
                +#   if _is_enabled "$tmux_conf_new_pane_retain_current_path"; then

              
                
                690
                +#     perl -p -i -e "s/\bsplit-window\b(?!([^;}\n\"]*?)(?:\s+-c\s+(\\\?\"?|'?)#\{pane_current_path\}\2))/split-window -c '#{pane_current_path}'/g" "$cfg"

              
                
                691
                +#   else

              
                
                692
                +#     perl -p -i -e "s/\bsplit-window\b([^;}\n\"]*?)(?:\s+-c\s+(\\\?\"?|'?)#\{pane_current_path\}\2)/split-window\1/g" "$cfg"

              
                
                693
                +#   fi

              
                
                694
                +#

              
                
                695
                +#   tmux_conf_new_pane_reconnect_ssh=${tmux_conf_new_pane_reconnect_ssh:-false}

              
                
                696
                +#   if _is_enabled "$tmux_conf_new_pane_reconnect_ssh"; then

              
                
                697
                +#     if _is_enabled "$tmux_conf_new_pane_retain_current_path"; then

              
                
                698
                +#       perl -p -i \

              
                
                699
                +#         -e "s/\bsplit-window\b([^;}\n\"]*?)(?:\s+-c\s+(\\\?\"?|'?)#\{pane_current_path\}\2)([^;}\n\"]*)/run-shell 'cut -c3- ~\/\.tmux\.conf | sh -s _split_window #{pane_tty}\1\3 -c #\{pane_current_path\}'/g" \

              
                
                700
                +#         -e ';' \

              
                
                701
                +#         -e "s/\b_split_window\b\s+#\{pane_tty\}(.*?)\s+-c\s+\\\\\"#\{pane_current_path\}\\\\\"\"/_split_window #{pane_tty}\1 -c \\\\\"#{pane_current_path}\\\\\"\"/g" \

              
                
                702
                +#         "$cfg"

              
                
                703
                +#     else

              
                
                704
                +#       perl -p -i \

              
                
                705
                +#         -e "s/\bsplit-window\b([^;}\n]*)/run-shell 'cut -c3- ~\/\.tmux\.conf | sh -s _split_window #{pane_tty}\1'/g" \

              
                
                706
                +#         -e ';' \

              
                
                707
                +#         -e "s/\b_split_window\b\s+#\{pane_tty\}(.*?)\s+-c\s+\\\\\"#\{pane_current_path\}\\\\\"\"/_split_window #{pane_tty}\1\"/g" \

              
                
                708
                +#         "$cfg"

              
                
                709
                +#     fi

              
                
                710
                +#   else

              
                
                711
                +#     if _is_enabled "$tmux_conf_new_pane_retain_current_path"; then

              
                
                712
                +#       perl -p -i -e "s/\brun-shell\b(\s+(\"|')cut\s+-c3-\s+~\/\.tmux\.conf\s+\|\s+sh\s+-s\s+_split_window\s+#\{pane_tty\})(.*?)\s+-c\s+#\{pane_current_path\}\2/split-window\3 -c '#{pane_current_path}'/g" "$cfg"

              
                
                713
                +#     else

              
                
                714
                +#       perl -p -i -e "s/\brun-shell\b(\s+(\"|')cut\s+-c3-\s+~\/\.tmux\.conf\s+\|\s+sh\s+-s\s+_split_window\s+#\{pane_tty\})(.*)\2/split-window\3/g" "$cfg"

              
                
                715
                +#     fi

              
                
                716
                +#   fi

              
                
                717
                +#

              
                
                718
                +#   tmux_conf_new_session_prompt=${tmux_conf_new_session_prompt:-false}

              
                
                719
                +#   if _is_enabled "$tmux_conf_new_session_prompt"; then

              
                
                720
                +#     perl -p -i \

              
                
                721
                +#       -e "s/(?<!command-prompt -p )\b(new-session)\b(?!\s+-)/{$&}/g if /\bdisplay-menu\b/" \

              
                
                722
                +#       -e ';' \

              
                
                723
                +#       -e "s/(?<!\bcommand-prompt -p )\bnew-session\b(?! -s)/command-prompt -p new-session 'new-session -s \"%%\"'/g" \

              
                
                724
                +#       "$cfg"

              
                
                725
                +#   else

              
                
                726
                +#     perl -p -i -e "s/\bcommand-prompt\s+-p\s+new-session\s+'new-session\s+-s\s+\"%%\"'/new-session/g" "$cfg"

              
                
                727
                +#   fi

              
                
                728
                +#

              
                
                729
                +#   tmux_conf_copy_to_os_clipboard=${tmux_conf_copy_to_os_clipboard:-false}

              
                
                730
                +#   command -v pbcopy > /dev/null 2>&1 && command='pbcopy'

              
                
                731
                +#   command -v reattach-to-user-namespace > /dev/null 2>&1 && command='reattach-to-user-namespace pbcopy'

              
                
                732
                +#   command -v xsel > /dev/null 2>&1 && command='xsel -i -b'

              
                
                733
                +#   ! command -v xsel > /dev/null 2>&1 && command -v xclip > /dev/null 2>&1 && command='xclip -i -selection clipboard > \/dev\/null 2>\&1'

              
                
                734
                +#   command -v clip.exe > /dev/null 2>&1 && command='clip\.exe'

              
                
                735
                +#   [ -c /dev/clipboard ] && command='cat > \/dev\/clipboard'

              
                
                736
                +#

              
                
                737
                +#   if [ -n "$command" ]; then

              
                
                738
                +#     if _is_enabled "$tmux_conf_copy_to_os_clipboard"; then

              
                
                739
                +#       perl -p -i -e "s/\bcopy-selection(-and-cancel)?\b/copy-pipe\1 '$command'/g" "$cfg"

              
                
                740
                +#     else

              
                
                741
                +#       perl -p -i -e "s/\bcopy-pipe(-and-cancel)?\b\s+(\"|')?$command\2/copy-selection\1/g" "$cfg"

              
                
                742
                +#     fi

              
                
                743
                +#   fi

              
                
                744
                +#

              
                
                745
                +#   # until tmux >= 3.0, output of tmux list-keys can't be consumed back by tmux source-file without applying some escapings

              
                
                746
                +#   awk < "$cfg" \

              
                
                747
                +#     '{i = $2 == "-T" ? 4 : 5; gsub(/^[;]$/, "\\\\&", $i); gsub(/^[$"#~]$/, "'"'"'&'"'"'", $i); gsub(/^['"'"']$/, "\"&\"", $i); print}' > "$cfg.in"

              
                
                748
                +#

              
                
                749
                +#   # ignore bindings with errors

              
                
                750
                +#   if ! tmux source-file "$cfg.in"; then

              
                
                751
                +#     verbose_flag=$(tmux source-file -v /dev/null 2> /dev/null && printf -- '-v' || true)

              
                
                752
                +#     while ! out=$(tmux source-file "$verbose_flag" "$cfg.in"); do

              
                
                753
                +#       line=$(printf "%s" "$out" | tail -1 | cut -d':' -f2)

              
                
                754
                +#       perl -n -i -e "if ($. != $line) { print }" "$cfg.in"

              
                
                755
                +#     done

              
                
                756
                +#   fi

              
                
                757
                +# }

              
                
                758
                +#

              
                
                759
                +# _apply_theme() {

              
                
                760
                +#

              
                
                761
                +#   # -- panes -------------------------------------------------------------

              
                
                762
                +#

              
                
                763
                +#   tmux_conf_theme_window_fg=${tmux_conf_theme_window_fg:-default}

              
                
                764
                +#   tmux_conf_theme_window_bg=${tmux_conf_theme_window_bg:-default}

              
                
                765
                +#   tmux_conf_theme_highlight_focused_pane=${tmux_conf_theme_highlight_focused_pane:-false}

              
                
                766
                +#   tmux_conf_theme_focused_pane_fg=${tmux_conf_theme_focused_pane_fg:-'default'} # default

              
                
                767
                +#   tmux_conf_theme_focused_pane_bg=${tmux_conf_theme_focused_pane_bg:-'#0087d7'} # light blue

              
                
                768
                +#

              
                
                769
                +#   # tmux 1.9 doesn't really like set -q

              
                
                770
                +#   if tmux show -g -w | grep -q window-style; then

              
                
                771
                +#     tmux setw -g window-style "fg=$tmux_conf_theme_window_fg,bg=$tmux_conf_theme_window_bg"

              
                
                772
                +#

              
                
                773
                +#     if _is_enabled "$tmux_conf_theme_highlight_focused_pane"; then

              
                
                774
                +#       tmux setw -g window-active-style "fg=$tmux_conf_theme_focused_pane_fg,bg=$tmux_conf_theme_focused_pane_bg"

              
                
                775
                +#     else

              
                
                776
                +#       tmux setw -g window-active-style default

              
                
                777
                +#     fi

              
                
                778
                +#   fi

              
                
                779
                +#

              
                
                780
                +#   tmux_conf_theme_pane_border_style=${tmux_conf_theme_pane_border_style:-thin}

              
                
                781
                +#   tmux_conf_theme_pane_border=${tmux_conf_theme_pane_border:-'#444444'}               # light gray

              
                
                782
                +#   tmux_conf_theme_pane_active_border=${tmux_conf_theme_pane_active_border:-'#00afff'} # light blue

              
                
                783
                +#   tmux_conf_theme_pane_border_fg=${tmux_conf_theme_pane_border_fg:-$tmux_conf_theme_pane_border}

              
                
                784
                +#   tmux_conf_theme_pane_active_border_fg=${tmux_conf_theme_pane_active_border_fg:-$tmux_conf_theme_pane_active_border}

              
                
                785
                +#   case "$tmux_conf_theme_pane_border_style" in

              
                
                786
                +#     fat)

              
                
                787
                +#       tmux_conf_theme_pane_border_bg=${tmux_conf_theme_pane_border_bg:-$tmux_conf_theme_pane_border_fg}

              
                
                788
                +#       tmux_conf_theme_pane_active_border_bg=${tmux_conf_theme_pane_active_border_bg:-$tmux_conf_theme_pane_active_border_fg}

              
                
                789
                +#       ;;

              
                
                790
                +#     thin|*)

              
                
                791
                +#       tmux_conf_theme_pane_border_bg=${tmux_conf_theme_pane_border_bg:-'default'}

              
                
                792
                +#       tmux_conf_theme_pane_active_border_bg=${tmux_conf_theme_pane_active_border_bg:-'default'}

              
                
                793
                +#       ;;

              
                
                794
                +#   esac

              
                
                795
                +#   tmux setw -g pane-border-style "fg=$tmux_conf_theme_pane_border_fg,bg=$tmux_conf_theme_pane_border_bg" \; set -g pane-active-border-style "fg=$tmux_conf_theme_pane_active_border_fg,bg=$tmux_conf_theme_pane_active_border_bg"

              
                
                796
                +#

              
                
                797
                +#   tmux_conf_theme_pane_indicator=${tmux_conf_theme_pane_indicator:-'#00afff'}               # light blue

              
                
                798
                +#   tmux_conf_theme_pane_active_indicator=${tmux_conf_theme_pane_active_indicator:-'#00afff'} # light blue

              
                
                799
                +#

              
                
                800
                +#   tmux set -g display-panes-colour "$tmux_conf_theme_pane_indicator" \; set -g display-panes-active-colour "$tmux_conf_theme_pane_active_indicator"

              
                
                801
                +#

              
                
                802
                +#   # -- status line -------------------------------------------------------

              
                
                803
                +#

              
                
                804
                +#   tmux_conf_theme_left_separator_main=$(_decode_unicode_escapes "${tmux_conf_theme_left_separator_main-}")

              
                
                805
                +#   tmux_conf_theme_left_separator_sub=$(_decode_unicode_escapes "${tmux_conf_theme_left_separator_sub-|}")

              
                
                806
                +#   tmux_conf_theme_right_separator_main=$(_decode_unicode_escapes "${tmux_conf_theme_right_separator_main-}")

              
                
                807
                +#   tmux_conf_theme_right_separator_sub=$(_decode_unicode_escapes "${tmux_conf_theme_right_separator_sub-|}")

              
                
                808
                +#

              
                
                809
                +#   tmux_conf_theme_message_fg=${tmux_conf_theme_message_fg:-'#000000'}   # black

              
                
                810
                +#   tmux_conf_theme_message_bg=${tmux_conf_theme_message_bg:-'#ffff00'}   # yellow

              
                
                811
                +#   tmux_conf_theme_message_attr=${tmux_conf_theme_message_attr:-'bold'}

              
                
                812
                +#   tmux set -g message-style "fg=$tmux_conf_theme_message_fg,bg=$tmux_conf_theme_message_bg,$tmux_conf_theme_message_attr"

              
                
                813
                +#

              
                
                814
                +#   tmux_conf_theme_message_command_fg=${tmux_conf_theme_message_command_fg:-'#ffff00'} # yellow

              
                
                815
                +#   tmux_conf_theme_message_command_bg=${tmux_conf_theme_message_command_bg:-'#000000'} # black

              
                
                816
                +#   tmux_conf_theme_message_command_attr=${tmux_conf_theme_message_command_attr:-'bold'}

              
                
                817
                +#   tmux set -g message-command-style "fg=$tmux_conf_theme_message_command_fg,bg=$tmux_conf_theme_message_command_bg,$tmux_conf_theme_message_command_attr"

              
                
                818
                +#

              
                
                819
                +#   tmux_conf_theme_mode_fg=${tmux_conf_theme_mode_fg:-'#000000'} # black

              
                
                820
                +#   tmux_conf_theme_mode_bg=${tmux_conf_theme_mode_bg:-'#ffff00'} # yellow

              
                
                821
                +#   tmux_conf_theme_mode_attr=${tmux_conf_theme_mode_attr:-'bold'}

              
                
                822
                +#   tmux setw -g mode-style "fg=$tmux_conf_theme_mode_fg,bg=$tmux_conf_theme_mode_bg,$tmux_conf_theme_mode_attr"

              
                
                823
                +#

              
                
                824
                +#   tmux_conf_theme_status_fg=${tmux_conf_theme_status_fg:-'#8a8a8a'} # white

              
                
                825
                +#   tmux_conf_theme_status_bg=${tmux_conf_theme_status_bg:-'#080808'} # dark gray

              
                
                826
                +#   tmux_conf_theme_status_attr=${tmux_conf_theme_status_attr:-'none'}

              
                
                827
                +#   tmux  set -g status-style "fg=$tmux_conf_theme_status_fg,bg=$tmux_conf_theme_status_bg,$tmux_conf_theme_status_attr"        \;\

              
                
                828
                +#         set -g status-left-style "fg=$tmux_conf_theme_status_fg,bg=$tmux_conf_theme_status_bg,$tmux_conf_theme_status_attr"   \;\

              
                
                829
                +#         set -g status-right-style "fg=$tmux_conf_theme_status_fg,bg=$tmux_conf_theme_status_bg,$tmux_conf_theme_status_attr"

              
                
                830
                +#

              
                
                831
                +#   tmux_conf_theme_terminal_title=${tmux_conf_theme_terminal_title:-'#h ❐ #S ● #I #W'}

              
                
                832
                +#

              
                
                833
                +#   tmux_conf_theme_terminal_title=$(echo "$tmux_conf_theme_terminal_title" | sed \

              
                
                834
                +#     -e 's%#{circled_window_index}%#(cut -c3- ~/.tmux.conf | sh -s _circled #I)%g' \

              
                
                835
                +#     -e 's%#{circled_session_name}%#(cut -c3- ~/.tmux.conf | sh -s _circled #S)%g' \

              
                
                836
                +#     -e 's%#{username}%#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_tty} false #D)%g' \

              
                
                837
                +#     -e 's%#{hostname}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_tty} false #D)%g' \

              
                
                838
                +#     -e 's%#{username_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_tty} true #D)%g' \

              
                
                839
                +#     -e 's%#{hostname_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_tty} true #D)%g')

              
                
                840
                +#   tmux set -g set-titles-string "$(_decode_unicode_escapes "$tmux_conf_theme_terminal_title")"

              
                
                841
                +#

              
                
                842
                +#   tmux_conf_theme_window_status_fg=${tmux_conf_theme_window_status_fg:-'#8a8a8a'} # white

              
                
                843
                +#   tmux_conf_theme_window_status_bg=${tmux_conf_theme_window_status_bg:-'#080808'} # dark gray

              
                
                844
                +#   tmux_conf_theme_window_status_attr=${tmux_conf_theme_window_status_attr:-'none'}

              
                
                845
                +#   tmux_conf_theme_window_status_format=${tmux_conf_theme_window_status_format:-'#I #W'}

              
                
                846
                +#

              
                
                847
                +#   tmux_conf_theme_window_status_current_fg=${tmux_conf_theme_window_status_current_fg:-'#000000'} # black

              
                
                848
                +#   tmux_conf_theme_window_status_current_bg=${tmux_conf_theme_window_status_current_bg:-'#00afff'} # light blue

              
                
                849
                +#   tmux_conf_theme_window_status_current_attr=${tmux_conf_theme_window_status_current_attr:-'bold'}

              
                
                850
                +#   tmux_conf_theme_window_status_current_format=${tmux_conf_theme_window_status_current_format:-'#I #W'}

              
                
                851
                +#   if [ x"$(tmux show -g -v status-justify)" = x"right" ]; then

              
                
                852
                +#     tmux_conf_theme_window_status_current_format="#[fg=$tmux_conf_theme_window_status_current_bg,bg=$tmux_conf_theme_window_status_bg]$tmux_conf_theme_right_separator_main#[fg=$tmux_conf_theme_window_status_current_fg,bg=$tmux_conf_theme_window_status_current_bg,$tmux_conf_theme_window_status_current_attr] $tmux_conf_theme_window_status_current_format #[fg=$tmux_conf_theme_window_status_bg,bg=$tmux_conf_theme_window_status_current_bg,none]$tmux_conf_theme_right_separator_main"

              
                
                853
                +#   else

              
                
                854
                +#     tmux_conf_theme_window_status_current_format="#[fg=$tmux_conf_theme_window_status_bg,bg=$tmux_conf_theme_window_status_current_bg]$tmux_conf_theme_left_separator_main#[fg=$tmux_conf_theme_window_status_current_fg,bg=$tmux_conf_theme_window_status_current_bg,$tmux_conf_theme_window_status_current_attr] $tmux_conf_theme_window_status_current_format #[fg=$tmux_conf_theme_window_status_current_bg,bg=$tmux_conf_theme_status_bg,none]$tmux_conf_theme_left_separator_main"

              
                
                855
                +#   fi

              
                
                856
                +#

              
                
                857
                +#   tmux_conf_theme_window_status_format=$(echo "$tmux_conf_theme_window_status_format" | sed \

              
                
                858
                +#     -e 's%#{circled_window_index}%#(cut -c3- ~/.tmux.conf | sh -s _circled #I)%g' \

              
                
                859
                +#     -e 's%#{circled_session_name}%#(cut -c3- ~/.tmux.conf | sh -s _circled #S)%g' \

              
                
                860
                +#     -e 's%#{username}%#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_tty} false #D)%g' \

              
                
                861
                +#     -e 's%#{hostname}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_tty} false #D)%g' \

              
                
                862
                +#     -e 's%#{username_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_tty} true #D)%g' \

              
                
                863
                +#     -e 's%#{hostname_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_tty} true #D)%g')

              
                
                864
                +#   tmux_conf_theme_window_status_current_format=$(echo "$tmux_conf_theme_window_status_current_format" | sed \

              
                
                865
                +#     -e 's%#{circled_window_index}%#(cut -c3- ~/.tmux.conf | sh -s _circled #I)%g' \

              
                
                866
                +#     -e 's%#{circled_session_name}%#(cut -c3- ~/.tmux.conf | sh -s _circled #S)%g' \

              
                
                867
                +#     -e 's%#{username}%#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_tty} false #D)%g' \

              
                
                868
                +#     -e 's%#{hostname}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_tty} false #D)%g' \

              
                
                869
                +#     -e 's%#{username_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_tty} true #D)%g' \

              
                
                870
                +#     -e 's%#{hostname_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_tty} true #D)%g')

              
                
                871
                +#

              
                
                872
                +#   tmux  setw -g window-status-style "fg=$tmux_conf_theme_window_status_fg,bg=$tmux_conf_theme_window_status_bg,$tmux_conf_theme_window_status_attr" \;\

              
                
                873
                +#         setw -g window-status-format "$(_decode_unicode_escapes "$tmux_conf_theme_window_status_format")" \;\

              
                
                874
                +#         setw -g window-status-current-style "fg=$tmux_conf_theme_window_status_current_fg,bg=$tmux_conf_theme_window_status_current_bg,$tmux_conf_theme_window_status_current_attr" \;\

              
                
                875
                +#         setw -g window-status-current-format "$(_decode_unicode_escapes "$tmux_conf_theme_window_status_current_format")"

              
                
                876
                +#

              
                
                877
                +#   tmux_conf_theme_window_status_activity_fg=${tmux_conf_theme_window_status_activity_fg:-'default'}

              
                
                878
                +#   tmux_conf_theme_window_status_activity_bg=${tmux_conf_theme_window_status_activity_bg:-'default'}

              
                
                879
                +#   tmux_conf_theme_window_status_activity_attr=${tmux_conf_theme_window_status_activity_attr:-'underscore'}

              
                
                880
                +#   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"

              
                
                881
                +#

              
                
                882
                +#   tmux_conf_theme_window_status_bell_fg=${tmux_conf_theme_window_status_bell_fg:-'#ffff00'} # yellow

              
                
                883
                +#   tmux_conf_theme_window_status_bell_bg=${tmux_conf_theme_window_status_bell_bg:-'default'}

              
                
                884
                +#   tmux_conf_theme_window_status_bell_attr=${tmux_conf_theme_window_status_bell_attr:-'blink,bold'}

              
                
                885
                +#   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"

              
                
                886
                +#

              
                
                887
                +#   tmux_conf_theme_window_status_last_fg=${tmux_conf_theme_window_status_last_fg:-'#00afff'} # light blue

              
                
                888
                +#   tmux_conf_theme_window_status_last_bg=${tmux_conf_theme_window_status_last_bg:-'default'}

              
                
                889
                +#   tmux_conf_theme_window_status_last_attr=${tmux_conf_theme_window_status_last_attr:-'none'}

              
                
                890
                +#   tmux setw -g window-status-last-style "fg=$tmux_conf_theme_window_status_last_fg,bg=$tmux_conf_theme_window_status_last_bg,$tmux_conf_theme_window_status_last_attr"

              
                
                891
                +#

              
                
                892
                +#   # -- indicators

              
                
                893
                +#

              
                
                894
                +#   tmux_conf_theme_pairing=${tmux_conf_theme_pairing:-'👓'}            # U+1F453

              
                
                895
                +#   tmux_conf_theme_pairing_fg=${tmux_conf_theme_pairing_fg:-'#e4e4e4'} # white

              
                
                896
                +#   tmux_conf_theme_pairing_bg=${tmux_conf_theme_pairing_bg:-'none'}

              
                
                897
                +#   tmux_conf_theme_pairing_attr=${tmux_conf_theme_pairing_attr:-'none'}

              
                
                898
                +#

              
                
                899
                +#   tmux_conf_theme_prefix=${tmux_conf_theme_prefix:-'⌨'}             # U+2328

              
                
                900
                +#   tmux_conf_theme_prefix_fg=${tmux_conf_theme_prefix_fg:-'#e4e4e4'} # white

              
                
                901
                +#   tmux_conf_theme_prefix_bg=${tmux_conf_theme_prefix_bg:-'none'}

              
                
                902
                +#   tmux_conf_theme_prefix_attr=${tmux_conf_theme_prefix_attr:-'none'}

              
                
                903
                +#

              
                
                904
                +#   tmux_conf_theme_root=${tmux_conf_theme_root:-'!'}

              
                
                905
                +#   tmux_conf_theme_root_fg=${tmux_conf_theme_root_fg:-'none'}

              
                
                906
                +#   tmux_conf_theme_root_bg=${tmux_conf_theme_root_bg:-'none'}

              
                
                907
                +#   tmux_conf_theme_root_attr=${tmux_conf_theme_root_attr:-'bold,blink'}

              
                
                908
                +#

              
                
                909
                +#   tmux_conf_theme_synchronized=${tmux_conf_theme_synchronized:-'🔒'}  # U+1F512

              
                
                910
                +#   tmux_conf_theme_synchronized_fg=${tmux_conf_theme_synchronized_fg:-'none'}

              
                
                911
                +#   tmux_conf_theme_synchronized_bg=${tmux_conf_theme_synchronized_bg:-'none'}

              
                
                912
                +#   tmux_conf_theme_synchronized_attr=${tmux_conf_theme_synchronized_attr:-'none'}

              
                
                913
                +#

              
                
                914
                +#   # -- status left style

              
                
                915
                +#

              
                
                916
                +#   tmux_conf_theme_status_left=${tmux_conf_theme_status_left-' ❐ #S '}

              
                
                917
                +#   tmux_conf_theme_status_left_fg=${tmux_conf_theme_status_left_fg:-'#000000,#e4e4e4,#e4e4e4'}  # black, white , white

              
                
                918
                +#   tmux_conf_theme_status_left_bg=${tmux_conf_theme_status_left_bg:-'#ffff00,#ff00af,#00afff'}  # yellow, pink, white blue

              
                
                919
                +#   tmux_conf_theme_status_left_attr=${tmux_conf_theme_status_left_attr:-'bold,none,none'}

              
                
                920
                +#

              
                
                921
                +#   tmux_conf_theme_status_left=$(echo "$tmux_conf_theme_status_left" | sed \

              
                
                922
                +#     -e "s/#{pairing}/#[fg=$tmux_conf_theme_pairing_fg]#[bg=$tmux_conf_theme_pairing_bg]#[$tmux_conf_theme_pairing_attr]#{?session_many_attached,$tmux_conf_theme_pairing,}/g")

              
                
                923
                +#

              
                
                924
                +#   tmux_conf_theme_status_left=$(echo "$tmux_conf_theme_status_left" | sed \

              
                
                925
                +#     -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")

              
                
                926
                +#

              
                
                927
                +#   tmux_conf_theme_status_left=$(echo "$tmux_conf_theme_status_left" | sed \

              
                
                928
                +#     -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} #D)#[inherit]%g")

              
                
                929
                +#

              
                
                930
                +#   tmux_conf_theme_status_left=$(echo "$tmux_conf_theme_status_left" | sed \

              
                
                931
                +#     -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")

              
                
                932
                +#

              
                
                933
                +#   if [ -n "$tmux_conf_theme_status_left" ]; then

              
                
                934
                +#     status_left=$(awk \

              
                
                935
                +#                       -v fg_="$tmux_conf_theme_status_left_fg" \

              
                
                936
                +#                       -v bg_="$tmux_conf_theme_status_left_bg" \

              
                
                937
                +#                       -v attr_="$tmux_conf_theme_status_left_attr" \

              
                
                938
                +#                       -v mainsep="$tmux_conf_theme_left_separator_main" \

              
                
                939
                +#                       -v subsep="$tmux_conf_theme_left_separator_sub" '

              
                
                940
                +#       function subsplit(s,   l, i, a, r)

              
                
                941
                +#       {

              
                
                942
                +#         l = split(s, a, ",")

              
                
                943
                +#         for (i = 1; i <= l; ++i)

              
                
                944
                +#         {

              
                
                945
                +#           o = split(a[i], _, "(") - 1

              
                
                946
                +#           c = split(a[i], _, ")") - 1

              
                
                947
                +#           open += o - c

              
                
                948
                +#           o_ = split(a[i], _, "{") - 1

              
                
                949
                +#           c_ = split(a[i], _, "}") - 1

              
                
                950
                +#           open_ += o_ - c_

              
                
                951
                +#           o__ = split(a[i], _, "[") - 1

              
                
                952
                +#           c__ = split(a[i], _, "]") - 1

              
                
                953
                +#           open__ += o__ - c__

              
                
                954
                +#

              
                
                955
                +#           if (i == l)

              
                
                956
                +#             r = sprintf("%s%s", r, a[i])

              
                
                957
                +#           else if (open || open_ || open__)

              
                
                958
                +#             r = sprintf("%s%s,", r, a[i])

              
                
                959
                +#           else

              
                
                960
                +#             r = sprintf("%s%s#[fg=%s,bg=%s,%s]%s", r, a[i], fg[j], bg[j], attr[j], subsep)

              
                
                961
                +#         }

              
                
                962
                +#

              
                
                963
                +#         gsub(/#\[inherit\]/, sprintf("#[default]#[fg=%s,bg=%s,%s]", fg[j], bg[j], attr[j]), r)

              
                
                964
                +#         return r

              
                
                965
                +#       }

              
                
                966
                +#       BEGIN {

              
                
                967
                +#         FS = "|"

              
                
                968
                +#         l1 = split(fg_, fg, ",")

              
                
                969
                +#         l2 = split(bg_, bg, ",")

              
                
                970
                +#         l3 = split(attr_, attr, ",")

              
                
                971
                +#         l = l1 < l2 ? (l1 < l3 ? l1 : l3) : (l2 < l3 ? l2 : l3)

              
                
                972
                +#       }

              
                
                973
                +#       {

              
                
                974
                +#         for (i = j = 1; i <= NF; ++i)

              
                
                975
                +#         {

              
                
                976
                +#           if (open || open_ || open__)

              
                
                977
                +#             printf "|%s", subsplit($i)

              
                
                978
                +#           else

              
                
                979
                +#           {

              
                
                980
                +#             if (i > 1)

              
                
                981
                +#               printf "#[fg=%s,bg=%s,none]%s#[fg=%s,bg=%s,%s]%s", bg[j_], bg[j], mainsep, fg[j], bg[j], attr[j], subsplit($i)

              
                
                982
                +#             else

              
                
                983
                +#               printf "#[fg=%s,bg=%s,%s]%s", fg[j], bg[j], attr[j], subsplit($i)

              
                
                984
                +#           }

              
                
                985
                +#

              
                
                986
                +#           if (!open && !open_ && !open__)

              
                
                987
                +#           {

              
                
                988
                +#             j_ = j

              
                
                989
                +#             j = j % l + 1

              
                
                990
                +#           }

              
                
                991
                +#         }

              
                
                992
                +#         printf "#[fg=%s,bg=%s,none]%s", bg[j_], "default", mainsep

              
                
                993
                +#       }' << EOF

              
                
                994
                +# $tmux_conf_theme_status_left

              
                
                995
                +# EOF

              
                
                996
                +#     )

              
                
                997
                +#   fi

              
                
                998
                +#

              
                
                999
                +#   status_left="$status_left "

              
                
                1000
                +#

              
                
                1001
                +#   # -- status right style

              
                
                1002
                +#

              
                
                1003
                +#   tmux_conf_theme_status_right=${tmux_conf_theme_status_right-'#{pairing}#{prefix} #{battery_status} #{battery_bar} #{battery_percentage} , %R , %d %b | #{username} | #{hostname} '}

              
                
                1004
                +#   tmux_conf_theme_status_right_fg=${tmux_conf_theme_status_right_fg:-'#8a8a8a,#e4e4e4,#000000'} # light gray, white, black

              
                
                1005
                +#   tmux_conf_theme_status_right_bg=${tmux_conf_theme_status_right_bg:-'#080808,#d70000,#e4e4e4'} # dark gray, red, white

              
                
                1006
                +#   tmux_conf_theme_status_right_attr=${tmux_conf_theme_status_right_attr:-'none,none,bold'}

              
                
                1007
                +#

              
                
                1008
                +#   tmux_conf_theme_status_right=$(echo "$tmux_conf_theme_status_right" | sed \

              
                
                1009
                +#     -e "s/#{pairing}/#[fg=$tmux_conf_theme_pairing_fg]#[bg=$tmux_conf_theme_pairing_bg]#[$tmux_conf_theme_pairing_attr]#{?session_many_attached,$tmux_conf_theme_pairing,}/g")

              
                
                1010
                +#

              
                
                1011
                +#   tmux_conf_theme_status_right=$(echo "$tmux_conf_theme_status_right" | sed \

              
                
                1012
                +#     -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")

              
                
                1013
                +#

              
                
                1014
                +#   tmux_conf_theme_status_right=$(echo "$tmux_conf_theme_status_right" | sed \

              
                
                1015
                +#     -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} #D)#[inherit]%g")

              
                
                1016
                +#

              
                
                1017
                +#   tmux_conf_theme_status_right=$(echo "$tmux_conf_theme_status_right" | sed \

              
                
                1018
                +#     -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")

              
                
                1019
                +#

              
                
                1020
                +#   if [ -n "$tmux_conf_theme_status_right" ]; then

              
                
                1021
                +#     status_right=$(awk \

              
                
                1022
                +#                       -v fg_="$tmux_conf_theme_status_right_fg" \

              
                
                1023
                +#                       -v bg_="$tmux_conf_theme_status_right_bg" \

              
                
                1024
                +#                       -v attr_="$tmux_conf_theme_status_right_attr" \

              
                
                1025
                +#                       -v mainsep="$tmux_conf_theme_right_separator_main" \

              
                
                1026
                +#                       -v subsep="$tmux_conf_theme_right_separator_sub" '

              
                
                1027
                +#       function subsplit(s,   l, i, a, r)

              
                
                1028
                +#       {

              
                
                1029
                +#         l = split(s, a, ",")

              
                
                1030
                +#         for (i = 1; i <= l; ++i)

              
                
                1031
                +#         {

              
                
                1032
                +#           o = split(a[i], _, "(") - 1

              
                
                1033
                +#           c = split(a[i], _, ")") - 1

              
                
                1034
                +#           open += o - c

              
                
                1035
                +#           o_ = split(a[i], _, "{") - 1

              
                
                1036
                +#           c_ = split(a[i], _, "}") - 1

              
                
                1037
                +#           open_ += o_ - c_

              
                
                1038
                +#           o__ = split(a[i], _, "[") - 1

              
                
                1039
                +#           c__ = split(a[i], _, "]") - 1

              
                
                1040
                +#           open__ += o__ - c__

              
                
                1041
                +#

              
                
                1042
                +#           if (i == l)

              
                
                1043
                +#             r = sprintf("%s%s", r, a[i])

              
                
                1044
                +#           else if (open || open_ || open__)

              
                
                1045
                +#             r = sprintf("%s%s,", r, a[i])

              
                
                1046
                +#           else

              
                
                1047
                +#             r = sprintf("%s%s#[fg=%s,bg=%s,%s]%s", r, a[i], fg[j], bg[j], attr[j], subsep)

              
                
                1048
                +#         }

              
                
                1049
                +#

              
                
                1050
                +#         gsub(/#\[inherit\]/, sprintf("#[default]#[fg=%s,bg=%s,%s]", fg[j], bg[j], attr[j]), r)

              
                
                1051
                +#         return r

              
                
                1052
                +#       }

              
                
                1053
                +#       BEGIN {

              
                
                1054
                +#         FS = "|"

              
                
                1055
                +#         l1 = split(fg_, fg, ",")

              
                
                1056
                +#         l2 = split(bg_, bg, ",")

              
                
                1057
                +#         l3 = split(attr_, attr, ",")

              
                
                1058
                +#         l = l1 < l2 ? (l1 < l3 ? l1 : l3) : (l2 < l3 ? l2 : l3)

              
                
                1059
                +#       }

              
                
                1060
                +#       {

              
                
                1061
                +#         for (i = j = 1; i <= NF; ++i)

              
                
                1062
                +#         {

              
                
                1063
                +#           if (open_ || open || open__)

              
                
                1064
                +#             printf "|%s", subsplit($i)

              
                
                1065
                +#           else

              
                
                1066
                +#             printf "#[fg=%s,bg=%s,none]%s#[fg=%s,bg=%s,%s]%s", bg[j], (i == 1) ? "default" : bg[j_], mainsep, fg[j], bg[j], attr[j], subsplit($i)

              
                
                1067
                +#

              
                
                1068
                +#           if (!open && !open_ && !open__)

              
                
                1069
                +#           {

              
                
                1070
                +#             j_ = j

              
                
                1071
                +#             j = j % l + 1

              
                
                1072
                +#           }

              
                
                1073
                +#         }

              
                
                1074
                +#       }' << EOF

              
                
                1075
                +# $tmux_conf_theme_status_right

              
                
                1076
                +# EOF

              
                
                1077
                +#     )

              
                
                1078
                +#   fi

              
                
                1079
                +#

              
                
                1080
                +#   # -- variables

              
                
                1081
                +#

              
                
                1082
                +#   tmux set -g '@root' "$tmux_conf_theme_root"

              
                
                1083
                +#

              
                
                1084
                +#   tmux_conf_battery_bar_symbol_full=${tmux_conf_battery_bar_symbol_full:-'◼'}

              
                
                1085
                +#   tmux_conf_battery_bar_symbol_empty=${tmux_conf_battery_bar_symbol_empty:-'◻'}

              
                
                1086
                +#   tmux_conf_battery_bar_length=${tmux_conf_battery_bar_length:-'auto'}

              
                
                1087
                +#   tmux_conf_battery_bar_palette=${tmux_conf_battery_bar_palette:-'gradient'}

              
                
                1088
                +#   tmux_conf_battery_hbar_palette=${tmux_conf_battery_hbar_palette:-'gradient'} # red, orange, green

              
                
                1089
                +#   tmux_conf_battery_vbar_palette=${tmux_conf_battery_vbar_palette:-'gradient'} # red, orange, green

              
                
                1090
                +#   tmux_conf_battery_status_charging=${tmux_conf_battery_status_charging:-'↑'}       # U+2191

              
                
                1091
                +#   tmux_conf_battery_status_discharging=${tmux_conf_battery_status_discharging:-'↓'} # U+2193

              
                
                1092
                +#

              
                
                1093
                +#   case "$status_left $status_right" in

              
                
                1094
                +#     *'#{battery_status}'*|*'#{battery_bar}'*|*'#{battery_hbar}'*|*'#{battery_vbar}'*|*'#{battery_percentage}'*)

              
                
                1095
                +#       status_left=$(echo "$status_left" | sed -E \

              
                
                1096
                +#         -e 's/#\{(\?)?battery_bar/#\{\1@battery_bar/g' \

              
                
                1097
                +#         -e 's/#\{(\?)?battery_hbar/#\{\1@battery_hbar/g' \

              
                
                1098
                +#         -e 's/#\{(\?)?battery_vbar/#\{\1@battery_vbar/g' \

              
                
                1099
                +#         -e 's/#\{(\?)?battery_status/#\{\1@battery_status/g' \

              
                
                1100
                +#         -e 's/#\{(\?)?battery_percentage/#\{\1@battery_percentage/g')

              
                
                1101
                +#       status_right=$(echo "$status_right" | sed -E \

              
                
                1102
                +#         -e 's/#\{(\?)?battery_bar/#\{\1@battery_bar/g' \

              
                
                1103
                +#         -e 's/#\{(\?)?battery_hbar/#\{\1@battery_hbar/g' \

              
                
                1104
                +#         -e 's/#\{(\?)?battery_vbar/#\{\1@battery_vbar/g' \

              
                
                1105
                +#         -e 's/#\{(\?)?battery_status/#\{\1@battery_status/g' \

              
                
                1106
                +#         -e 's/#\{(\?)?battery_percentage/#\{\1@battery_percentage/g')

              
                
                1107
                +#

              
                
                1108
                +#       tmux  set -g '@battery_bar_symbol_full' "$(_decode_unicode_escapes "$tmux_conf_battery_bar_symbol_full")" \;\

              
                
                1109
                +#             set -g '@battery_bar_symbol_empty' "$(_decode_unicode_escapes "$tmux_conf_battery_bar_symbol_empty")" \;\

              
                
                1110
                +#             set -g '@battery_bar_length' "$tmux_conf_battery_bar_length" \;\

              
                
                1111
                +#             set -g '@battery_bar_palette' "$tmux_conf_battery_bar_palette" \;\

              
                
                1112
                +#             set -g '@battery_hbar_palette' "$tmux_conf_battery_hbar_palette" \;\

              
                
                1113
                +#             set -g '@battery_vbar_palette' "$tmux_conf_battery_vbar_palette" \;\

              
                
                1114
                +#             set -g '@battery_status_charging' "$(_decode_unicode_escapes "$tmux_conf_battery_status_charging")" \;\

              
                
                1115
                +#             set -g '@battery_status_discharging' "$(_decode_unicode_escapes "$tmux_conf_battery_status_discharging")"

              
                
                1116
                +#       status_right="#(cut -c3- ~/.tmux.conf | sh -s _battery)$status_right"

              
                
                1117
                +#       ;;

              
                
                1118
                +#   esac

              
                
                1119
                +#

              
                
                1120
                +#   case "$status_left $status_right" in

              
                
                1121
                +#     *'#{username}'*|*'#{hostname}'*|*'#{username_ssh}'*|*'#{hostname_ssh}'*)

              
                
                1122
                +#       status_left=$(echo "$status_left" | sed \

              
                
                1123
                +#         -e 's%#{username}%#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_tty} false #D)%g' \

              
                
                1124
                +#         -e 's%#{hostname}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_tty} false #D)%g' \

              
                
                1125
                +#         -e 's%#{username_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_tty} true #D)%g' \

              
                
                1126
                +#         -e 's%#{hostname_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_tty} true #D)%g')

              
                
                1127
                +#       status_right=$(echo "$status_right" | sed \

              
                
                1128
                +#         -e 's%#{username}%#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_tty} false #D)%g' \

              
                
                1129
                +#         -e 's%#{hostname}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_tty} false #D)%g' \

              
                
                1130
                +#         -e 's%#{username_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_tty} true #D)%g' \

              
                
                1131
                +#         -e 's%#{hostname_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_tty} true #D)%g')

              
                
                1132
                +#       ;;

              
                
                1133
                +#   esac

              
                
                1134
                +#

              
                
                1135
                +#   case "$status_left $status_right" in

              
                
                1136
                +#     *'#{uptime_d}'*|*'#{uptime_h}'*|*'#{uptime_m}'*|*'#{uptime_s}'*)

              
                
                1137
                +#       status_left=$(echo "$status_left" | sed -E \

              
                
                1138
                +#         -e 's/#\{(\?)?uptime_y/#\{\1@uptime_y/g' \

              
                
                1139
                +#         -e 's/#\{(\?)?uptime_d/#\{\1@uptime_d/g' \

              
                
                1140
                +#         -e '/@uptime_y/ s/@uptime_d/@uptime_dy/g' \

              
                
                1141
                +#         -e 's/#\{(\?)?uptime_h/#\{\1@uptime_h/g' \

              
                
                1142
                +#         -e 's/#\{(\?)?uptime_m/#\{\1@uptime_m/g' \

              
                
                1143
                +#         -e 's/#\{(\?)?uptime_s/#\{\1@uptime_s/g')

              
                
                1144
                +#       status_right=$(echo "$status_right" | sed -E \

              
                
                1145
                +#         -e 's/#\{(\?)?uptime_y/#\{\1@uptime_y/g' \

              
                
                1146
                +#         -e 's/#\{(\?)?uptime_d/#\{\1@uptime_d/g' \

              
                
                1147
                +#         -e '/@uptime_y/ s/@uptime_d/@uptime_dy/g' \

              
                
                1148
                +#         -e 's/#\{(\?)?uptime_h/#\{\1@uptime_h/g' \

              
                
                1149
                +#         -e 's/#\{(\?)?uptime_m/#\{\1@uptime_m/g' \

              
                
                1150
                +#         -e 's/#\{(\?)?uptime_s/#\{\1@uptime_s/g')

              
                
                1151
                +#       status_right="#(cut -c3- ~/.tmux.conf | sh -s _uptime)$status_right"

              
                
                1152
                +#       ;;

              
                
                1153
                +#   esac

              
                
                1154
                +#

              
                
                1155
                +#   case "$status_left $status_right" in

              
                
                1156
                +#     *'#{loadavg}'*)

              
                
                1157
                +#       status_left=$(echo "$status_left" | sed -E \

              
                
                1158
                +#         -e 's/#\{(\?)?loadavg/#\{\1@loadavg/g')

              
                
                1159
                +#       status_right=$(echo "$status_right" | sed -E \

              
                
                1160
                +#         -e 's/#\{(\?)?loadavg/#\{\1@loadavg/g')

              
                
                1161
                +#       status_right="#(cut -c3- ~/.tmux.conf | sh -s _loadavg)$status_right"

              
                
                1162
                +#       ;;

              
                
                1163
                +#   esac

              
                
                1164
                +#

              
                
                1165
                +#   status_left=$(echo "$status_left" | sed 's%#{circled_session_name}%#(cut -c3- ~/.tmux.conf | sh -s _circled #S)%g')

              
                
                1166
                +#   status_right=$(echo "$status_right" | sed 's%#{circled_session_name}%#(cut -c3- ~/.tmux.conf | sh -s _circled #S)%g')

              
                
                1167
                +#

              
                
                1168
                +#   tmux  set -g status-left-length 1000 \; set -g status-left "$(_decode_unicode_escapes "$status_left")" \;\

              
                
                1169
                +#         set -g status-right-length 1000 \; set -g status-right "$(_decode_unicode_escapes "$status_right")"

              
                
                1170
                +#

              
                
                1171
                +#   # -- clock -------------------------------------------------------------

              
                
                1172
                +#

              
                
                1173
                +#   tmux_conf_theme_clock_colour=${tmux_conf_theme_clock_colour:-'#00afff'} # light blue

              
                
                1174
                +#   tmux_conf_theme_clock_style=${tmux_conf_theme_clock_style:-'24'}

              
                
                1175
                +#   tmux  setw -g clock-mode-colour "$tmux_conf_theme_clock_colour" \;\

              
                
                1176
                +#         setw -g clock-mode-style "$tmux_conf_theme_clock_style"

              
                
                1177
                +# }

              
                
                1178
                +#

              
                
                1179
                +# _apply_configuration() {

              
                
                1180
                +#

              
                
                1181
                +#   if ! command -v perl > /dev/null 2>&1; then

              
                
                1182
                +#     tmux run -b 'tmux set display-time 3000 \; display "This configuration requires perl" \; set -u display-time'

              
                
                1183
                +#     return

              
                
                1184
                +#   fi

              
                
                1185
                +#   if ! command -v sed > /dev/null 2>&1; then

              
                
                1186
                +#     tmux run -b 'tmux set display-time 3000 \; display "This configuration requires sed" \; set -u display-time'

              
                
                1187
                +#     return

              
                
                1188
                +#   fi

              
                
                1189
                +#   if ! command -v awk > /dev/null 2>&1; then

              
                
                1190
                +#     tmux run -b 'tmux set display-time 3000 \; display "This configuration requires awk" \; set -u display-time'

              
                
                1191
                +#     return

              
                
                1192
                +#   fi

              
                
                1193
                +#

              
                
                1194
                +#   # see https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard

              
                
                1195
                +#   if command -v reattach-to-user-namespace > /dev/null 2>&1; then

              
                
                1196
                +#     default_shell="$(tmux show -gv default-shell)"

              
                
                1197
                +#     case "$default_shell" in

              
                
                1198
                +#       *fish)

              
                
                1199
                +#         tmux set -g default-command "reattach-to-user-namespace -l $default_shell"

              
                
                1200
                +#         ;;

              
                
                1201
                +#       *sh)

              
                
                1202
                +#         tmux set -g default-command "exec $default_shell... 2> /dev/null & reattach-to-user-namespace -l $default_shell"

              
                
                1203
                +#         ;;

              
                
                1204
                +#     esac

              
                
                1205
                +#   fi

              
                
                1206
                +#

              
                
                1207
                +#   _apply_overrides

              
                
                1208
                +#   _apply_bindings

              
                
                1209
                +#   _apply_theme

              
                
                1210
                +#   for name in $(printenv | grep -E -o '^tmux_conf_[^=]+'); do tmux setenv -gu "$name"; done;

              
                
                1211
                +# }

              
                
                1212
                +#

              
                
                1213
                +# _urlview() {

              
                
                1214
                +#   tmux capture-pane -J -S - -E - -b "urlview-$1" -t "$1"

              
                
                1215
                +#   tmux split-window "tmux show-buffer -b urlview-$1 | urlview || true; tmux delete-buffer -b urlview-$1"

              
                
                1216
                +# }

              
                
                1217
                +#

              
                
                1218
                +# _fpp() {

              
                
                1219
                +#   tmux capture-pane -J -S - -E - -b "fpp-$1" -t "$1"

              
                
                1220
                +#   tmux split-window "tmux show-buffer -b fpp-$1 | fpp || true; tmux delete-buffer -b fpp-$1"

              
                
                1221
                +# }

              
                
                1222
                +#

              
                
                1223
                +# "$@"

              
A tmux.conf.local
···
                
                1
                +# -- windows & pane creation ---------------------------------------------------

              
                
                2
                +

              
                
                3
                +# new window retains current path, possible values are:

              
                
                4
                +tmux_conf_new_window_retain_current_path=false

              
                
                5
                +

              
                
                6
                +# new pane retains current path, possible values are:

              
                
                7
                +tmux_conf_new_pane_retain_current_path=true

              
                
                8
                +

              
                
                9
                +# new pane tries to reconnect ssh sessions (experimental), possible values are:

              
                
                10
                +tmux_conf_new_pane_reconnect_ssh=false

              
                
                11
                +

              
                
                12
                +# prompt for session name when creating a new session, possible values are:

              
                
                13
                +tmux_conf_new_session_prompt=false

              
                
                14
                +

              
                
                15
                +

              
                
                16
                +# -- display -------------------------------------------------------------------

              
                
                17
                +

              
                
                18
                +# RGB 24-bit colour support (tmux >= 2.2), possible values are:

              
                
                19
                +tmux_conf_theme_24b_colour=false

              
                
                20
                +

              
                
                21
                +# window style

              
                
                22
                +tmux_conf_theme_window_fg='default'

              
                
                23
                +tmux_conf_theme_window_bg='default'

              
                
                24
                +

              
                
                25
                +# highlight focused pane (tmux >= 2.1), possible values are:

              
                
                26
                +tmux_conf_theme_highlight_focused_pane=false

              
                
                27
                +

              
                
                28
                +# focused pane colours:

              
                
                29
                +tmux_conf_theme_focused_pane_fg='default'

              
                
                30
                +tmux_conf_theme_focused_pane_bg='#0087d7'               # light blue

              
                
                31
                +

              
                
                32
                +# pane border style, possible values are:

              
                
                33
                +tmux_conf_theme_pane_border_style=thin

              
                
                34
                +

              
                
                35
                +# pane borders colours:

              
                
                36
                +tmux_conf_theme_pane_border='#444444'                   # gray

              
                
                37
                +tmux_conf_theme_pane_active_border='#00afff'            # light blue

              
                
                38
                +

              
                
                39
                +# pane indicator colours

              
                
                40
                +tmux_conf_theme_pane_indicator='#00afff'                # light blue

              
                
                41
                +tmux_conf_theme_pane_active_indicator='#00afff'         # light blue

              
                
                42
                +

              
                
                43
                +# status line style

              
                
                44
                +tmux_conf_theme_message_fg='#000000'                    # black

              
                
                45
                +tmux_conf_theme_message_bg='#ffff00'                    # yellow

              
                
                46
                +tmux_conf_theme_message_attr='bold'

              
                
                47
                +

              
                
                48
                +# status line command style (<prefix> : Escape)

              
                
                49
                +tmux_conf_theme_message_command_fg='#ffff00'            # yellow

              
                
                50
                +tmux_conf_theme_message_command_bg='#000000'            # black

              
                
                51
                +tmux_conf_theme_message_command_attr='bold'

              
                
                52
                +

              
                
                53
                +# window modes style

              
                
                54
                +tmux_conf_theme_mode_fg='#000000'                       # black

              
                
                55
                +tmux_conf_theme_mode_bg='#ffff00'                       # yellow

              
                
                56
                +tmux_conf_theme_mode_attr='bold'

              
                
                57
                +

              
                
                58
                +# status line style

              
                
                59
                +tmux_conf_theme_status_fg='#8a8a8a'                     # light gray

              
                
                60
                +tmux_conf_theme_status_bg='#080808'                     # dark gray

              
                
                61
                +tmux_conf_theme_status_attr='none'

              
                
                62
                +

              
                
                63
                +# terminal title

              
                
                64
                +#   - built-in variables are:

              
                
                65
                +#     - #{circled_window_index}

              
                
                66
                +#     - #{circled_session_name}

              
                
                67
                +#     - #{hostname}

              
                
                68
                +#     - #{hostname_ssh}

              
                
                69
                +#     - #{username}

              
                
                70
                +#     - #{username_ssh}

              
                
                71
                +tmux_conf_theme_terminal_title='#h ❐ #S ● #I #W'

              
                
                72
                +

              
                
                73
                +# window status style

              
                
                74
                +#   - built-in variables are:

              
                
                75
                +#     - #{circled_window_index}

              
                
                76
                +#     - #{circled_session_name}

              
                
                77
                +#     - #{hostname}

              
                
                78
                +#     - #{hostname_ssh}

              
                
                79
                +#     - #{username}

              
                
                80
                +#     - #{username_ssh}

              
                
                81
                +tmux_conf_theme_window_status_fg='#8a8a8a'              # light gray

              
                
                82
                +tmux_conf_theme_window_status_bg='#080808'              # dark gray

              
                
                83
                +tmux_conf_theme_window_status_attr='none'

              
                
                84
                +tmux_conf_theme_window_status_format='#I #W'

              
                
                85
                +#tmux_conf_theme_window_status_format='#{circled_window_index} #W'

              
                
                86
                +#tmux_conf_theme_window_status_format='#I #W#{?window_bell_flag,🔔,}#{?window_zoomed_flag,🔍,}'

              
                
                87
                +

              
                
                88
                +# window current status style

              
                
                89
                +#   - built-in variables are:

              
                
                90
                +#     - #{circled_window_index}

              
                
                91
                +#     - #{circled_session_name}

              
                
                92
                +#     - #{hostname}

              
                
                93
                +#     - #{hostname_ssh}

              
                
                94
                +#     - #{username}

              
                
                95
                +#     - #{username_ssh}

              
                
                96
                +tmux_conf_theme_window_status_current_fg='#000000'      # black

              
                
                97
                +tmux_conf_theme_window_status_current_bg='#00afff'      # light blue

              
                
                98
                +tmux_conf_theme_window_status_current_attr='bold'

              
                
                99
                +tmux_conf_theme_window_status_current_format='#I #W'

              
                
                100
                +#tmux_conf_theme_window_status_current_format='#{circled_window_index} #W'

              
                
                101
                +#tmux_conf_theme_window_status_current_format='#I #W#{?window_zoomed_flag,🔍,}'

              
                
                102
                +

              
                
                103
                +# window activity status style

              
                
                104
                +tmux_conf_theme_window_status_activity_fg='default'

              
                
                105
                +tmux_conf_theme_window_status_activity_bg='default'

              
                
                106
                +tmux_conf_theme_window_status_activity_attr='underscore'

              
                
                107
                +

              
                
                108
                +# window bell status style

              
                
                109
                +tmux_conf_theme_window_status_bell_fg='#ffff00'         # yellow

              
                
                110
                +tmux_conf_theme_window_status_bell_bg='default'

              
                
                111
                +tmux_conf_theme_window_status_bell_attr='blink,bold'

              
                
                112
                +

              
                
                113
                +# window last status style

              
                
                114
                +tmux_conf_theme_window_status_last_fg='#00afff'         # light blue

              
                
                115
                +tmux_conf_theme_window_status_last_bg='default'

              
                
                116
                +tmux_conf_theme_window_status_last_attr='none'

              
                
                117
                +

              
                
                118
                +# status left/right sections separators

              
                
                119
                +tmux_conf_theme_left_separator_main=''

              
                
                120
                +tmux_conf_theme_left_separator_sub='|'

              
                
                121
                +tmux_conf_theme_right_separator_main=''

              
                
                122
                +tmux_conf_theme_right_separator_sub='|'

              
                
                123
                +#tmux_conf_theme_left_separator_main='\uE0B0'  # /!\ you don't need to install Powerline

              
                
                124
                +#tmux_conf_theme_left_separator_sub='\uE0B1'   #   you only need fonts patched with

              
                
                125
                +#tmux_conf_theme_right_separator_main='\uE0B2' #   Powerline symbols or the standalone

              
                
                126
                +#tmux_conf_theme_right_separator_sub='\uE0B3'  #   PowerlineSymbols.otf font, see README.md

              
                
                127
                +

              
                
                128
                +# status left/right content:

              
                
                129
                +#   - separate main sections with '|'

              
                
                130
                +#   - separate subsections with ','

              
                
                131
                +#   - built-in variables are:

              
                
                132
                +#     - #{battery_bar}

              
                
                133
                +#     - #{battery_hbar}

              
                
                134
                +#     - #{battery_percentage}

              
                
                135
                +#     - #{battery_status}

              
                
                136
                +#     - #{battery_vbar}

              
                
                137
                +#     - #{circled_session_name}

              
                
                138
                +#     - #{hostname_ssh}

              
                
                139
                +#     - #{hostname}

              
                
                140
                +#     - #{loadavg}

              
                
                141
                +#     - #{pairing}

              
                
                142
                +#     - #{prefix}

              
                
                143
                +#     - #{root}

              
                
                144
                +#     - #{synchronized}

              
                
                145
                +#     - #{uptime_y}

              
                
                146
                +#     - #{uptime_d} (modulo 365 when #{uptime_y} is used)

              
                
                147
                +#     - #{uptime_h}

              
                
                148
                +#     - #{uptime_m}

              
                
                149
                +#     - #{uptime_s}

              
                
                150
                +#     - #{username}

              
                
                151
                +#     - #{username_ssh}

              
                
                152
                +tmux_conf_theme_status_left=' ❐ #S |'

              
                
                153
                +tmux_conf_theme_status_right='#{prefix}#{pairing}#{synchronized} , %R , %d %b | #{username}#{root} '

              
                
                154
                +

              
                
                155
                +# status left style

              
                
                156
                +tmux_conf_theme_status_left_fg='#000000,#e4e4e4,#e4e4e4'  # black, white , white

              
                
                157
                +tmux_conf_theme_status_left_bg='#ffff00,#ff00af,#00afff'  # yellow, pink, white blue

              
                
                158
                +tmux_conf_theme_status_left_attr='bold,none,none'

              
                
                159
                +

              
                
                160
                +# status right style

              
                
                161
                +tmux_conf_theme_status_right_fg='#8a8a8a,#e4e4e4,#000000' # light gray, white, black

              
                
                162
                +tmux_conf_theme_status_right_bg='#080808,#d70000,#e4e4e4' # dark gray, red, white

              
                
                163
                +tmux_conf_theme_status_right_attr='none,none,bold'

              
                
                164
                +

              
                
                165
                +# pairing indicator

              
                
                166
                +tmux_conf_theme_pairing='👓 '          # U+1F453

              
                
                167
                +tmux_conf_theme_pairing_fg='none'

              
                
                168
                +tmux_conf_theme_pairing_bg='none'

              
                
                169
                +tmux_conf_theme_pairing_attr='none'

              
                
                170
                +

              
                
                171
                +# prefix indicator

              
                
                172
                +tmux_conf_theme_prefix='⌨ '            # U+2328

              
                
                173
                +tmux_conf_theme_prefix_fg='none'

              
                
                174
                +tmux_conf_theme_prefix_bg='none'

              
                
                175
                +tmux_conf_theme_prefix_attr='none'

              
                
                176
                +

              
                
                177
                +# root indicator

              
                
                178
                +tmux_conf_theme_root='!'

              
                
                179
                +tmux_conf_theme_root_fg='none'

              
                
                180
                +tmux_conf_theme_root_bg='none'

              
                
                181
                +tmux_conf_theme_root_attr='bold,blink'

              
                
                182
                +

              
                
                183
                +# synchronized indicator

              
                
                184
                +tmux_conf_theme_synchronized='🔒'     # U+1F512

              
                
                185
                +tmux_conf_theme_synchronized_fg='none'

              
                
                186
                +tmux_conf_theme_synchronized_bg='none'

              
                
                187
                +tmux_conf_theme_synchronized_attr='none'

              
                
                188
                +

              
                
                189
                +# battery bar symbols

              
                
                190
                +tmux_conf_battery_bar_symbol_full='◼'

              
                
                191
                +tmux_conf_battery_bar_symbol_empty='◻'

              
                
                192
                +#tmux_conf_battery_bar_symbol_full='♥'

              
                
                193
                +#tmux_conf_battery_bar_symbol_empty='·'

              
                
                194
                +

              
                
                195
                +# battery bar length (in number of symbols), possible values are:

              
                
                196
                +#   - auto

              
                
                197
                +#   - a number, e.g. 5

              
                
                198
                +tmux_conf_battery_bar_length='auto'

              
                
                199
                +

              
                
                200
                +# battery bar palette, possible values are:

              
                
                201
                +#   - gradient (default)

              
                
                202
                +#   - heat

              
                
                203
                +#   - 'colour_full_fg,colour_empty_fg,colour_bg'

              
                
                204
                +tmux_conf_battery_bar_palette='gradient'

              
                
                205
                +#tmux_conf_battery_bar_palette='#d70000,#e4e4e4,#000000'   # red, white, black

              
                
                206
                +

              
                
                207
                +# battery hbar palette, possible values are:

              
                
                208
                +#   - gradient (default)

              
                
                209
                +#   - heat

              
                
                210
                +#   - 'colour_low,colour_half,colour_full'

              
                
                211
                +tmux_conf_battery_hbar_palette='gradient'

              
                
                212
                +#tmux_conf_battery_hbar_palette='#d70000,#ff5f00,#5fff00'  # red, orange, green

              
                
                213
                +

              
                
                214
                +# battery vbar palette, possible values are:

              
                
                215
                +#   - gradient (default)

              
                
                216
                +#   - heat

              
                
                217
                +#   - 'colour_low,colour_half,colour_full'

              
                
                218
                +tmux_conf_battery_vbar_palette='gradient'

              
                
                219
                +#tmux_conf_battery_vbar_palette='#d70000,#ff5f00,#5fff00'  # red, orange, green

              
                
                220
                +

              
                
                221
                +# symbols used to indicate whether battery is charging or discharging

              
                
                222
                +tmux_conf_battery_status_charging='↑'       # U+2191

              
                
                223
                +tmux_conf_battery_status_discharging='↓'    # U+2193

              
                
                224
                +#tmux_conf_battery_status_charging='⚡ '    # U+26A1

              
                
                225
                +#tmux_conf_battery_status_charging='🔌 '    # U+1F50C

              
                
                226
                +#tmux_conf_battery_status_discharging='🔋 ' # U+1F50B

              
                
                227
                +

              
                
                228
                +# clock style (when you hit <prefix> + t)

              
                
                229
                +# you may want to use %I:%M %p in place of %R in tmux_conf_theme_status_right

              
                
                230
                +tmux_conf_theme_clock_colour='#00afff'  # light blue

              
                
                231
                +tmux_conf_theme_clock_style='24'

              
                
                232
                +

              
                
                233
                +

              
                
                234
                +# -- clipboard -----------------------------------------------------------------

              
                
                235
                +

              
                
                236
                +# in copy mode, copying selection also copies to the OS clipboard

              
                
                237
                +#   - true

              
                
                238
                +#   - false (default)

              
                
                239
                +# on macOS, this requires installing reattach-to-user-namespace, see README.md

              
                
                240
                +# on Linux, this requires xsel or xclip

              
                
                241
                +tmux_conf_copy_to_os_clipboard=false

              
                
                242
                +

              
                
                243
                +

              
                
                244
                +# -- user customizations -------------------------------------------------------

              
                
                245
                +# this is the place to override or undo settings

              
                
                246
                +

              
                
                247
                +# increase history size

              
                
                248
                +#set -g history-limit 10000

              
                
                249
                +

              
                
                250
                +# start with mouse mode enabled

              
                
                251
                +#set -g mouse on

              
                
                252
                +

              
                
                253
                +# force Vi mode

              
                
                254
                +#   really you should export VISUAL or EDITOR environment variable, see manual

              
                
                255
                +#set -g status-keys vi

              
                
                256
                +#set -g mode-keys vi

              
                
                257
                +

              
                
                258
                +# replace C-b by C-a instead of using both prefixes

              
                
                259
                +# set -gu prefix2

              
                
                260
                +# unbind C-a

              
                
                261
                +# unbind C-b

              
                
                262
                +# set -g prefix C-a

              
                
                263
                +# bind C-a send-prefix

              
                
                264
                +

              
                
                265
                +# move status line to top

              
                
                266
                +#set -g status-position top
              
A zshrc
···
                
                1
                +export ZSH="/home/sasha/.oh-my-zsh"

              
                
                2
                +#export ZSH="/root/.oh-my-zsh"

              
                
                3
                +

              
                
                4
                +ZSH_THEME="simple" 

              
                
                5
                +#ZSH_THEME="bureau"

              
                
                6
                +

              
                
                7
                +# Uncomment the following line to use case-sensitive completion.

              
                
                8
                +#CASE_SENSITIVE="true"

              
                
                9
                +

              
                
                10
                +# Case-sensitive completion must be off. _ and - will be interchangeable.

              
                
                11
                +#HYPHEN_INSENSITIVE="true"

              
                
                12
                +

              
                
                13
                +# Uncomment the following line to disable bi-weekly auto-update checks.

              
                
                14
                +#DISABLE_AUTO_UPDATE="true"

              
                
                15
                +

              
                
                16
                +# Uncomment the following line to automatically update without prompting.

              
                
                17
                +#DISABLE_UPDATE_PROMPT="true"

              
                
                18
                +

              
                
                19
                +# Uncomment the following line to change how often to auto-update (in days).

              
                
                20
                +export UPDATE_ZSH_DAYS=24

              
                
                21
                +

              
                
                22
                +# Uncomment the following line if pasting URLs and other text is messed up.

              
                
                23
                +#DISABLE_MAGIC_FUNCTIONS=true

              
                
                24
                +

              
                
                25
                +# Uncomment the following line to disable colors in ls.

              
                
                26
                +#DISABLE_LS_COLORS="true"

              
                
                27
                +

              
                
                28
                +# Uncomment the following line to disable auto-setting terminal title.

              
                
                29
                +#DISABLE_AUTO_TITLE="true"

              
                
                30
                +

              
                
                31
                +# Uncomment the following line to enable command auto-correction.

              
                
                32
                +#ENABLE_CORRECTION="true"

              
                
                33
                +

              
                
                34
                +# Uncomment the following line to display red dots whilst waiting for completion.

              
                
                35
                +#COMPLETION_WAITING_DOTS="true"

              
                
                36
                +

              
                
                37
                +plugins=( autopep8 django pip node npm docker git tmux )

              
                
                38
                +source $ZSH/oh-my-zsh.sh

              
                
                39
                +

              
                
                40
                +# User configuration

              
                
                41
                +

              
                
                42
                +# You may need to manually set your language environment

              
                
                43
                +#export LANG=en_US.UTF-8

              
                
                44
                +

              
                
                45
                +alias cls='clear'

              
                
                46
                +alias sl='ls'

              
                
                47
                +alias cd..='cd ..'

              
                
                48
                +alias ipy='ipython3'

              
                
                49
                +alias ipy3='ipython3'

              
                
                50
                +alias py='python3'

              
                
                51
                +alias py3='python3'