mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-02-21 18:55:51 +00:00
Feat: tmux config + plugin manager
This commit is contained in:
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -26,3 +26,6 @@
|
|||||||
url = https://github.com/cheat/cheatsheets.git
|
url = https://github.com/cheat/cheatsheets.git
|
||||||
ignore = dirty
|
ignore = dirty
|
||||||
|
|
||||||
|
[submodule "tmux/tpm"]
|
||||||
|
path = config/tmux/plugins/tpm
|
||||||
|
url = https://github.com/tmux-plugins/tpm.git
|
||||||
|
|||||||
@@ -3,3 +3,5 @@
|
|||||||
git submodule add --name dotbot-brew -f https://github.com/wren/dotbot-brew.git dotbot-brew
|
git submodule add --name dotbot-brew -f https://github.com/wren/dotbot-brew.git dotbot-brew
|
||||||
git submodule add --name dotbot-include -f https://gitlab.com/gnfzdz/dotbot-include.git dotbot-include
|
git submodule add --name dotbot-include -f https://gitlab.com/gnfzdz/dotbot-include.git dotbot-include
|
||||||
git submodule add --name cheat-community -f https://github.com/cheat/cheatsheets.git config/cheat/cheatsheets/community
|
git submodule add --name cheat-community -f https://github.com/cheat/cheatsheets.git config/cheat/cheatsheets/community
|
||||||
|
git submodule add --name tmux/tpm -f https://github.com/tmux-plugins/tpm.git config/tmux/plugins/tpm
|
||||||
|
|
||||||
|
|||||||
1
config/tmux/plugins/tpm
Submodule
1
config/tmux/plugins/tpm
Submodule
Submodule config/tmux/plugins/tpm added at 99469c4a9b
@@ -2,44 +2,81 @@
|
|||||||
#
|
#
|
||||||
# Contains configuration from the follwing sources:
|
# Contains configuration from the follwing sources:
|
||||||
# - https://tmuxguide.readthedocs.io/en/latest/tmux/tmux.html
|
# - https://tmuxguide.readthedocs.io/en/latest/tmux/tmux.html
|
||||||
# -
|
# - https://github.com/dreamsofcode-io/tmux/blob/main/tmux.conf
|
||||||
|
|
||||||
# unbind default prefix and set it to ctrl-a
|
set-option -sa terminal-overrides ",xterm*:Tc"
|
||||||
unbind C-b
|
|
||||||
set -g prefix C-a
|
|
||||||
bind C-a send-prefix
|
|
||||||
|
|
||||||
# make delay shorter
|
# Mouse support
|
||||||
|
set -g mouse on
|
||||||
|
|
||||||
|
# Make delay shorter
|
||||||
set -sg escape-time 0
|
set -sg escape-time 0
|
||||||
|
|
||||||
|
# Set <prefix> to Control + Space
|
||||||
|
unbind C-b
|
||||||
|
set -g prefix C-Space
|
||||||
|
bind C-Space send-prefix
|
||||||
|
|
||||||
|
# Vim style pane selection
|
||||||
#### key bindings ####
|
|
||||||
|
|
||||||
# reload config file
|
|
||||||
bind r source-file ~/.dotfiles/config/tmux/tmux.conf \; display "tmux.conf reloaded!"
|
|
||||||
|
|
||||||
# quickly open a new window
|
|
||||||
bind N new-window
|
|
||||||
|
|
||||||
# synchronize all panes in a window
|
|
||||||
bind y setw synchronize-panes
|
|
||||||
|
|
||||||
# pane movement shortcuts (same as vim)
|
|
||||||
bind h select-pane -L
|
bind h select-pane -L
|
||||||
bind j select-pane -D
|
bind j select-pane -D
|
||||||
bind k select-pane -U
|
bind k select-pane -U
|
||||||
bind l select-pane -R
|
bind l select-pane -R
|
||||||
|
|
||||||
# enable mouse support for switching panes/windows
|
# Start windows and panes at 1, not 0
|
||||||
#set -g mouse-utf8 on
|
set -g base-index 1
|
||||||
#set -g mouse on
|
set -g pane-base-index 1
|
||||||
|
set-window-option -g pane-base-index 1
|
||||||
|
set-option -g renumber-windows on
|
||||||
|
|
||||||
|
# Use Alt-arrow keys without prefix key to switch panes
|
||||||
|
bind -n M-Left select-pane -L
|
||||||
|
bind -n M-Right select-pane -R
|
||||||
|
bind -n M-Up select-pane -U
|
||||||
|
bind -n M-Down select-pane -D
|
||||||
|
|
||||||
|
# Shift arrow to switch windows
|
||||||
|
bind -n S-Left previous-window
|
||||||
|
bind -n S-Right next-window
|
||||||
|
|
||||||
|
# Shift Alt vim keys to switch windows
|
||||||
|
bind -n M-H previous-window
|
||||||
|
bind -n M-L next-window
|
||||||
|
|
||||||
|
# Reload tmux config with <prefix> + r
|
||||||
|
bind r source-file ~/.dotfiles/config/tmux/tmux.conf \; display "tmux cfg reloaded!"
|
||||||
|
|
||||||
|
# Open a new window with <prefix> + N
|
||||||
|
bind N new-window
|
||||||
|
|
||||||
|
# Plugins related configurations
|
||||||
|
|
||||||
|
## https://github.com/catppuccin/tmux
|
||||||
|
set -g @catppuccin_flavour 'mocha' # latte/frappe/macchiato/mocha
|
||||||
|
set -g @catppuccin_window_tabs_enabled on # or off to disable window_tabs
|
||||||
|
|
||||||
|
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 @plugin 'seebi/tmux-colors-solarized'
|
||||||
|
set -g @plugin 'tmux-plugins/tmux-resurrect'
|
||||||
|
set -g @plugin 'tmux-plugins/tmux-continuum'
|
||||||
|
|
||||||
|
# set vi-mode
|
||||||
|
set-window-option -g mode-keys vi
|
||||||
|
# keybindings
|
||||||
|
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 '"' split-window -v -c "#{pane_current_path}"
|
||||||
|
bind % split-window -h -c "#{pane_current_path}"
|
||||||
|
|
||||||
|
# synchronize all panes in a window
|
||||||
|
bind y setw synchronize-panes
|
||||||
|
|
||||||
#### copy mode : vim ####
|
#### copy mode : vim ####
|
||||||
|
|
||||||
# set vi mode for copy mode
|
|
||||||
setw -g mode-keys vi
|
|
||||||
|
|
||||||
# copy mode using 'Esc'
|
# copy mode using 'Esc'
|
||||||
unbind [
|
unbind [
|
||||||
bind Escape copy-mode
|
bind Escape copy-mode
|
||||||
@@ -51,3 +88,6 @@ bind Escape copy-mode
|
|||||||
unbind p
|
unbind p
|
||||||
bind p paste-buffer
|
bind p paste-buffer
|
||||||
|
|
||||||
|
# Finally run the tmux plugin manager
|
||||||
|
run '~/.config/tmux/plugins/tpm/tpm'
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user