45 lines
1.2 KiB
Bash
45 lines
1.2 KiB
Bash
set -g set-clipboard on
|
|
|
|
set-option -g base-index 1
|
|
set-option -g pane-base-index 1
|
|
|
|
set-option -g mouse on
|
|
|
|
set-option -g history-limit 100000
|
|
|
|
set-option -g set-titles on
|
|
set-option -g set-titles-string "#{pane_title}"
|
|
|
|
bind c new-window -c "#{pane_current_path}"
|
|
bind '"' split-window -c "#{pane_current_path}"
|
|
bind % split-window -h -c "#{pane_current_path}"
|
|
|
|
# open lazygit
|
|
unbind g
|
|
bind g display-popup -d "#{pane_current_path}" -w 80% -h 80% -E "lazygit"
|
|
|
|
# create new session
|
|
unbind N
|
|
bind N display-popup -E 'bash -i -c "read -p \"Session name: \" name; tmux new-session -d -s \$name && tmux switch-client -t \$name"'
|
|
|
|
# list sessions
|
|
unbind l
|
|
bind l display-popup -E "tmux list-sessions | sed -E 's/:.*$//' | grep -v \"^$(tmux display-message -p '#S')\$\" | fzf --reverse | xargs tmux switch-client -t"
|
|
|
|
unbind t
|
|
bind t display-popup \
|
|
-d "#{pane_current_path}" \
|
|
-w 90% \
|
|
-h 90% \
|
|
-E "zsh"
|
|
|
|
set-option -s escape-time 0
|
|
|
|
source-file ~/.config/tmux/tmux-themes/snazzy.theme
|
|
|
|
set -g @plugin 'tmux-plugins/tpm'
|
|
set -g @plugin 'tmux-plugins/tmux-sensible'
|
|
set -g @plugin 'tmux-plugins/tmux-resurrect'
|
|
set -g @plugin 'tmux-plugins/tmux-continuum'
|
|
run '~/.config/tmux/plugins/tpm/tpm'
|