From 910e0cecbd35e35aa08e5d8dcccd2541b000a569 Mon Sep 17 00:00:00 2001 From: Daniel Fichtinger Date: Sat, 2 Nov 2024 01:33:23 -0400 Subject: [PATCH] Tmux, zsh! --- .config/tmux/tmux.conf | 30 ++++++++++++++++++++++++++++-- .zshrc | 14 +++++++++++++- 2 files changed, 41 insertions(+), 3 deletions(-) diff --git a/.config/tmux/tmux.conf b/.config/tmux/tmux.conf index 58681bda..25eb09bd 100644 --- a/.config/tmux/tmux.conf +++ b/.config/tmux/tmux.conf @@ -1,13 +1,39 @@ +set-option -sa terminal-overrides ",xterm*:Tc" unbind r bind r source-file ~/.config/tmux/tmux.conf -unbind C-b unbind C-t +unbind C-b set -g prefix C-t set -g mouse on -set -g @cursor-style 'bar' +set -g base-index 1 +set -g pane-base-index 1 +set-window-option -g pane-base-index 1 +set-option -g renumber-windows on + +# set -g @cursor-style 'bar' +# set -ga terminal-overrides ',*:Ss=\E[2 q:Se=\E[2 q' set -g @plugin 'tmux-plugins/tpm' set -g @plugin 'tmux-plugins/tmux-sensible' +set -g @plugin 'christoomey/vim-tmux-navigator' +set -g @plugin 'tmux-plugins/tmux-yank' + +set -g @vim_navigator_mapping_left "C-Left" +set -g @vim_navigator_mapping_right "C-Right" +set -g @vim_navigator_mapping_up "C-Up" +set -g @vim_navigator_mapping_down "C-Down" + +set-window-option -g mode-keys vi + +bind-key -T copy-mode-vi v send-keys -X begin-selection +bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle +bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel + +bind v split-window -v +bind h split-window -h + +# bind -n S-Left previous-window +# bind -n S-Right next-window run '/usr/share/tmux-plugin-manager/tpm' diff --git a/.zshrc b/.zshrc index ab57b98e..f5bc73c8 100644 --- a/.zshrc +++ b/.zshrc @@ -142,5 +142,17 @@ function y() { rm -f -- "$tmp" } . /opt/asdf-vm/asdf.sh -echo -ne '\e[6 q' # Caret/vertical bar cursor style +# echo -ne '\e[6 q' # Caret/vertical bar cursor style +print -n '\033[5 q' +function zle-keymap-select zle-line-init zle-line-finish +{ + case $KEYMAP in + vicmd) print -n '\033[1 q';; # block cursor + viins|main) print -n '\033[5 q';; # line cursor + esac +} + +zle -N zle-line-init +zle -N zle-line-finish +zle -N zle-keymap-select # eval "$(starship init zsh)"