-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdreknix.tmux.conf
116 lines (92 loc) · 3.78 KB
/
dreknix.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
104
105
106
107
108
109
110
111
112
113
114
115
116
### configure Tmux Plugin Manager
set-environment -gF TMUX_PLUGIN_MANAGER_PATH '#{HOME}/.tmux/plugins/'
if 'test ! -d "${TMUX_PLUGIN_MANAGER_PATH}/tpm"' {
run 'mkdir -p "${TMUX_PLUGIN_MANAGER_PATH}"'
run 'git clone https://github.com/tmux-plugins/tpm "${TMUX_PLUGIN_MANAGER_PATH}/tpm"'
run '${TMUX_PLUGIN_MANAGER_PATH}/tpm/bin/install_plugins'
}
set -g @plugin 'tmux-plugins/tpm'
#
# basic plugins
set -g @plugin 'tmux-plugins/tmux-yank'
#
# theme / style
set -g @plugin 'catppuccin/tmux'
set -g @plugin 'joshmedeski/tmux-nerd-font-window-name'
set -g @plugin 'alexwforsythe/tmux-which-key' # prefix + space
set -g @plugin 'tmux-plugins/tmux-cpu'
set -g @plugin 'tmux-plugins/tmux-battery'
set -g @plugin 'dreknix/tmux-primary-ip'
#
# tooling
set -g @plugin 'omerxx/tmux-sessionx' # prefix + o
### configure plugins
### https://github.com/catppuccin/tmux
set -g @catppuccin_flavor 'mocha'
set -g @catppuccin_window_status_style 'rounded'
set -g @catppuccin_window_number_position 'right'
set -g @catppuccin_window_status 'no'
set -g @catppuccin_window_default_text '#W'
set -g @catppuccin_window_current_fill 'number'
set -g @catppuccin_window_current_text '#W'
set -g @catppuccin_window_current_color '#{E:@thm_surface_2}'
set -g @catppuccin_date_time_text '%d.%m. %H:%M'
set -g @catppuccin_status_module_text_bg '#{E:@thm_mantle}'
# source the plugin here
run '#{TMUX_PLUGIN_MANAGER_PATH}/tmux/catppuccin.tmux'
# load custom moudules
#source -F '#{d:current_file}/custom_modules/ctp_cpu.conf'
#ctp_cpu.conf Content
%hidden MODULE_NAME="ctp_cpu"
set -gq '@cpu_low_bg_color' '#{E:@thm_green}'
set -gq '@cpu_medium_bg_color' '#{E:@thm_yellow}'
set -gq '@cpu_high_bg_color' '#{E:@thm_red}'
set -ogq "@catppuccin_${MODULE_NAME}_icon" ' '
set -ogq "@catppuccin_${MODULE_NAME}_color" '#{l:#{cpu_bg_color}}'
set -ogq "@catppuccin_${MODULE_NAME}_text" '#{l:#{cpu_percentage}}'
#source -F '#{TMUX_PLUGIN_MANAGER_PATH}/tmux/utils/status_module.conf'
#source -F '#{d:current_file}/custom_modules/ctp_memory.conf'
# ctp_memory.conf Content
%hidden MODULE_NAME='ctp_memory'
set -gq '@ram_low_bg_color' '#{E:@thm_green}'
set -gq '@ram_medium_bg_color' '#{E:@thm_yellow}'
set -gq '@ram_high_bg_color' '#{E:@thm_red}'
set -ogq "@catppuccin_${MODULE_NAME}_icon" ' '
set -ogq "@catppuccin_${MODULE_NAME}_color" '#{l:#{ram_bg_color}}'
set -ogq "@catppuccin_${MODULE_NAME}_text" '#{l:#{ram_percentage}}'
#source -F '#{TMUX_PLUGIN_MANAGER_PATH}/tmux/utils/status_module.conf'
#source -F '#{d:current_file}/custom_modules/primary_ip.conf'
# primary_ip.conf Content
%hidden MODULE_NAME='primary_ip'
set -ogq "@catppuccin_${MODULE_NAME}_icon" '#{l:#{primary_ip_icon}} '
set -ogqF "@catppuccin_${MODULE_NAME}_color" '#{E:@thm_lavender}'
set -ogq "@catppuccin_${MODULE_NAME}_text" '#{l:#{primary_ip}}'
source -F '#{TMUX_PLUGIN_MANAGER_PATH}/tmux/utils/status_module.conf'
# set left and right status bar
set -g allow-rename off
set -g status-position top
set -g status-interval 5
set -g status-left-length 100
set -g status-right-length 100
set -g status-left '#{E:@catppuccin_status_session} '
set -gF status-right '#{E:@catppuccin_status_primary_ip}'
set -agF status-right '#{E:@catppuccin_status_ctp_cpu}'
set -agF status-right '#{E:@catppuccin_status_ctp_memory}'
if 'test -r /sys/class/power_supply/BAT*' {
set -agF status-right '#{E:@catppuccin_status_battery}'
}
set -ag status-right '#{E:@catppuccin_status_date_time}'
### general config
# set ctrl-a as second prefix
set -g prefix2 C-a
bind C-a send-prefix -2
# start index at 1
set -g base-index 1
set -g pane-base-index 1
# renumber when window is closed
set -g renumber-window on
# enable 256-colors
set -g default-terminal 'screen-256color'
set -ag terminal-overrides ',xterm-256color*:RGB'
# initialize tmux plugin manager and source all plugins
run '#{TMUX_PLUGIN_MANAGER_PATH}/tpm/tpm'