2021-11-18 08:59:41 +00:00
|
|
|
# Send prefix - Ctrl+a
|
2021-10-22 11:45:20 +00:00
|
|
|
set-option -g prefix C-a
|
|
|
|
unbind-key C-a
|
|
|
|
bind-key C-a send-prefix
|
2022-02-02 08:13:19 +00:00
|
|
|
|
|
|
|
# For gapless window numbers
|
|
|
|
set-option -g renumber-windows on
|
|
|
|
|
2021-11-18 08:59:41 +00:00
|
|
|
# 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
|
2021-10-22 11:45:20 +00:00
|
|
|
|
2021-11-18 08:59:41 +00:00
|
|
|
# <prefix>-h|l|Left|Right
|
|
|
|
bind-key h previous-window
|
2021-12-13 13:53:19 +00:00
|
|
|
bind-key Left previous-window
|
2021-11-18 08:59:41 +00:00
|
|
|
bind-key l next-window
|
2021-12-13 13:53:19 +00:00
|
|
|
bind-key Right next-window
|
2021-10-22 11:45:20 +00:00
|
|
|
|
|
|
|
# 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}"
|
2022-01-03 09:46:10 +00:00
|
|
|
# close window with <prefix-q>
|
|
|
|
bind-key q kill-window
|
|
|
|
# refresh window with <prefix-e>
|
2022-01-13 17:29:48 +00:00
|
|
|
bind-key e respawn-window -k -c "#{pane_current_path}"
|
2022-01-03 09:46:10 +00:00
|
|
|
|
|
|
|
# <prefix>-j/k for up down (useful to move between history commands)
|
|
|
|
bind-key k send-keys Up
|
|
|
|
bind-key j send-keys Down
|
|
|
|
|
2021-10-22 11:45:20 +00:00
|
|
|
# Easy config reload
|
|
|
|
bind-key r source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded."
|
2022-01-10 08:11:20 +00:00
|
|
|
|
|
|
|
# Lookup the cheat sheet <prefix>-i
|
2022-02-02 08:13:19 +00:00
|
|
|
bind-key i run-shell "tmux neww -n '🏳️ CHEATER\! 😎' ~/.shellconfig/cheat.sh"
|
2022-01-20 18:12:28 +00:00
|
|
|
|
|
|
|
# Open Workspace
|
2022-02-02 08:13:19 +00:00
|
|
|
bind-key o run-shell "tmux neww -n '🖥 Workspace Manager' ~/.shellconfig/workspaces/open_workspace.sh"
|
2022-01-20 18:12:28 +00:00
|
|
|
|
|
|
|
# Add/Save Workspace
|
2022-02-02 08:13:19 +00:00
|
|
|
bind-key a run-shell "tmux neww -n '🖥 Workspace Manager' 'cd #{pane_current_path} && ~/.shellconfig/workspaces/add_workspace.sh'"
|
2022-01-20 18:12:28 +00:00
|
|
|
|
|
|
|
# Delete (x) Workspace
|
2022-02-02 08:13:19 +00:00
|
|
|
bind-key x run-shell "tmux neww -n '🖥 Workspace Manager' ~/.shellconfig/workspaces/delete_workspace.sh"
|
2022-01-20 18:12:28 +00:00
|
|
|
|
2022-01-23 12:38:33 +00:00
|
|
|
# Change git branches fast <prefix>-b
|
2022-02-02 08:13:19 +00:00
|
|
|
#bind-key b send-keys "gitB" C-m
|
|
|
|
bind-key b run-shell "tmux neww -n ' Git Branches' 'cd #{pane_current_path} && (zsh -c \"source ~/.shellconfig/common.sh && gitB\" || sleep 1)' "
|
2022-01-23 12:38:33 +00:00
|
|
|
|
2022-01-24 09:54:38 +00:00
|
|
|
# Git add + fzf
|
2022-02-02 08:13:19 +00:00
|
|
|
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)'"
|
|
|
|
|
|
|
|
# Get weather (Prefix-!)
|
|
|
|
bind-key \! run-shell "tmux neww -n '🌡️ Weather Peek' '(echo \"Fetching Weather...\" && curl -s \"https://wttr.in/?lang=en\") | bat --paging always -p'"
|
2022-01-24 09:54:38 +00:00
|
|
|
|
2021-10-22 11:45:20 +00:00
|
|
|
############################
|
|
|
|
# Themes
|
|
|
|
###########################
|
|
|
|
# Nord theme
|
2022-02-02 08:13:19 +00:00
|
|
|
# set -g @plugin "arcticicestudio/nord-tmux"
|
2021-10-22 11:45:20 +00:00
|
|
|
# Gruvbox Theme
|
|
|
|
# set -g @plugin 'egel/tmux-gruvbox'
|
|
|
|
# set -g @tmux-gruvbox 'dark' # or 'light'
|
|
|
|
|
2022-02-02 08:13:19 +00:00
|
|
|
############################
|
|
|
|
# Plugins
|
|
|
|
###########################
|
|
|
|
# Open links from output
|
|
|
|
set -g @plugin 'tmux-plugins/tmux-open'
|
2021-10-22 11:45:20 +00:00
|
|
|
# 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"
|
2021-11-18 08:59:41 +00:00
|
|
|
|
|
|
|
# Home/End support
|
|
|
|
bind -n End send-key C-e
|
|
|
|
bind -n Home send-key C-a
|
2022-01-03 09:46:10 +00:00
|
|
|
|
|
|
|
# Set active pane border background
|
2022-02-02 08:13:19 +00:00
|
|
|
#set-option -g pane-active-border-style bg=#8abeb7
|
2022-01-03 09:46:10 +00:00
|
|
|
|
2022-02-02 08:13:19 +00:00
|
|
|
############################
|
|
|
|
# Tomorrow-Night Theme
|
|
|
|
###########################
|
|
|
|
## set status bar
|
|
|
|
set -g status-style bg=default
|
|
|
|
setw -g window-status-current-style bg="#282a2e"
|
|
|
|
setw -g window-status-current-style fg="#81a2be"
|
|
|
|
|
|
|
|
## highlight active window
|
|
|
|
setw -g window-style 'bg=#282a2e'
|
|
|
|
setw -g window-active-style 'bg=#1d1f21'
|
|
|
|
setw -g pane-active-border-style ''
|
|
|
|
|
|
|
|
## highlight activity in status bar
|
|
|
|
setw -g window-status-activity-style fg="#8abeb7"
|
|
|
|
setw -g window-status-activity-style bg="#1d1f21"
|
|
|
|
|
|
|
|
## pane border and colors
|
|
|
|
set -g pane-active-border-style bg=default
|
|
|
|
set -g pane-active-border-style fg="#373b41"
|
|
|
|
set -g pane-border-style bg=default
|
|
|
|
set -g pane-border-style fg="#373b41"
|
|
|
|
|
|
|
|
set -g clock-mode-colour "#81a2be"
|
|
|
|
set -g clock-mode-style 24
|
|
|
|
|
|
|
|
set -g message-style bg="#8abeb7"
|
|
|
|
set -g message-style fg="#000000"
|
|
|
|
|
|
|
|
set -g message-command-style bg="#8abeb7"
|
|
|
|
set -g message-command-style fg="#000000"
|
|
|
|
|
|
|
|
# message bar or "prompt"
|
|
|
|
set -g message-style bg="#2d2d2d"
|
|
|
|
set -g message-style fg="#cc99cc"
|
|
|
|
|
|
|
|
set -g mode-style bg="#1d1f21"
|
|
|
|
set -g mode-style fg="#de935f"
|
|
|
|
|
|
|
|
set -g status-left '#[fg=#f99157,bg=#2d2d2d] #S #[fg=#f99157,bg=colour235] '
|
|
|
|
|
|
|
|
# right side of status bar holds "[host name] (date time)"
|
|
|
|
set -g status-right-length 100
|
|
|
|
set -g status-right-style fg=black
|
|
|
|
set -g status-right-style bold
|
|
|
|
set -g status-right '#[fg=#6699cc,bg=#2d4d2d] #[fg=#f99157,bg=#2d2d2d] %H:%M:%S #[fg=colour235]|#[fg=#6699cc,bg=#2d4d2d] #[fg=#f99157,bg=#2d2d2d] %y/%m/%d #[fg=colour235]|#[fg=#6699cc,bg=#2d4d2d] #[fg=#f99157,bg=#2d2d2d] @#H '
|
|
|
|
|
|
|
|
# make background window look like white tab
|
|
|
|
set-window-option -g window-status-style bg=default
|
|
|
|
set-window-option -g window-status-style fg=white
|
|
|
|
set-window-option -g window-status-style none
|
|
|
|
set-window-option -g window-status-format '#[fg=#6699cc,bg=#2d4d2d] #I #[fg=#999999,bg=#2d2d2d] #W #[default]'
|
|
|
|
|
|
|
|
# make foreground window look like bold yellow foreground tab
|
|
|
|
set-window-option -g window-status-current-style none
|
|
|
|
set-window-option -g window-status-current-format '#[fg=#f99157]#[fg=#6699cc]#I #[fg=#ffffff,bg=#6699cc] #W #[default]'
|
|
|
|
|
|
|
|
# active terminal yellow border, non-active white
|
|
|
|
set -g pane-border-style bg=default
|
|
|
|
set -g pane-border-style fg="#999999"
|
|
|
|
set -g pane-active-border-style fg="#f99157"
|