-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
103 lines (87 loc) · 3.85 KB
/
.tmux.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# _ _ _
# | | ( ) | |
# | | __ _ _ __ ___ ___ ___|/ | |_ _ __ ___ _ ___ __
# _ | |/ _` | '_ ` _ \ / _ \/ __| | __| '_ ` _ \| | | \ \/ /
# | |__| | (_| | | | | | | __/\__ \ | |_| | | | | | |_| |> <
# \____/ \__,_|_| |_| |_|\___||___/ \__|_| |_| |_|\__,_/_/\_\
#
#
# START PREFIX - Set prefix to Ctrl-Space
# * NOTE - cannot use ctrl-space on homelab due to Window's Terminal app
# Not sending Ctrl-space to SSH!
unbind C-b
set -g prefix C-Space
bind Space send-prefix
# END PREFIX
# Basic settings
set -g base-index 1 # Start numbering at 1 instead of 0 so it aligns with keyboard better
set -g history-limit 30000 # Better scroll history
set -g renumber-windows on # automatically renumber windows if a window is closed
# Allow italics and 256 colours?
set -g default-terminal "tmux-256color"
set -as terminal-overrides ',xterm*:sitm=\E[3m'
# Mouse stuff
set -g mouse on # Allow the mouse to scroll
set -g history-limit 300000 # Scroll history to a very large amount
# bind-key and bind are the same thing
bind r source-file ~/.tmux.conf \; display "Reloaded!" # Useful for editing. Reloads config!
# Vim-like pane navigation and resizing.
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
bind-key -r H resize-pane -L 10
bind-key -r J resize-pane -D 10
bind-key -r K resize-pane -U 10
bind-key -r L resize-pane -R 10
## ! Very different than default keybinds ##
# Split panes using | and -. Start the new pane at the path of the current pane.
unbind-key '"'
unbind-key %
bind-key \\ split-window -h -c "#{pane_current_path}" # Using \ so you don't have to hold shift. Think of the | key though!
bind-key - split-window -v -c "#{pane_current_path}"
# Pop up a list of windows and move the current pane to the selected window. Join will be vertical split with m
# and horizontal with M
bind-key m choose-window -F "#{window_index}: #{window_name}" "join-pane -h -t %%"
bind-key M choose-window -F "#{window_index}: #{window_name}" "join-pane -v -t %%"
## Start Tmux Nesting ##
# Used when sshing into something that is also using tmux.
# credit: https://gist.github.com/samoshkin/05e65f7f1c9b55d3fc7690b59d678734?permalink_comment_id=4616322#gistcomment-4616322
# When Passthrough Mode is active, the status bar will be pink and no prefix, ie normal tmux, will not work
# in the current terminal.
# Activate "Passthrough Mode".
# NOTE: M = Option on MacOS right now
bind -n M-o \
set prefix None \;\
set key-table off \;\
set status-style "fg=#ff5555,bg=#ff79c6"
# Disable "Passhthrough Mode"
bind -T off M-O \
set -u prefix \;\
set -u key-table \;\
set -u status-style
## End Tmux Nesting ##
#### DRACULA START 🦇 #######
# TODO: just grab the colours for this since it's harder to customize the status styles with this plugin enabled as it seems to override??
# use tpm to install the plugin
set -g @plugin 'dracula/tmux'
# Switch smiley
set -g @dracula-show-left-icon 🦇
set -g @dracula-synchronize-panes-label "Sync"
# Config right status
#set -g @dracula-show-fahrenheit false # Does not seem to work
set -g @dracula-plugins "battery network time"
#### DRACULA END 🦇 #######
## START PLUGINS ##
### TPM INSTRUCTIONS###
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin 'github_username/plugin_name#branch'
# set -g @plugin 'git@github.com:user/plugin'
# set -g @plugin 'git@bitbucket.com:user/plugin'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'
## END PLUGINS ##