-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.norg
125 lines (86 loc) · 3.34 KB
/
tmux.norg
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
@document.meta
title: tmux config
description:
authors: jan
categories:
created: 2023-05-18
updated: 2023-05-18
version: 1.1.1
tangle: ./generated/tmux/tmux.conf
@end
* TODO
Some stuff I should look into:
- ( ) [Better tmux status bar]{https://www.youtube.com/watch?v=ceRYL271cao}
- ( ) [Tokyonight theme for tmux]{https://github.com/fabioluciano/tmux-tokyo-night}
* Keybindings
** Prefix key
Use `ctrl-s` instead of the default `ctrl-b`.
@code tmux
set -g prefix C-s
@end
** Vim pane navigation
Allows switching between panes like in vim.
@code tmux
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
@end
** Reload key
Allows dynamically reloading the tmux config.
@code tmux
unbind r
bind r source-file ~/.config/tmux/tmux.conf
@end
* Misc
** Vim related settings
`:checkhealth` in neovim wanted these settings.
@code tmux
set-option -g focus-events on
set-option -sg escape-time 10
@end
** Use fish as default shell
Somehow wsl did use bash here.
@code tmux
set -g default-shell /usr/bin/fish
@end
** Enable truecolor support
For more info see [This Site]{https://gist.github.com/andersevenrud/015e61af2fd264371032763d4ed965b6}
@code tmux
set -g default-terminal "tmux-256color"
set -ag terminal-overrides ",xterm-256color:RGB"
@end
** Tokyonight color scheme
Use also tokyonight for tmux.
Taken from {https://github.com/folke/tokyonight.nvim/blob/main/extras/tmux/tokyonight_storm.tmux}
@code tmux
# TokyoNight colors for Tmux
set -g mode-style "fg=#7aa2f7,bg=#3b4261"
set -g message-style "fg=#7aa2f7,bg=#3b4261"
set -g message-command-style "fg=#7aa2f7,bg=#3b4261"
set -g pane-border-style "fg=#3b4261"
set -g pane-active-border-style "fg=#7aa2f7"
set -g status "on"
set -g status-justify "left"
set -g status-style "fg=#7aa2f7,bg=#1f2335"
set -g status-left-length "100"
set -g status-right-length "100"
set -g status-left-style NONE
set -g status-right-style NONE
set -g status-left "#[fg=#1d202f,bg=#7aa2f7,bold] #S #[fg=#7aa2f7,bg=#1f2335,nobold,nounderscore,noitalics]"
set -g status-right "#[fg=#1f2335,bg=#1f2335,nobold,nounderscore,noitalics]#[fg=#7aa2f7,bg=#1f2335] #{prefix_highlight} #[fg=#3b4261,bg=#1f2335,nobold,nounderscore,noitalics]#[fg=#7aa2f7,bg=#3b4261] %Y-%m-%d %I:%M %p #[fg=#7aa2f7,bg=#3b4261,nobold,nounderscore,noitalics]#[fg=#1d202f,bg=#7aa2f7,bold] #h "
setw -g window-status-activity-style "underscore,fg=#a9b1d6,bg=#1f2335"
setw -g window-status-separator ""
setw -g window-status-style "NONE,fg=#a9b1d6,bg=#1f2335"
setw -g window-status-format "#[fg=#1f2335,bg=#1f2335,nobold,nounderscore,noitalics]#[default] #I #W #F #[fg=#1f2335,bg=#1f2335,nobold,nounderscore,noitalics]"
setw -g window-status-current-format "#[fg=#1f2335,bg=#3b4261,nobold,nounderscore,noitalics]#[fg=#7aa2f7,bg=#3b4261,bold] #I #W #F #[fg=#3b4261,bg=#1f2335,nobold,nounderscore,noitalics]"
# tmux-plugins/tmux-prefix-highlight support
set -g @prefix_highlight_output_prefix "#[fg=#e0af68]#[bg=#1f2335]#[fg=#1f2335]#[bg=#e0af68]"
set -g @prefix_highlight_output_suffix ""
@end
** Status bar position
Put status bar to the top.
@code tmux
set-option -g status-position top
@end