-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.tmux.conf
More file actions
106 lines (80 loc) · 4.07 KB
/
Copy path.tmux.conf
File metadata and controls
106 lines (80 loc) · 4.07 KB
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
104
105
106
# tmux.conf
# True color support (required for catppuccin and other 24-bit themes)
set -g default-terminal "tmux-256color"
set -ga terminal-overrides ",*256col*:Tc"
# Use C-w as prefix since C-a conflicts with bash/zsh "got to beginning of line"
unbind C-a
set-option -g prefix C-w
bind-key C-w send-prefix
# split panes using | and -
bind \\ split-window -h
bind - split-window -v
unbind '"'
unbind %
bind r source-file ~/.tmux.conf \; display "Config reloaded"
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
# Allow repeated pressing of arrow keys to resize panes
bind-key -r -T prefix C-Up resize-pane -U
bind-key -r -T prefix C-Down resize-pane -D
bind-key -r -T prefix C-Left resize-pane -L
bind-key -r -T prefix C-Right resize-pane -R
# set -g mouse on
# set -g set-clipboard on
# stop escape key from triggering window navigation
set -s escape-time 1
# Switch windows using ctrl-shift-left and ctrl-shift-right
bind-key -n C-S-Right next-window
bind-key -n C-S-Left previous-window
set -g mouse on
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'"
bind -n WheelDownPane select-pane -t= \; send-keys -M
bind -n C-WheelUpPane select-pane -t= \; copy-mode -e \; send-keys -M
bind -T copy-mode-vi C-WheelUpPane send-keys -X halfpage-up
bind -T copy-mode-vi C-WheelDownPane send-keys -X halfpage-down
bind -T copy-mode-emacs C-WheelUpPane send-keys -X halfpage-up
bind -T copy-mode-emacs C-WheelDownPane send-keys -X halfpage-down
# To copy, left click and drag to highlight text in yellow,
# once you release left click yellow text will disappear and will
# automatically be available in clipboard
# # Use vim keybindings in copy mode
setw -g mode-keys vi
# Update default binding of `Enter` to also use copy-pipe
unbind -T copy-mode-vi Enter
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "xclip -selection c"
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -in -selection clipboard"
# Display the current working directory for each window in the status bar
# setw -g window-status-format "#I:#W #{s|$HOME|~|:pane_current_path}"
# setw -g window-status-current-format "#[fg=bold]#I:#W #{s|$HOME|~|:pane_current_path}#[default]"
#set -g status-bg black
#set -g status-fg grey
# Use basic style at the Linux console, rounded elsewhere
if-shell '[ "$TERM" = "linux" ]' \
'set -g @catppuccin_window_status_style "basic"' \
'set -g @catppuccin_window_status_style "rounded"'
# At the Linux console, mark the active window with * since true-color isn't available
if-shell '[ "$TERM" = "linux" ]' \
'set -g @catppuccin_window_current_text "#[bold,reverse]#W #{s|$HOME|~|:pane_current_path} *#[default]"' \
'set -g @catppuccin_window_current_text "#[fg=bold]#W #{s|$HOME|~|:pane_current_path}#[default]"'
# Replace Nerd Font glyph with plain * at the Linux console
if-shell '[ "$TERM" = "linux" ]' \
'set -g @catppuccin_window_flags_icon_current " *"' \
'set -g @catppuccin_window_flags_icon_current " "'
# At the Linux console use high-contrast white/black for current window
if-shell '[ "$TERM" = "linux" ]' \
'set -g @catppuccin_window_current_text_color "white"; set -g @catppuccin_window_current_number_color "white"'
set -g status-right-length 100
set -g status-left-length 100
set -g status-left ""
# set -ag status-right "#{E:@catppuccin_status_uptime}"
# Override inactive window text to show name + path
set -g @catppuccin_window_text "#W #{s|$HOME|~|:pane_current_path}"
# Ensure the 'directory' module is included in your status bar
# If you are using the default catppuccin configuration, it might already be there.
# If not, you can explicitly set your status modules:
set -g @catppuccin_status_modules_right "directory date_time" # Example right modules
set -g @catppuccin_status_modules_left "session" # Example left modules
# Load Catppuccin theme
run ~/.config/tmux/plugins/catppuccin/tmux/catppuccin.tmux