Updated tmux theme to be consistant with nvim.
This commit is contained in:
parent
78f7914f9e
commit
807cced418
114
020_tmux.sh
114
020_tmux.sh
|
|
@ -12,7 +12,7 @@ set -x
|
|||
sudo apt update
|
||||
sudo apt install -y tmux
|
||||
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}
|
||||
# http://github.com/Netherdrake/Dotfiles/tree/master/config/tmux
|
||||
|
|
@ -48,7 +48,8 @@ cat <<-EOF | sudo tee -a "${DEST}"/.profile
|
|||
fi
|
||||
EOF
|
||||
|
||||
cat <<-EOF | tee "${TMUX_CONF_DIR}"/default.sh
|
||||
conf_print_tmux_default() {
|
||||
cat <<-'EOF' | tee "${TMUX_CONF_DIR}"/default.sh
|
||||
# Default Theme
|
||||
TMUX_POWERLINE_SEPARATOR_LEFT_BOLD=""
|
||||
TMUX_POWERLINE_SEPARATOR_LEFT_THIN=""
|
||||
|
|
@ -114,15 +115,18 @@ cat <<-EOF | tee "${TMUX_CONF_DIR}"/default.sh
|
|||
"time 24 255 ${TMUX_POWERLINE_SEPARATOR_LEFT_THIN}" \
|
||||
)
|
||||
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
|
||||
|
||||
cat <<-EOF | tee "${TMUX_CONF_DIR}"/tmux.conf
|
||||
conf_print_tmux_conf-1() {
|
||||
cat <<-EOF
|
||||
# set-environment -g TMUX_PLUGIN_MANAGER_PATH '${TMUX_CONF_DIR}/plugins/tpm'
|
||||
|
||||
# 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 "/usr/bin/zsh"
|
||||
|
|
@ -133,7 +137,9 @@ cat <<-EOF | tee "${TMUX_CONF_DIR}"/tmux.conf
|
|||
# set-option -g status-utf8 on
|
||||
set-option -g status-left-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
|
||||
bind h select-pane -L
|
||||
|
|
@ -189,12 +195,6 @@ cat <<-EOF | tee "${TMUX_CONF_DIR}"/tmux.conf
|
|||
unbind r
|
||||
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
|
||||
set-window-option -g window-status-current-style fg=colour235
|
||||
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-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
|
||||
#http://github.com/caiogondim/maglev
|
||||
# http://github.com/caiogondim/maglev
|
||||
|
||||
# Depends: Tmux Pain Control Optional:
|
||||
# Tmux copycat Tmux prefix highlight
|
||||
|
|
@ -228,16 +230,15 @@ EOF
|
|||
|
||||
# Overwrites the heredoc above.
|
||||
|
||||
#cat <<-EOF | tee "${DEST}"/.tmux.conf
|
||||
cat <<-EOF | tee "${TMUX_CONF_DIR}"/tmux.conf
|
||||
conf_print_tmux_conf-2() {
|
||||
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
|
||||
|
||||
set-option -g default-terminal "tmux-256color"
|
||||
|
||||
set-option -g repeat-time 0
|
||||
|
||||
# vim-tmux-focus-events requires this or tmux-plugins/tmux-sensible enabled below.
|
||||
|
|
@ -274,18 +275,28 @@ cat <<-EOF | tee "${TMUX_CONF_DIR}"/tmux.conf
|
|||
set -g @plugin 'whame/tmux-modal'
|
||||
set -g @plugin 'MunifTanjim/tmux-mode-indicator'
|
||||
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
|
||||
set -g @plugin 'laktak/extrakto'
|
||||
set -g @extrakto_fzf_tool "~/.local/share/fzf/bin/fzf"
|
||||
set -g @extrakto_split_direction "v"
|
||||
|
||||
# tmux-fzf - Use fzf to manage your tmux work environment
|
||||
# prefix + F (Shift+F)
|
||||
# uses environment variable because tmux options are slow.
|
||||
set -g @plugin 'sainnhe/tmux-fzf'
|
||||
# TMUX_FZF_LAUNCH_KEY="C-f" # change the default to (Ctrl+F)
|
||||
|
||||
|
||||
# tmux-resurrect: restores n/vim sessions if Session.vim exists.
|
||||
set -g @plugin 'tmux-plugins/tmux-resurrect'
|
||||
set -g @resurrect-capture-pane-contents 'on'
|
||||
set -g @resurrect-save-shell-history 'on'
|
||||
set -g @resurrect-strategy-nvim 'session'
|
||||
set -g @rsurrect-strategy-vim 'session'
|
||||
set -g @resurrect-strategy-vim 'session'
|
||||
|
||||
# tmux-continuum
|
||||
set -g @plugin 'tmux-plugins/tmux-continuum'
|
||||
|
|
@ -295,32 +306,35 @@ cat <<-EOF | tee "${TMUX_CONF_DIR}"/tmux.conf
|
|||
#set -g @tmp_plugins ' \
|
||||
# tmux-plugins/tmux-sensible \
|
||||
#'
|
||||
|
||||
# tmux-resurrect will now restore vim and neovim sessions if Session.vim file is present.
|
||||
# for vim resurrect
|
||||
set -g @rsurrect-strategy-vim 'session'
|
||||
EOF
|
||||
EOF
|
||||
}
|
||||
conf_print_tmux_conf-2 | tee -a "${TMUX_CONF_DIR}"/tmux.conf
|
||||
|
||||
# Last entry to the tmux.conf
|
||||
cat <<-EOF | tee "${TMUX_CONF_DIR}"/tmux.conf
|
||||
conf_print_tmux_conf-3() {
|
||||
cat <<-EOF
|
||||
|
||||
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
|
||||
run '/usr/share/tmux-plugin-manager/tpm'
|
||||
EOF
|
||||
EOF
|
||||
}
|
||||
conf_print_tmux_conf-3 | tee -a "${TMUX_CONF_DIR}"/tmux.conf
|
||||
|
||||
# Prefetch the plugins.
|
||||
#/usr/share/tmux-plugin-manager/bin/install_plugins
|
||||
|
||||
mkdir -p "${DEST}"/.zshrc.d/
|
||||
cat <<-EOF | tee "${DEST}"/.zshrc.d/001_tmuxp-complete.zsh
|
||||
#!/usr/bin/env zsh
|
||||
eval " $(_TMUXP_COMPLETE=source_zsh tmuxp) "
|
||||
EOF
|
||||
# tmuxp completions
|
||||
sudo apt-get install -y python3-shtab
|
||||
|
||||
mkdir -p "${DEST}"/.bashrc.d
|
||||
cat <<-EOF | tee "${DEST}"/.bashrc.d/001_tmuxp-complete.sh
|
||||
#!/usr/bin/env bash
|
||||
eval " $(_TMUXP_COMPLETE=source tmuxp) "
|
||||
EOF
|
||||
# ZSH_COMPLETION_DIR="${DEST}"/.zshrc.d
|
||||
ZSH_COMPLETION_DIR="/usr/share/zsh/vendor-completions/"
|
||||
shtab --shell=zsh -u tmuxp.cli.create_parser |
|
||||
sudo tee "${ZSH_COMPLETION_DIR}"/_tmuxp
|
||||
|
||||
# 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
|
||||
|
||||
|
|
@ -328,7 +342,8 @@ EOF
|
|||
# tmux session manager examples. include in your project directory as .tmuxp.{yaml,json}
|
||||
# and load with 'tmuxp load .' or 'tmuxp.load {name}'
|
||||
# see http://github.com/tony/tmuxp-config
|
||||
cat <<-EOF | tee "${DEST}"/.config/tmuxp/docker.yaml
|
||||
conf_print_tmuxp_docker() {
|
||||
cat <<-EOF
|
||||
session_name: docker
|
||||
start_directory: ./
|
||||
windows:
|
||||
|
|
@ -374,9 +389,12 @@ cat <<-EOF | tee "${DEST}"/.config/tmuxp/docker.yaml
|
|||
- :e Dockerfile
|
||||
- pane
|
||||
- pane
|
||||
EOF
|
||||
EOF
|
||||
}
|
||||
conf_print_tmuxp_docker | tee "${DEST}"/.config/tmuxp/docker.yaml
|
||||
|
||||
cat <<-EOF | tee "${DEST}"/.config/tmuxp/top.yaml
|
||||
conf_print_tmuxp_top() {
|
||||
cat <<-EOF
|
||||
session_name: top
|
||||
windows:
|
||||
- window_name: dev window
|
||||
|
|
@ -391,9 +409,12 @@ cat <<-EOF | tee "${DEST}"/.config/tmuxp/top.yaml
|
|||
- shell_command:
|
||||
- cd /var/log # run multiple commands in this pane
|
||||
- sudo tail -f /var/log/messages
|
||||
EOF
|
||||
EOF
|
||||
}
|
||||
conf_print_tmuxp_top | tee "${DEST}"/.config/tmuxp/top.yaml
|
||||
|
||||
cat <<-EOF | tee "${DEST}"/.config/tmuxp/tmuxp.yaml
|
||||
conf_print_tmuxp_tmuxp() {
|
||||
cat <<-EOF
|
||||
session_name: tmuxp
|
||||
start_directory: ./ # load session relative to config location (project root).
|
||||
before_script: ./.tmuxp-before-script.sh
|
||||
|
|
@ -419,9 +440,12 @@ cat <<-EOF | tee "${DEST}"/.config/tmuxp/tmuxp.yaml
|
|||
- pane
|
||||
- make serve
|
||||
- make SPHINXBUILD='poetry run sphinx-build' watch
|
||||
EOF
|
||||
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() {
|
||||
cat <<-EOF | tee "${DEST}"/.config/tmuxp/tmuxp_testing.yaml
|
||||
language: python
|
||||
sudo: false
|
||||
dist: bionic # 18.04
|
||||
|
|
@ -487,4 +511,6 @@ cat <<-EOF | tee "${DEST}"/.config/tmuxp/tmuxp_testing.yaml
|
|||
- libncurses-dev
|
||||
after_success:
|
||||
- codecov
|
||||
EOF
|
||||
EOF
|
||||
}
|
||||
conf_print_tmuxp_tmuxp_testing | tee "${DEST}"/.config/tmuxp/tmuxp_testing.yaml
|
||||
|
|
|
|||
Loading…
Reference in New Issue