commit 955362fc937724f2d0afad7d8d8d924148cd0d8a
parent 988941ff796524a8d7ab7cca1d2fe4b81bbf531a
Author: Oscar Benedito <oscar@oscarbenedito.com>
Date:   Thu,  9 Dec 2021 01:12:18 +0100

New tmux config and shortcuts

Diffstat:
M.config/tmux/tmux.conf | 32++++++++++++++++++++++++++++++--
M.config/zsh/aliases | 3++-
2 files changed, 32 insertions(+), 3 deletions(-)

diff --git a/.config/tmux/tmux.conf b/.config/tmux/tmux.conf @@ -1,3 +1,31 @@ -set -g default-terminal "screen-256color" +# not sure if the following 2 lines are needed +set -g default-terminal "tmux-256color" set -ga terminal-overrides ',*:Tc' # this is for 256 color -set -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q' # this is for the cursor shape +set -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q' # this is for the cursor shape in neovim + + +bind r source-file ~/.config/tmux/tmux.conf \; display "Config reloaded" +bind , command-prompt "rename-window '%%'" # when renaming windows, don't suggest previous name +bind-key m last-window + +# index panes and windows starting at 1 +set -g base-index 1 +set-window-option -g pane-base-index 1 + +# vim keybindings for moving panes +bind h select-pane -L +bind j select-pane -D +bind k select-pane -U +bind l select-pane -R + +# vim keybindings for copy mode +bind P paste-buffer +bind-key -T copy-mode-vi v send-keys -X begin-selection +bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xclip -i -selection clipboard" +bind-key -T copy-mode-vi r send-keys -X rectangle-toggle + +set -g status-style "fg=green,bg=default" # more discreet status bar +set -g message-style "fg=black,bg=green" +set -g status-right "" # get rid of right part of status bar + +set -s escape-time 0 # stop delay before passing escape keypress to vim diff --git a/.config/zsh/aliases b/.config/zsh/aliases @@ -14,13 +14,13 @@ alias cp="cp --interactive" alias mv="mv --interactive" alias mkdir="mkdir --parents" alias rm="rm -I" -alias tmux="TERM=screen-256color tmux" # shortcuts alias v="nvim" alias vim="nvim" alias vimdiff="nvim -d" alias g="git" +alias t="tmux new -As0" alias ..="cd .." alias ...="cd ../.." alias ....="cd ../../.." @@ -38,6 +38,7 @@ alias cfa="$EDITOR $XDG_CONFIG_HOME/zsh/aliases" alias cfe="$EDITOR $XDG_CONFIG_HOME/zsh/.zshenv" alias cfg="$EDITOR $XDG_CONFIG_HOME/git/config" alias cfp="$EDITOR $HOME/.profile" +alias cft="$EDITOR $XDG_CONFIG_HOME/tmux/tmux.conf" alias cfv="$EDITOR $XDG_CONFIG_HOME/nvim/init.vim" alias cfx="$EDITOR $XDG_CONFIG_HOME/Xresources" alias cfz="$EDITOR $XDG_CONFIG_HOME/zsh/.zshrc"