-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.tmux.conf
More file actions
108 lines (84 loc) · 4.61 KB
/
Copy path.tmux.conf
File metadata and controls
108 lines (84 loc) · 4.61 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
107
108
set -g prefix C-s
set -g default-terminal "screen-256color"
set -ga terminal-overrides ',xterm-256color:Tc'
# evil
set -g mouse on
set -gq allow-passthrough on
set -g visual-activity off
bind r source-file ~/.tmux.conf \; display-message "config reloaded"
set -g base-index 1
set -sg escape-time 0
# vim mode yay
setw -g mode-keys vi
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
# Use vim-style copy mode
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'y' send -X copy-selection-and-cancel
# status bar
set-option -g status-position top
set -g status-right '#[fg=color249]#(date +"%I:%M%p %m-%d-%Y")#[default]'
set -g automatic-rename on
setw -g automatic-rename on
# colors
# --- Status Bar ---
set-option -g status on
set-option -g status-bg colour0 # background = #000000
set-option -g status-fg colour7 # foreground = #d8cfc0
# Clock and Date on the right
set-option -g status-right '#[fg=colour8]#(date +"%I:%M %p %m-%d-%Y")#[default]'
# --- Active/Inactive Window Styling ---
set-window-option -g window-status-current-style 'fg=colour0,bg=colour11,bold'
set-window-option -g window-status-style 'fg=colour8,bg=colour0'
# --- Pane Borders ---
set-option -g pane-border-style 'fg=colour8' # inactive = #979086
set-option -g pane-active-border-style 'fg=colour6' # active = #CC8F8E
# --- Copy Mode ---
set-option -g mode-style 'fg=colour0,bg=colour11' # black on BC7181
# --- Message Styling (like prompts) ---
set-option -g message-style 'bg=colour0,fg=colour7'
set-option -g message-command-style 'bg=colour0,fg=colour7'
# --- Command Prompt ---
# set-option -g command-style 'bg=colour0,fg=colour7'
# keymaps
bind C-j display-popup -E "tmux list-sessions | sed -E 's/:.*$//' | grep -v \"^$(tmux display-message -p '#S')\$\" | fzf --reverse | xargs tmux switch-client -t"
bind d detach-client
bind-key C-n command-prompt -p "New session name:" "new-session -s '%%'"
bind d display-menu -T "#[align=centre]λ Systems menu λ" -x C -y C \
"λ htop" h "display-popup -w 70% -h 60% -d '#{pane_current_path}' -E 'htop'" \
"λ yazi" y "display-popup -w 80% -h 80% -d '#{pane_current_path}' -E 'yazi'" \
"λ Lazygit" g "display-popup -w 85% -h 75% -d '#{pane_current_path}' -E 'lazygit'" \
"λ Nitrogen" n "display-popup -w 85% -h 85% -d '#{pane_current_path}' -E 'nitrogen ~/Pictures'" \
"λ Git Diffs" d "display-popup -w 80% -h 70% -d '#{pane_current_path}' -E 'bash -c \"git diff | fzf; read\"'" \
"λ Watch Sensors" T "display-popup -w 70% -h 80% -d '#{pane_current_path}' -E 'watch -n 2 sensors'" \
"λ Floating Shell" x "display-popup -w 50% -h 50% -d '#{pane_current_path}' -E '\$SHELL'" \
"λ New Tmux Window" w "command-prompt -p 'Window name:' 'new-window -n %%'" \
"λ Fuzzy Find" f "display-popup -w 90% -h 80% -d '#{pane_current_path}' -E 'fzf'" \
"λ Exit" q ""
bind x display-menu -T "#[align=centre]λ Projects Menu λ" -x C -y C \
"λ Lazygit" g "display-popup -w 85% -h 75% -d '#{pane_current_path}' -E 'lazygit'" \
"λ Show Logs" l "display-popup -w 80% -h 60% -d '#{pane_current_path}' -E 'tail -f ./log.txt'" \
"λ Open Helix" e "display-popup -w 90% -h 90% -d '#{pane_current_path}' -E 'helix'" \
"λ Build Project" b "display-popup -w 50% -h 50% -d '#{pane_current_path}' -E 'bash -c \"cmake -S . -B build -G Ninja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON && cmake --build build; echo get out now...; read\"'" \
"λ Clean & Rebuild" B "display-popup -w 50% -h 50% -d '#{pane_current_path}' -E 'bash -c \"rm -rf build && cmake -S . -B build -G Ninja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON && cmake --build build; echo bleh bleh done...; read\"'" \
"λ Compile Project" r "display-popup -w 90% -h 80% -d '#{pane_current_path}' -E 'bash -c \"cd build; echo Press enter to close...; read\"'" \
"λ Shell Here" x "display-popup -w 60% -h 60% -d '#{pane_current_path}' -E '\$SHELL'" \
"λ Exit" q ""
set -g popup-border-lines yes
set -g popup-border-style 'fg=colour6'
# set -g popup-style 'bg=colour0,fg=colour7'
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'wfxr/tmux-fzf-url'
set -g @continuum-restore 'on'
set -g @resurrect-capture-pane-contents 'on'
set -g @yank_selection 'clipboard'
# init tmux proj. manager
run '~/.tmux/plugins/tpm/tpm'