mirror of
https://gitlab.com/sagidayan/linux-config.git
synced 2024-11-22 15:25:25 +00:00
87 lines
2.7 KiB
Bash
87 lines
2.7 KiB
Bash
# Send prefix - Ctrl+a
|
|
set-option -g prefix C-a
|
|
unbind-key C-a
|
|
bind-key C-a send-prefix
|
|
|
|
# Use Alt+[hjkl] to switch panes - also (esc - h|j|k|l)
|
|
bind -n M-h select-pane -L
|
|
bind -n M-l select-pane -R
|
|
bind -n M-k select-pane -U
|
|
bind -n M-j select-pane -D
|
|
|
|
# <prefix>-h|l|Left|Right
|
|
bind-key h previous-window
|
|
bind-key Left previous-window
|
|
bind-key l next-window
|
|
bind-key Right next-window
|
|
|
|
# Mouse mode
|
|
setw -g mouse on
|
|
|
|
# Set easier window split keys
|
|
bind-key | split-window -h -c "#{pane_current_path}"
|
|
bind-key \\ split-window -h -c "#{pane_current_path}"
|
|
bind-key - split-window -v -c "#{pane_current_path}"
|
|
# close window with <prefix-q>
|
|
bind-key q kill-window
|
|
# refresh window with <prefix-e>
|
|
bind-key e respawn-window -k -c "#{pane_current_path}"
|
|
|
|
# <prefix>-j/k for up down (useful to move between history commands)
|
|
bind-key k send-keys Up
|
|
bind-key j send-keys Down
|
|
|
|
# Easy config reload
|
|
bind-key r source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded."
|
|
|
|
# Lookup the cheat sheet <prefix>-i
|
|
bind-key i run-shell "tmux neww -n '🏳️ CHEATER\! 😎' ~/.shellconfig/cheat.sh"
|
|
|
|
# Open Workspace
|
|
bind-key o run-shell "tmux neww -n '🖥Workspace Manager' ~/.shellconfig/workspaces/open_workspace.sh"
|
|
|
|
# Add/Save Workspace
|
|
bind-key a run-shell "tmux neww -n '🖥Workspace Manager' 'cd #{pane_current_path} && ~/.shellconfig/workspaces/add_workspace.sh'"
|
|
|
|
# Delete (x) Workspace
|
|
bind-key x run-shell "tmux neww -n '🖥Workspace Manager' ~/.shellconfig/workspaces/delete_workspace.sh"
|
|
|
|
# Change git branches fast <prefix>-b
|
|
bind-key b send-keys "gitB" C-m
|
|
|
|
# Git add + fzf
|
|
bind-key g run-shell "tmux neww -n '🞥 📑 Git Add' 'cd #{pane_current_path} && (git ls-files -m -o --exclude-standard | fzf -m --print0 --reverse --header \"🞥 Select files to stage. use [tab] for multi selection\" --preview \"bat --diff --color=always --style=numbers,changes,grid {}\" | xargs -0 -o -t git add)'"
|
|
|
|
############################
|
|
# Themes
|
|
###########################
|
|
# Nord theme
|
|
set -g @plugin "arcticicestudio/nord-tmux"
|
|
# Gruvbox Theme
|
|
# set -g @plugin 'egel/tmux-gruvbox'
|
|
# set -g @tmux-gruvbox 'dark' # or 'light'
|
|
|
|
# Tmux yank (For clipboard integration)
|
|
set -g @plugin 'tmux-plugins/tmux-yank'
|
|
# Mouse select to clipboard
|
|
set -g @yank_selection_mouse 'clipboard' # or 'primary' or 'secondary'
|
|
|
|
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
|
|
run '~/.tmux/plugins/tpm/tpm'
|
|
|
|
# Buffer line size (History)
|
|
set -g history-limit 5000
|
|
|
|
# Use Ctrl-K to clear buffer
|
|
bind -n C-k clear-history
|
|
|
|
# Default Colors
|
|
set -g default-terminal "xterm-256color"
|
|
|
|
# Home/End support
|
|
bind -n End send-key C-e
|
|
bind -n Home send-key C-a
|
|
|
|
# Set active pane border background
|
|
set-option -g pane-active-border-style bg=#8abeb7
|
|
|