Updated tmux theme to be consistant with nvim.
This commit is contained in:
parent
78f7914f9e
commit
807cced418
632
020_tmux.sh
632
020_tmux.sh
|
|
@ -12,7 +12,7 @@ set -x
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install -y tmux
|
sudo apt install -y tmux
|
||||||
sudo apt install -y tmux-plugin-manager
|
sudo apt install -y tmux-plugin-manager
|
||||||
sudo apt install -y tmuxp # uses python rather than ruby used by tmuxinator.
|
sudo apt install -y python3-tmuxp # uses python rather than ruby used by tmuxinator.
|
||||||
|
|
||||||
DEST=${1:-/etc/skel}
|
DEST=${1:-/etc/skel}
|
||||||
# http://github.com/Netherdrake/Dotfiles/tree/master/config/tmux
|
# http://github.com/Netherdrake/Dotfiles/tree/master/config/tmux
|
||||||
|
|
@ -48,92 +48,98 @@ cat <<-EOF | sudo tee -a "${DEST}"/.profile
|
||||||
fi
|
fi
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
cat <<-EOF | tee "${TMUX_CONF_DIR}"/default.sh
|
conf_print_tmux_default() {
|
||||||
# Default Theme
|
cat <<-'EOF' | tee "${TMUX_CONF_DIR}"/default.sh
|
||||||
TMUX_POWERLINE_SEPARATOR_LEFT_BOLD=""
|
# Default Theme
|
||||||
TMUX_POWERLINE_SEPARATOR_LEFT_THIN=""
|
TMUX_POWERLINE_SEPARATOR_LEFT_BOLD=""
|
||||||
TMUX_POWERLINE_SEPARATOR_RIGHT_BOLD=""
|
TMUX_POWERLINE_SEPARATOR_LEFT_THIN=""
|
||||||
TMUX_POWERLINE_SEPARATOR_RIGHT_THIN=""
|
TMUX_POWERLINE_SEPARATOR_RIGHT_BOLD=""
|
||||||
|
TMUX_POWERLINE_SEPARATOR_RIGHT_THIN=""
|
||||||
|
|
||||||
TMUX_POWERLINE_DEFAULT_BACKGROUND_COLOR=${TMUX_POWERLINE_DEFAULT_BACKGROUND_COLOR:-'235'}
|
TMUX_POWERLINE_DEFAULT_BACKGROUND_COLOR=${TMUX_POWERLINE_DEFAULT_BACKGROUND_COLOR:-'235'}
|
||||||
TMUX_POWERLINE_DEFAULT_FOREGROUND_COLOR=${TMUX_POWERLINE_DEFAULT_FOREGROUND_COLOR:-'255'}
|
TMUX_POWERLINE_DEFAULT_FOREGROUND_COLOR=${TMUX_POWERLINE_DEFAULT_FOREGROUND_COLOR:-'255'}
|
||||||
|
|
||||||
TMUX_POWERLINE_DEFAULT_LEFTSIDE_SEPARATOR=${TMUX_POWERLINE_DEFAULT_LEFTSIDE_SEPARATOR:-$TMUX_POWERLINE_SEPARATOR_RIGHT_BOLD}
|
TMUX_POWERLINE_DEFAULT_LEFTSIDE_SEPARATOR=${TMUX_POWERLINE_DEFAULT_LEFTSIDE_SEPARATOR:-$TMUX_POWERLINE_SEPARATOR_RIGHT_BOLD}
|
||||||
TMUX_POWERLINE_DEFAULT_RIGHTSIDE_SEPARATOR=${TMUX_POWERLINE_DEFAULT_RIGHTSIDE_SEPARATOR:-$TMUX_POWERLINE_SEPARATOR_LEFT_BOLD}
|
TMUX_POWERLINE_DEFAULT_RIGHTSIDE_SEPARATOR=${TMUX_POWERLINE_DEFAULT_RIGHTSIDE_SEPARATOR:-$TMUX_POWERLINE_SEPARATOR_LEFT_BOLD}
|
||||||
|
|
||||||
|
|
||||||
# Format: segment_name background_color foreground_color [non_default_separator]
|
# Format: segment_name background_color foreground_color [non_default_separator]
|
||||||
|
|
||||||
# if [ -z $TMUX_POWERLINE_LEFT_STATUS_SEGMENTS ]; then
|
# if [ -z $TMUX_POWERLINE_LEFT_STATUS_SEGMENTS ]; then
|
||||||
# TMUX_POWERLINE_LEFT_STATUS_SEGMENTS=(
|
# TMUX_POWERLINE_LEFT_STATUS_SEGMENTS=(
|
||||||
# "tmux_session_info 24 255" \
|
# "tmux_session_info 24 255" \
|
||||||
# # "hostname 33 0" \
|
# # "hostname 33 0" \
|
||||||
# # "ifstat_sys 30 255" \
|
# # "ifstat_sys 30 255" \
|
||||||
# "wan_ip 93 255" \
|
# "wan_ip 93 255" \
|
||||||
# "ifstat_sys 64 255" \
|
# "ifstat_sys 64 255" \
|
||||||
# "vcs_branch 29 88" \
|
# "vcs_branch 29 88" \
|
||||||
# )
|
# )
|
||||||
# fi
|
# fi
|
||||||
# if [ -z $TMUX_POWERLINE_RIGHT_STATUS_SEGMENTS ]; then
|
# if [ -z $TMUX_POWERLINE_RIGHT_STATUS_SEGMENTS ]; then
|
||||||
# TMUX_POWERLINE_RIGHT_STATUS_SEGMENTS=(
|
# TMUX_POWERLINE_RIGHT_STATUS_SEGMENTS=(
|
||||||
# # "pwd 89 211" \
|
# # "pwd 89 211" \
|
||||||
# # "now_playing 234 37" \
|
# # "now_playing 234 37" \
|
||||||
# #"cpu 240 136" \
|
# #"cpu 240 136" \
|
||||||
# "battery 64 255" \
|
# "battery 64 255" \
|
||||||
# "load 93 255" \
|
# "load 93 255" \
|
||||||
# #"rainbarf 0 0" \
|
# #"rainbarf 0 0" \
|
||||||
# #"xkb_layout 125 117" \
|
# #"xkb_layout 125 117" \
|
||||||
# "date_day 24 255" \
|
# "date_day 24 255" \
|
||||||
# "date 24 255 ${TMUX_POWERLINE_SEPARATOR_LEFT_THIN}" \
|
# "date 24 255 ${TMUX_POWERLINE_SEPARATOR_LEFT_THIN}" \
|
||||||
# "time 24 255 ${TMUX_POWERLINE_SEPARATOR_LEFT_THIN}" \
|
# "time 24 255 ${TMUX_POWERLINE_SEPARATOR_LEFT_THIN}" \
|
||||||
# )
|
# )
|
||||||
# fi
|
# fi
|
||||||
|
|
||||||
if [ -z $TMUX_POWERLINE_LEFT_STATUS_SEGMENTS ]; then
|
if [ -z $TMUX_POWERLINE_LEFT_STATUS_SEGMENTS ]; then
|
||||||
TMUX_POWERLINE_LEFT_STATUS_SEGMENTS=(
|
TMUX_POWERLINE_LEFT_STATUS_SEGMENTS=(
|
||||||
"tmux_session_info 24 255" \
|
"tmux_session_info 24 255" \
|
||||||
# "hostname 33 0" \
|
# "hostname 33 0" \
|
||||||
# "ifstat_sys 30 255" \
|
# "ifstat_sys 30 255" \
|
||||||
# "lan_ip 59 255" \
|
# "lan_ip 59 255" \
|
||||||
"wan_ip 59 255" \
|
"wan_ip 59 255" \
|
||||||
# "ifstat_sys 64 255" \
|
# "ifstat_sys 64 255" \
|
||||||
"vcs_branch 64 255" \
|
"vcs_branch 64 255" \
|
||||||
)
|
)
|
||||||
fi
|
fi
|
||||||
if [ -z $TMUX_POWERLINE_RIGHT_STATUS_SEGMENTS ]; then
|
if [ -z $TMUX_POWERLINE_RIGHT_STATUS_SEGMENTS ]; then
|
||||||
TMUX_POWERLINE_RIGHT_STATUS_SEGMENTS=(
|
TMUX_POWERLINE_RIGHT_STATUS_SEGMENTS=(
|
||||||
# "pwd 89 211" \
|
# "pwd 89 211" \
|
||||||
# "now_playing 234 37" \
|
# "now_playing 234 37" \
|
||||||
#"cpu 240 136" \
|
#"cpu 240 136" \
|
||||||
"battery 64 255" \
|
"battery 64 255" \
|
||||||
"load 59 255" \
|
"load 59 255" \
|
||||||
#"rainbarf 0 0" \
|
#"rainbarf 0 0" \
|
||||||
#"xkb_layout 125 117" \
|
#"xkb_layout 125 117" \
|
||||||
"date_day 24 255" \
|
"date_day 24 255" \
|
||||||
"date 24 255 ${TMUX_POWERLINE_SEPARATOR_LEFT_THIN}" \
|
"date 24 255 ${TMUX_POWERLINE_SEPARATOR_LEFT_THIN}" \
|
||||||
"time 24 255 ${TMUX_POWERLINE_SEPARATOR_LEFT_THIN}" \
|
"time 24 255 ${TMUX_POWERLINE_SEPARATOR_LEFT_THIN}" \
|
||||||
)
|
)
|
||||||
fi
|
fi
|
||||||
EOF
|
EOF
|
||||||
|
}
|
||||||
|
# conf_print_tmux_default | tee "${TMUX_CONF_DIR}"/default.sh
|
||||||
|
|
||||||
# wget -c --directory-prefix "${DEST}"/.config/tmux/ https://raw.githubusercontent.com/Netherdrake/Dotfiles/master/config/tmux/tmux.conf
|
# wget -c --directory-prefix "${DEST}"/.config/tmux/ https://raw.githubusercontent.com/Netherdrake/Dotfiles/master/config/tmux/tmux.conf
|
||||||
|
|
||||||
cat <<-EOF | tee "${TMUX_CONF_DIR}"/tmux.conf
|
conf_print_tmux_conf-1() {
|
||||||
# set-environment -g TMUX_PLUGIN_MANAGER_PATH '${TMUX_CONF_DIR}/plugins/tpm'
|
cat <<-EOF
|
||||||
|
# set-environment -g TMUX_PLUGIN_MANAGER_PATH '${TMUX_CONF_DIR}/plugins/tpm'
|
||||||
|
|
||||||
# from apt-get install powerline
|
# from apt-get install powerline
|
||||||
source /usr/share/powerline/bindings/tmux/powerline_tmux_1.9_plus.conf
|
source /usr/share/powerline/bindings/tmux/powerline_tmux_2.1_plus.conf
|
||||||
|
|
||||||
# set-option -g default-shell /bin/fish
|
# set-option -g default-shell /bin/fish
|
||||||
set-option -g default-shell "/usr/bin/zsh"
|
set-option -g default-shell "/usr/bin/zsh"
|
||||||
|
|
||||||
# http://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard
|
# http://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard
|
||||||
set-option -g status on
|
set-option -g status on
|
||||||
set-option -g status-interval 2
|
set-option -g status-interval 2
|
||||||
# set-option -g status-utf8 on
|
# set-option -g status-utf8 on
|
||||||
set-option -g status-left-length 60
|
set-option -g status-left-length 60
|
||||||
set-option -g status-right-length 60
|
set-option -g status-right-length 60
|
||||||
set-option -g default-terminal xterm-256color
|
|
||||||
|
set-option -g default-terminal "tmux-256color"
|
||||||
|
set -as terminal-overrides ",xterm*:Tc"
|
||||||
|
|
||||||
setw -g mode-keys vi
|
setw -g mode-keys vi
|
||||||
bind h select-pane -L
|
bind h select-pane -L
|
||||||
|
|
@ -189,12 +195,6 @@ cat <<-EOF | tee "${TMUX_CONF_DIR}"/tmux.conf
|
||||||
unbind r
|
unbind r
|
||||||
bind r source-file ~/.tmux.conf \; display "Reloaded!"
|
bind r source-file ~/.tmux.conf \; display "Reloaded!"
|
||||||
|
|
||||||
# I dont know what I'm doing
|
|
||||||
#unbind {
|
|
||||||
#unbind }
|
|
||||||
#bind H swap-pane -U
|
|
||||||
#bind L swap-pane -D
|
|
||||||
|
|
||||||
# highlight navbar indication of current window
|
# highlight navbar indication of current window
|
||||||
set-window-option -g window-status-current-style fg=colour235
|
set-window-option -g window-status-current-style fg=colour235
|
||||||
set-window-option -g window-status-current-style bg=colour148 #064 blendin
|
set-window-option -g window-status-current-style bg=colour148 #064 blendin
|
||||||
|
|
@ -216,10 +216,12 @@ cat <<-EOF | tee "${TMUX_CONF_DIR}"/tmux.conf
|
||||||
set -g pane-active-border-style fg=colour069 # 24 blue
|
set -g pane-active-border-style fg=colour069 # 24 blue
|
||||||
# set -g pane-border-style bg=black
|
# set -g pane-border-style bg=black
|
||||||
# set -g pane-active-border-style bg=black
|
# set -g pane-active-border-style bg=black
|
||||||
EOF
|
EOF
|
||||||
|
}
|
||||||
|
conf_print_tmux_conf-1 | tee "${TMUX_CONF_DIR}"/tmux.conf
|
||||||
|
|
||||||
## A Tmux theme made to work together with bullet-train.zsh
|
## A Tmux theme made to work together with bullet-train.zsh
|
||||||
#http://github.com/caiogondim/maglev
|
# http://github.com/caiogondim/maglev
|
||||||
|
|
||||||
# Depends: Tmux Pain Control Optional:
|
# Depends: Tmux Pain Control Optional:
|
||||||
# Tmux copycat Tmux prefix highlight
|
# Tmux copycat Tmux prefix highlight
|
||||||
|
|
@ -228,99 +230,111 @@ EOF
|
||||||
|
|
||||||
# Overwrites the heredoc above.
|
# Overwrites the heredoc above.
|
||||||
|
|
||||||
#cat <<-EOF | tee "${DEST}"/.tmux.conf
|
conf_print_tmux_conf-2() {
|
||||||
cat <<-EOF | tee "${TMUX_CONF_DIR}"/tmux.conf
|
cat <<-EOF
|
||||||
# Start windows and panes at 1, not 0
|
|
||||||
set -g base-index 1
|
|
||||||
set -g pane-base-index 1
|
|
||||||
|
|
||||||
set-option -g status-position top
|
# Start windows and panes at 1, not 0
|
||||||
|
set -g base-index 1
|
||||||
|
set -g pane-base-index 1
|
||||||
|
|
||||||
set-option -g default-terminal "tmux-256color"
|
set-option -g status-position top
|
||||||
|
|
||||||
set-option -g repeat-time 0
|
set-option -g repeat-time 0
|
||||||
|
|
||||||
# vim-tmux-focus-events requires this or tmux-plugins/tmux-sensible enabled below.
|
# vim-tmux-focus-events requires this or tmux-plugins/tmux-sensible enabled below.
|
||||||
set -g focus-events on
|
set -g focus-events on
|
||||||
|
|
||||||
# Scroll with mouse
|
# Scroll with mouse
|
||||||
set -g mouse on
|
set -g mouse on
|
||||||
|
|
||||||
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'copy-mode -e; send-keys -M'"
|
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'copy-mode -e; send-keys -M'"
|
||||||
|
|
||||||
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -in -selection clipboard"
|
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -in -selection clipboard"
|
||||||
|
|
||||||
# Sane scrolling
|
# Sane scrolling
|
||||||
set -g terminal-overrides 'tmux-256color*:smcup@:rmcup@'
|
set -g terminal-overrides 'tmux-256color*:smcup@:rmcup@'
|
||||||
|
|
||||||
set-window-option -g mode-keys vi
|
set-window-option -g mode-keys vi
|
||||||
bind-key -Tcopy-mode-vi 'v' send -X begin-selection
|
bind-key -Tcopy-mode-vi 'v' send -X begin-selection
|
||||||
bind-key -Tcopy-mode-vi 'y' send -X copy-selection
|
bind-key -Tcopy-mode-vi 'y' send -X copy-selection
|
||||||
|
|
||||||
# Removes ESC delay
|
# Removes ESC delay
|
||||||
set -sg escape-time 0
|
set -sg escape-time 0
|
||||||
|
|
||||||
# List of plugins
|
# List of plugins
|
||||||
set -g @plugin 'tmux-plugins/tpm'
|
set -g @plugin 'tmux-plugins/tpm'
|
||||||
set -g @plugin 'tmux-plugins/tmux-pain-control'
|
set -g @plugin 'tmux-plugins/tmux-pain-control'
|
||||||
set -g @plugin 'tmux-plugins/tmux-copycat'
|
set -g @plugin 'tmux-plugins/tmux-copycat'
|
||||||
set -g @plugin 'tmux-plugins/tmux-yank'
|
set -g @plugin 'tmux-plugins/tmux-yank'
|
||||||
set -g @plugin 'tmux-plugins/tmux-open'
|
set -g @plugin 'tmux-plugins/tmux-open'
|
||||||
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
|
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
|
||||||
set -g @plugin 'tmux-plugins/tmux-battery'
|
set -g @plugin 'tmux-plugins/tmux-battery'
|
||||||
set -g @plugin 'tmux-plugins/tmux-cpu'
|
set -g @plugin 'tmux-plugins/tmux-cpu'
|
||||||
set -g @plugin 'christoomey/vim-tmux-navigator'
|
set -g @plugin 'christoomey/vim-tmux-navigator'
|
||||||
set -g @plugin 'caiogondim/maglev'
|
set -g @plugin 'caiogondim/maglev'
|
||||||
set -g @plugin 'whame/tmux-modal'
|
set -g @plugin 'whame/tmux-modal'
|
||||||
set -g @plugin 'MunifTanjim/tmux-mode-indicator'
|
set -g @plugin 'MunifTanjim/tmux-mode-indicator'
|
||||||
set -g @plugin 'arcticicestudio/nord-tmux'
|
set -g @plugin 'arcticicestudio/nord-tmux'
|
||||||
|
# set -g @plugin 'erikw/tmux-powerline'
|
||||||
|
set -g @plugin 'catppuccin/tmux'
|
||||||
|
set -g @catppuccin_flavour 'mocha' # or latte, frappe, macchiato
|
||||||
|
|
||||||
# extrakto for tmux - quickly select, copy/insert/complete text without a mouse
|
# extrakto for tmux - quickly select, copy/insert/complete text without a mouse
|
||||||
set -g @plugin 'laktak/extrakto'
|
set -g @plugin 'laktak/extrakto'
|
||||||
set -g @extrakto_fzf_tool "~/.local/share/fzf/bin/fzf"
|
set -g @extrakto_fzf_tool "~/.local/share/fzf/bin/fzf"
|
||||||
set -g @extrakto_split_direction "v"
|
set -g @extrakto_split_direction "v"
|
||||||
|
|
||||||
# tmux-resurrect: restores n/vim sessions if Session.vim exists.
|
# tmux-fzf - Use fzf to manage your tmux work environment
|
||||||
set -g @plugin 'tmux-plugins/tmux-resurrect'
|
# prefix + F (Shift+F)
|
||||||
set -g @resurrect-capture-pane-contents 'on'
|
# uses environment variable because tmux options are slow.
|
||||||
set -g @resurrect-save-shell-history 'on'
|
set -g @plugin 'sainnhe/tmux-fzf'
|
||||||
set -g @resurrect-strategy-nvim 'session'
|
# TMUX_FZF_LAUNCH_KEY="C-f" # change the default to (Ctrl+F)
|
||||||
set -g @rsurrect-strategy-vim 'session'
|
|
||||||
|
|
||||||
# tmux-continuum
|
|
||||||
set -g @plugin 'tmux-plugins/tmux-continuum'
|
|
||||||
set -g @continuum-restore 'off'
|
|
||||||
|
|
||||||
## Sets emac key binding
|
# tmux-resurrect: restores n/vim sessions if Session.vim exists.
|
||||||
#set -g @tmp_plugins ' \
|
set -g @plugin 'tmux-plugins/tmux-resurrect'
|
||||||
# tmux-plugins/tmux-sensible \
|
set -g @resurrect-capture-pane-contents 'on'
|
||||||
#'
|
set -g @resurrect-save-shell-history 'on'
|
||||||
|
set -g @resurrect-strategy-nvim 'session'
|
||||||
|
set -g @resurrect-strategy-vim 'session'
|
||||||
|
|
||||||
# tmux-resurrect will now restore vim and neovim sessions if Session.vim file is present.
|
# tmux-continuum
|
||||||
# for vim resurrect
|
set -g @plugin 'tmux-plugins/tmux-continuum'
|
||||||
set -g @rsurrect-strategy-vim 'session'
|
set -g @continuum-restore 'off'
|
||||||
EOF
|
|
||||||
|
## Sets emac key binding
|
||||||
|
#set -g @tmp_plugins ' \
|
||||||
|
# tmux-plugins/tmux-sensible \
|
||||||
|
#'
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
conf_print_tmux_conf-2 | tee -a "${TMUX_CONF_DIR}"/tmux.conf
|
||||||
|
|
||||||
# Last entry to the tmux.conf
|
# Last entry to the tmux.conf
|
||||||
cat <<-EOF | tee "${TMUX_CONF_DIR}"/tmux.conf
|
conf_print_tmux_conf-3() {
|
||||||
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
|
cat <<-EOF
|
||||||
run '/usr/share/tmux-plugin-manager/tpm'
|
|
||||||
EOF
|
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
|
||||||
|
run '/usr/share/tmux-plugin-manager/tpm'
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
conf_print_tmux_conf-3 | tee -a "${TMUX_CONF_DIR}"/tmux.conf
|
||||||
|
|
||||||
# Prefetch the plugins.
|
# Prefetch the plugins.
|
||||||
#/usr/share/tmux-plugin-manager/bin/install_plugins
|
#/usr/share/tmux-plugin-manager/bin/install_plugins
|
||||||
|
|
||||||
mkdir -p "${DEST}"/.zshrc.d/
|
# tmuxp completions
|
||||||
cat <<-EOF | tee "${DEST}"/.zshrc.d/001_tmuxp-complete.zsh
|
sudo apt-get install -y python3-shtab
|
||||||
#!/usr/bin/env zsh
|
|
||||||
eval " $(_TMUXP_COMPLETE=source_zsh tmuxp) "
|
|
||||||
EOF
|
|
||||||
|
|
||||||
mkdir -p "${DEST}"/.bashrc.d
|
# ZSH_COMPLETION_DIR="${DEST}"/.zshrc.d
|
||||||
cat <<-EOF | tee "${DEST}"/.bashrc.d/001_tmuxp-complete.sh
|
ZSH_COMPLETION_DIR="/usr/share/zsh/vendor-completions/"
|
||||||
#!/usr/bin/env bash
|
shtab --shell=zsh -u tmuxp.cli.create_parser |
|
||||||
eval " $(_TMUXP_COMPLETE=source tmuxp) "
|
sudo tee "${ZSH_COMPLETION_DIR}"/_tmuxp
|
||||||
EOF
|
|
||||||
|
# BASH_COMPLETION_DIR="${DEST}"/.bashrc.d
|
||||||
|
BASH_COMPLETION_DIR="/usr/share/bash-completions"
|
||||||
|
shtab --shell=bash -u tmuxp.cli.create_parser |
|
||||||
|
sudo tee "${BASH_COMPLETION_DIR}"/tmuxp
|
||||||
|
|
||||||
# HOME="${DEST}" TMUX_PLUGIN_MANAGER_PATH=""${DEST}"/.tmux/plugins" bash /usr/share/tmux-plugin-manager/bin/install_plugins
|
# HOME="${DEST}" TMUX_PLUGIN_MANAGER_PATH=""${DEST}"/.tmux/plugins" bash /usr/share/tmux-plugin-manager/bin/install_plugins
|
||||||
|
|
||||||
|
|
@ -328,163 +342,175 @@ EOF
|
||||||
# tmux session manager examples. include in your project directory as .tmuxp.{yaml,json}
|
# tmux session manager examples. include in your project directory as .tmuxp.{yaml,json}
|
||||||
# and load with 'tmuxp load .' or 'tmuxp.load {name}'
|
# and load with 'tmuxp load .' or 'tmuxp.load {name}'
|
||||||
# see http://github.com/tony/tmuxp-config
|
# see http://github.com/tony/tmuxp-config
|
||||||
cat <<-EOF | tee "${DEST}"/.config/tmuxp/docker.yaml
|
conf_print_tmuxp_docker() {
|
||||||
session_name: docker
|
cat <<-EOF
|
||||||
start_directory: ./
|
session_name: docker
|
||||||
windows:
|
start_directory: ./
|
||||||
- window_name: dockerfiles
|
windows:
|
||||||
layout: 6da5,239x56,0,0[239x34,0,0,65,239x21,0,35{119x21,0,35,66,119x21,120,35,67}]
|
- window_name: dockerfiles
|
||||||
options:
|
layout: 6da5,239x56,0,0[239x34,0,0,65,239x21,0,35{119x21,0,35,66,119x21,120,35,67}]
|
||||||
automatic-rename: 'off'
|
options:
|
||||||
panes:
|
automatic-rename: 'off'
|
||||||
- shell_command:
|
panes:
|
||||||
- vim
|
- shell_command:
|
||||||
- :e README.md
|
- vim
|
||||||
- pane
|
- :e README.md
|
||||||
- pane
|
- pane
|
||||||
- window_name: docs
|
- pane
|
||||||
layout: main-horizontal
|
- window_name: docs
|
||||||
options:
|
layout: main-horizontal
|
||||||
main-pane-height: 35
|
options:
|
||||||
shell_command_before:
|
main-pane-height: 35
|
||||||
- command -v virtualenv >/dev/null 2>&1 || { pip install virtualenv; }
|
shell_command_before:
|
||||||
- '[ -d .env -a -f .env/bin/activate ] && source .env/bin/activate || virtualenv .env'
|
- command -v virtualenv >/dev/null 2>&1 || { pip install virtualenv; }
|
||||||
- '[ ! -d .env/build ] || rm -rf .env/build'
|
- '[ -d .env -a -f .env/bin/activate ] && source .env/bin/activate || virtualenv .env'
|
||||||
- cd ./doc
|
- '[ ! -d .env/build ] || rm -rf .env/build'
|
||||||
- command -v .env/bin/tmuxp >/dev/null 2>&1 || { pip install -r requirements.pip; }
|
- cd ./doc
|
||||||
panes:
|
- command -v .env/bin/tmuxp >/dev/null 2>&1 || { pip install -r requirements.pip; }
|
||||||
- shell_command:
|
panes:
|
||||||
- reset
|
- shell_command:
|
||||||
- vim
|
- reset
|
||||||
- :Ex
|
- vim
|
||||||
focus: true
|
- :Ex
|
||||||
- pwd
|
focus: true
|
||||||
- echo 'docs built to <http://0.0.0.0:8007/_build/html>'; python -m SimpleHTTPServer 8007
|
- pwd
|
||||||
- shell_command:
|
- echo 'docs built to <http://0.0.0.0:8007/_build/html>'; python -m SimpleHTTPServer 8007
|
||||||
- command -v watching_testrunner >/dev/null 2>&1 || { pip install watching_testrunner; }
|
- shell_command:
|
||||||
- watching_testrunner --basepath ./ --pattern="*.rst" 'make html'
|
- command -v watching_testrunner >/dev/null 2>&1 || { pip install watching_testrunner; }
|
||||||
- window_name: postgresql
|
- watching_testrunner --basepath ./ --pattern="*.rst" 'make html'
|
||||||
layout: 6da5,239x56,0,0[239x34,0,0,65,239x21,0,35{119x21,0,35,66,119x21,120,35,67}]
|
- window_name: postgresql
|
||||||
options:
|
layout: 6da5,239x56,0,0[239x34,0,0,65,239x21,0,35{119x21,0,35,66,119x21,120,35,67}]
|
||||||
automatic-rename: 'off'
|
options:
|
||||||
start_directory: postgresql
|
automatic-rename: 'off'
|
||||||
panes:
|
start_directory: postgresql
|
||||||
- shell_command:
|
panes:
|
||||||
- vim
|
- shell_command:
|
||||||
- :e Dockerfile
|
- vim
|
||||||
- pane
|
- :e Dockerfile
|
||||||
- pane
|
- pane
|
||||||
EOF
|
- pane
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
conf_print_tmuxp_docker | tee "${DEST}"/.config/tmuxp/docker.yaml
|
||||||
|
|
||||||
cat <<-EOF | tee "${DEST}"/.config/tmuxp/top.yaml
|
conf_print_tmuxp_top() {
|
||||||
session_name: top
|
cat <<-EOF
|
||||||
windows:
|
session_name: top
|
||||||
- window_name: dev window
|
windows:
|
||||||
layout: tiled
|
- window_name: dev window
|
||||||
shell_command_before:
|
layout: tiled
|
||||||
- cd ~/ # run as a first command in all panes
|
shell_command_before:
|
||||||
panes:
|
- cd ~/ # run as a first command in all panes
|
||||||
- shell_command:
|
panes:
|
||||||
- sudo top
|
- shell_command:
|
||||||
- shell_command:
|
- sudo top
|
||||||
- sudo iotop
|
- shell_command:
|
||||||
- shell_command:
|
- sudo iotop
|
||||||
- cd /var/log # run multiple commands in this pane
|
- shell_command:
|
||||||
- sudo tail -f /var/log/messages
|
- cd /var/log # run multiple commands in this pane
|
||||||
EOF
|
- sudo tail -f /var/log/messages
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
conf_print_tmuxp_top | tee "${DEST}"/.config/tmuxp/top.yaml
|
||||||
|
|
||||||
cat <<-EOF | tee "${DEST}"/.config/tmuxp/tmuxp.yaml
|
conf_print_tmuxp_tmuxp() {
|
||||||
session_name: tmuxp
|
cat <<-EOF
|
||||||
start_directory: ./ # load session relative to config location (project root).
|
session_name: tmuxp
|
||||||
before_script: ./.tmuxp-before-script.sh
|
start_directory: ./ # load session relative to config location (project root).
|
||||||
shell_command_before:
|
before_script: ./.tmuxp-before-script.sh
|
||||||
- '[ -f .venv/bin/activate ] && source .venv/bin/activate && reset'
|
shell_command_before:
|
||||||
windows:
|
- '[ -f .venv/bin/activate ] && source .venv/bin/activate && reset'
|
||||||
- window_name: tmuxp
|
windows:
|
||||||
focus: True
|
- window_name: tmuxp
|
||||||
layout: main-horizontal
|
focus: True
|
||||||
options:
|
layout: main-horizontal
|
||||||
main-pane-height: 35
|
options:
|
||||||
panes:
|
main-pane-height: 35
|
||||||
- focus: true
|
panes:
|
||||||
- pane
|
- focus: true
|
||||||
- make watch_test
|
- pane
|
||||||
- window_name: docs
|
- make watch_test
|
||||||
layout: main-horizontal
|
- window_name: docs
|
||||||
options:
|
layout: main-horizontal
|
||||||
main-pane-height: 35
|
options:
|
||||||
start_directory: doc/
|
main-pane-height: 35
|
||||||
panes:
|
start_directory: doc/
|
||||||
- focus: true
|
panes:
|
||||||
- pane
|
- focus: true
|
||||||
- make serve
|
- pane
|
||||||
- make SPHINXBUILD='poetry run sphinx-build' watch
|
- make serve
|
||||||
EOF
|
- make SPHINXBUILD='poetry run sphinx-build' watch
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
conf_print_tmuxp_tmuxp | tee "${DEST}"/.config/tmuxp/tmuxp.yaml
|
||||||
|
|
||||||
cat <<-EOF | tee "${DEST}"/.config/tmuxp/tmuxp_testing.yaml
|
conf_print_tmuxp_tmuxp_testing() {
|
||||||
language: python
|
cat <<-EOF | tee "${DEST}"/.config/tmuxp/tmuxp_testing.yaml
|
||||||
sudo: false
|
language: python
|
||||||
dist: bionic # 18.04
|
sudo: false
|
||||||
python:
|
dist: bionic # 18.04
|
||||||
- 2.7
|
python:
|
||||||
- 3.7
|
- 2.7
|
||||||
- pypy3
|
- 3.7
|
||||||
if: (type = push AND branch IN (master)) OR (type = pull_request)
|
- pypy3
|
||||||
env:
|
if: (type = push AND branch IN (master)) OR (type = pull_request)
|
||||||
global:
|
env:
|
||||||
- RETRY_TIMEOUT_SECONDS=15
|
global:
|
||||||
matrix:
|
- RETRY_TIMEOUT_SECONDS=15
|
||||||
- TMUX_VERSION=master
|
matrix:
|
||||||
- TMUX_VERSION=3.0a
|
- TMUX_VERSION=master
|
||||||
- TMUX_VERSION=2.9
|
- TMUX_VERSION=3.0a
|
||||||
- TMUX_VERSION=2.8
|
- TMUX_VERSION=2.9
|
||||||
- TMUX_VERSION=2.8
|
- TMUX_VERSION=2.8
|
||||||
- TMUX_VERSION=2.7
|
- TMUX_VERSION=2.8
|
||||||
- TMUX_VERSION=2.6
|
- TMUX_VERSION=2.7
|
||||||
- TMUX_VERSION=2.5
|
- TMUX_VERSION=2.6
|
||||||
- TMUX_VERSION=2.4
|
- TMUX_VERSION=2.5
|
||||||
- TMUX_VERSION=2.3
|
- TMUX_VERSION=2.4
|
||||||
- TMUX_VERSION=2.2
|
- TMUX_VERSION=2.3
|
||||||
- TMUX_VERSION=2.1
|
- TMUX_VERSION=2.2
|
||||||
- TMUX_VERSION=2.0
|
- TMUX_VERSION=2.1
|
||||||
- TMUX_VERSION=1.9a
|
- TMUX_VERSION=2.0
|
||||||
- TMUX_VERSION=1.8
|
- TMUX_VERSION=1.9a
|
||||||
matrix:
|
- TMUX_VERSION=1.8
|
||||||
finish_fast: true
|
matrix:
|
||||||
allow_failures:
|
finish_fast: true
|
||||||
- env: TMUX_VERSION=master
|
allow_failures:
|
||||||
- python: pypy3
|
- env: TMUX_VERSION=master
|
||||||
cache:
|
- python: pypy3
|
||||||
- pip
|
cache:
|
||||||
- apt
|
- pip
|
||||||
- directories:
|
- apt
|
||||||
- ~/source
|
- directories:
|
||||||
- ~/build
|
- ~/source
|
||||||
before_install:
|
- ~/build
|
||||||
- pip install poetry
|
before_install:
|
||||||
- poetry --version
|
- pip install poetry
|
||||||
- poetry version
|
- poetry --version
|
||||||
install:
|
- poetry version
|
||||||
- poetry install -v
|
install:
|
||||||
before_script:
|
- poetry install -v
|
||||||
- mkdir -p ~/source
|
before_script:
|
||||||
- mkdir -p ~/build/tmux-$TMUX_VERSION
|
- mkdir -p ~/source
|
||||||
- if [[ ! -d ~/source/tmux-$TMUX_VERSION ]]; then git clone https://github.com/tmux/tmux.git ~/source/tmux-$TMUX_VERSION; fi
|
- mkdir -p ~/build/tmux-$TMUX_VERSION
|
||||||
- cd ~/source/tmux-$TMUX_VERSION
|
- if [[ ! -d ~/source/tmux-$TMUX_VERSION ]]; then git clone https://github.com/tmux/tmux.git ~/source/tmux-$TMUX_VERSION; fi
|
||||||
- git checkout $TMUX_VERSION
|
- cd ~/source/tmux-$TMUX_VERSION
|
||||||
- export PATH=$HOME/build/tmux-$TMUX_VERSION/bin:$PATH
|
- git checkout $TMUX_VERSION
|
||||||
- if [[ $TMUX_VERSION == "master" || ! $(tmux -V | grep "$TMUX_VERSION") ]]; then sh autogen.sh; fi
|
- export PATH=$HOME/build/tmux-$TMUX_VERSION/bin:$PATH
|
||||||
- if [[ $TMUX_VERSION == "master" || ! $(tmux -V | grep "$TMUX_VERSION") ]]; then ./configure --prefix=$HOME/build/tmux-$TMUX_VERSION && make && make install; fi
|
- if [[ $TMUX_VERSION == "master" || ! $(tmux -V | grep "$TMUX_VERSION") ]]; then sh autogen.sh; fi
|
||||||
- cd $TRAVIS_BUILD_DIR
|
- if [[ $TMUX_VERSION == "master" || ! $(tmux -V | grep "$TMUX_VERSION") ]]; then ./configure --prefix=$HOME/build/tmux-$TMUX_VERSION && make && make install; fi
|
||||||
- tmux -V
|
- cd $TRAVIS_BUILD_DIR
|
||||||
script:
|
- tmux -V
|
||||||
- poetry run py.test --cov
|
script:
|
||||||
- make flake8
|
- poetry run py.test --cov
|
||||||
addons:
|
- make flake8
|
||||||
apt:
|
addons:
|
||||||
packages:
|
apt:
|
||||||
- libevent-dev
|
packages:
|
||||||
- libncurses-dev
|
- libevent-dev
|
||||||
after_success:
|
- libncurses-dev
|
||||||
- codecov
|
after_success:
|
||||||
EOF
|
- codecov
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
conf_print_tmuxp_tmuxp_testing | tee "${DEST}"/.config/tmuxp/tmuxp_testing.yaml
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue