@@ -8,44 +8,42 @@ source $current_dir/utils.sh
8
8
main ()
9
9
{
10
10
# set configuration option variables
11
- show_kubernetes_context_label=$( get_tmux_option " @dracula-kubernetes-context-label" " " )
12
- eks_hide_arn=$( get_tmux_option " @dracula-kubernetes-eks-hide-arn" false)
13
- eks_extract_account=$( get_tmux_option " @dracula-kubernetes-eks-extract-account" false)
14
- hide_kubernetes_user=$( get_tmux_option " @dracula-kubernetes-hide-user" false)
15
- terraform_label=$( get_tmux_option " @dracula-terraform-label" " " )
16
- show_fahrenheit=$( get_tmux_option " @dracula-show-fahrenheit" true)
17
- show_location=$( get_tmux_option " @dracula-show-location" true)
18
- fixed_location=$( get_tmux_option " @dracula-fixed-location" )
19
- show_powerline=$( get_tmux_option " @dracula-show-powerline" false)
20
- show_flags=$( get_tmux_option " @dracula-show-flags" false)
21
- show_left_icon=$( get_tmux_option " @dracula-show-left-icon" smiley)
22
- show_left_icon_padding=$( get_tmux_option " @dracula-left-icon-padding" 1)
23
- show_military=$( get_tmux_option " @dracula-military-time" false)
24
- timezone=$( get_tmux_option " @dracula-set-timezone" " " )
25
- show_timezone=$( get_tmux_option " @dracula-show-timezone" true)
26
- show_left_sep=$( get_tmux_option " @dracula-show-left-sep" )
27
- show_right_sep=$( get_tmux_option " @dracula-show-right-sep" )
28
- show_border_contrast=$( get_tmux_option " @dracula-border-contrast" false)
29
- show_day_month=$( get_tmux_option " @dracula-day-month" false)
30
- show_refresh=$( get_tmux_option " @dracula-refresh-rate" 5)
31
- show_synchronize_panes_label=$( get_tmux_option " @dracula-synchronize-panes-label" " Sync" )
32
- time_format=$( get_tmux_option " @dracula-time-format" " " )
33
- show_ssh_session_port=$( get_tmux_option " @dracula-show-ssh-session-port" false)
34
- IFS=' ' read -r -a plugins <<< $( get_tmux_option " @dracula-plugins" " battery network weather" )
35
- show_empty_plugins=$( get_tmux_option " @dracula-show-empty-plugins" true)
36
-
37
- # Dracula Color Pallette
38
- white=' #f8f8f2'
39
- gray=' #44475a'
40
- dark_gray=' #282a36'
41
- light_purple=' #bd93f9'
42
- dark_purple=' #6272a4'
43
- cyan=' #8be9fd'
44
- green=' #50fa7b'
45
- orange=' #ffb86c'
46
- red=' #ff5555'
47
- pink=' #ff79c6'
48
- yellow=' #f1fa8c'
11
+ show_kubernetes_context_label=$( get_tmux_option " @monokai-kubernetes-context-label" " " )
12
+ eks_hide_arn=$( get_tmux_option " @monokai-kubernetes-eks-hide-arn" false)
13
+ eks_extract_account=$( get_tmux_option " @monokai-kubernetes-eks-extract-account" false)
14
+ hide_kubernetes_user=$( get_tmux_option " @monokai-kubernetes-hide-user" false)
15
+ terraform_label=$( get_tmux_option " @monokai-terraform-label" " " )
16
+ show_fahrenheit=$( get_tmux_option " @monokai-show-fahrenheit" true)
17
+ show_location=$( get_tmux_option " @monokai-show-location" true)
18
+ fixed_location=$( get_tmux_option " @monokai-fixed-location" )
19
+ show_powerline=$( get_tmux_option " @monokai-show-powerline" true)
20
+ show_flags=$( get_tmux_option " @monokai-show-flags" false)
21
+ show_left_icon=$( get_tmux_option " @monokai-show-left-icon" session)
22
+ show_left_icon_padding=$( get_tmux_option " @monokai-left-icon-padding" 0)
23
+ show_military=$( get_tmux_option " @monokai-military-time" false)
24
+ timezone=$( get_tmux_option " @monokai-set-timezone" " " )
25
+ show_timezone=$( get_tmux_option " @monokai-show-timezone" true)
26
+ show_left_sep=$( get_tmux_option " @monokai-show-left-sep" )
27
+ show_right_sep=$( get_tmux_option " @monokai-show-right-sep" )
28
+ show_border_contrast=$( get_tmux_option " @monokai-border-contrast" false)
29
+ show_day_month=$( get_tmux_option " @monokai-day-month" false)
30
+ show_refresh=$( get_tmux_option " @monokai-refresh-rate" 5)
31
+ show_synchronize_panes_label=$( get_tmux_option " @monokai-synchronize-panes-label" " Sync" )
32
+ time_format=$( get_tmux_option " @monokai-time-format" " " )
33
+ show_ssh_session_port=$( get_tmux_option " @monokai-show-ssh-session-port" false)
34
+ IFS=' ' read -r -a plugins <<< $( get_tmux_option " @monokai-plugins" " network-ping cpu-usage ram-usage" )
35
+ show_empty_plugins=$( get_tmux_option " @monokai-show-empty-plugins" true)
36
+
37
+ # Monokai Pro Color Pallette
38
+ white=' #fcfcfa'
39
+ black=' #2d2a2e'
40
+ gray=' #727072'
41
+ red=' #ff6188'
42
+ green=' #a9dc76'
43
+ yellow=' #ffd866'
44
+ blue=' #78dce8'
45
+ magenta=' #fc9867'
46
+ cyan=' #ab9df2'
49
47
50
48
# Handle left icon configuration
51
49
case $show_left_icon in
@@ -76,6 +74,11 @@ main()
76
74
left_sep=" $show_left_sep "
77
75
fi
78
76
77
+ # start weather script in background
78
+ if [[ " ${plugins[@]} " =~ " weather" ]]; then
79
+ $current_dir /sleep_weather.sh $show_fahrenheit $show_location $fixed_location &
80
+ fi
81
+
79
82
# Set timezone unless hidden by configuration
80
83
if [[ -z " $timezone " ]]; then
81
84
case $show_timezone in
91
94
flags=" "
92
95
current_flags=" " ;;
93
96
true)
94
- flags=" #{?window_flags,#[fg=${dark_purple } ]#{window_flags},}"
95
- current_flags=" #{?window_flags,#[fg=${light_purple } ]#{window_flags},}"
97
+ flags=" #{?window_flags,#[fg=${cyan } ]#{window_flags},}"
98
+ current_flags=" #{?window_flags,#[fg=${cyan } ]#{window_flags},}"
96
99
esac
97
100
98
101
# sets refresh interval to every 5 seconds
@@ -111,9 +114,9 @@ main()
111
114
112
115
# pane border styling
113
116
if $show_border_contrast ; then
114
- tmux set-option -g pane-active-border-style " fg=${light_purple } "
117
+ tmux set-option -g pane-active-border-style " fg=${green } "
115
118
else
116
- tmux set-option -g pane-active-border-style " fg=${dark_purple } "
119
+ tmux set-option -g pane-active-border-style " fg=${green } "
117
120
fi
118
121
tmux set-option -g pane-border-style " fg=${gray} "
119
122
@@ -125,10 +128,10 @@ main()
125
128
126
129
# Status left
127
130
if $show_powerline ; then
128
- tmux set-option -g status-left " #[bg=${green} ,fg=${dark_gray} ]#{?client_prefix,#[bg=${yellow } ],} ${left_icon} #[fg=${green} ,bg=${gray} ]#{?client_prefix,#[fg=${yellow } ],}${left_sep} "
131
+ tmux set-option -g status-left " #[fg= ${green} , bg=${black} ]#{?client_prefix,#[fg= ${magenta} ],}#[bg= ${ green} ,fg=${black} ,bold ]#{?client_prefix,#[bg=${magenta } ],} ${left_icon} #[fg=${green} ,bg=${gray} ]#{?client_prefix,#[fg=${magenta } ],}${left_sep} "
129
132
powerbg=${gray}
130
133
else
131
- tmux set-option -g status-left " #[bg=${green} ,fg=${dark_gray} ]#{?client_prefix,#[bg=${yellow } ],} ${left_icon} "
134
+ tmux set-option -g status-left " #[bg=${green} ,fg=${black} ,bold ]#{?client_prefix,#[bg=${magenta } ],} ${left_icon} "
132
135
fi
133
136
134
137
# Status right
@@ -139,113 +142,113 @@ main()
139
142
if case $plugin in custom:* ) true ;; * ) false ;; esac ; then
140
143
script=${plugin# " custom:" }
141
144
if [[ -x " ${current_dir} /${script} " ]]; then
142
- IFS=' ' read -r -a colors <<< $( get_tmux_option " @dracula -custom-plugin-colors" " cyan dark_gray " )
145
+ IFS=' ' read -r -a colors <<< $( get_tmux_option " @monokai -custom-plugin-colors" " blue black " )
143
146
script=" #($current_dir /${script} )"
144
147
else
145
148
colors[0]=" red"
146
- colors[1]=" dark_gray "
149
+ colors[1]=" black "
147
150
script=" ${script} not found!"
148
151
fi
149
152
150
153
elif [ $plugin = " cwd" ]; then
151
- IFS=' ' read -r -a colors <<< $( get_tmux_option " @dracula -cwd-colors" " dark_gray white" )
154
+ IFS=' ' read -r -a colors <<< $( get_tmux_option " @monokai -cwd-colors" " dark_gray white" )
152
155
tmux set-option -g status-right-length 250
153
156
script=" #($current_dir /cwd.sh)"
154
157
155
158
elif [ $plugin = " fossil" ]; then
156
- IFS=' ' read -r -a colors <<< $( get_tmux_option " @dracula -fossil-colors" " green dark_gray " )
159
+ IFS=' ' read -r -a colors <<< $( get_tmux_option " @monokai -fossil-colors" " green black " )
157
160
tmux set-option -g status-right-length 250
158
161
script=" #($current_dir /fossil.sh)"
159
162
160
163
elif [ $plugin = " git" ]; then
161
- IFS=' ' read -r -a colors <<< $( get_tmux_option " @dracula -git-colors" " green dark_gray " )
164
+ IFS=' ' read -r -a colors <<< $( get_tmux_option " @monokai -git-colors" " green black " )
162
165
tmux set-option -g status-right-length 250
163
166
script=" #($current_dir /git.sh)"
164
167
165
168
elif [ $plugin = " hg" ]; then
166
- IFS=' ' read -r -a colors <<< $( get_tmux_option " @dracula -hg-colors" " green dark_gray " )
169
+ IFS=' ' read -r -a colors <<< $( get_tmux_option " @monokai -hg-colors" " green black " )
167
170
tmux set-option -g status-right-length 250
168
171
script=" #($current_dir /hg.sh)"
169
172
170
173
elif [ $plugin = " battery" ]; then
171
- IFS=' ' read -r -a colors <<< $( get_tmux_option " @dracula -battery-colors" " pink dark_gray " )
174
+ IFS=' ' read -r -a colors <<< $( get_tmux_option " @monokai -battery-colors" " red black " )
172
175
script=" #($current_dir /battery.sh)"
173
176
174
177
elif [ $plugin = " gpu-usage" ]; then
175
- IFS=' ' read -r -a colors <<< $( get_tmux_option " @dracula -gpu-usage-colors" " pink dark_gray " )
178
+ IFS=' ' read -r -a colors <<< $( get_tmux_option " @monokai -gpu-usage-colors" " red black " )
176
179
script=" #($current_dir /gpu_usage.sh)"
177
180
178
181
elif [ $plugin = " gpu-ram-usage" ]; then
179
- IFS=' ' read -r -a colors <<< $( get_tmux_option " @dracula -gpu-ram-usage-colors" " cyan dark_gray " )
182
+ IFS=' ' read -r -a colors <<< $( get_tmux_option " @monokai -gpu-ram-usage-colors" " blue black " )
180
183
script=" #($current_dir /gpu_ram_info.sh)"
181
184
182
185
elif [ $plugin = " gpu-power-draw" ]; then
183
- IFS=' ' read -r -a colors <<< $( get_tmux_option " @dracula -gpu-power-draw-colors" " green dark_gray " )
186
+ IFS=' ' read -r -a colors <<< $( get_tmux_option " @monokai -gpu-power-draw-colors" " green black " )
184
187
script=" #($current_dir /gpu_power.sh)"
185
188
186
189
elif [ $plugin = " cpu-usage" ]; then
187
- IFS=' ' read -r -a colors <<< $( get_tmux_option " @dracula -cpu-usage-colors" " orange dark_gray " )
190
+ IFS=' ' read -r -a colors <<< $( get_tmux_option " @monokai -cpu-usage-colors" " magenta black " )
188
191
script=" #($current_dir /cpu_info.sh)"
189
192
190
193
elif [ $plugin = " ram-usage" ]; then
191
- IFS=' ' read -r -a colors <<< $( get_tmux_option " @dracula -ram-usage-colors" " cyan dark_gray " )
194
+ IFS=' ' read -r -a colors <<< $( get_tmux_option " @monokai -ram-usage-colors" " yellow black " )
192
195
script=" #($current_dir /ram_info.sh)"
193
196
194
197
elif [ $plugin = " tmux-ram-usage" ]; then
195
- IFS=' ' read -r -a colors <<< $( get_tmux_option " @dracula -tmux-ram-usage-colors" " cyan dark_gray " )
198
+ IFS=' ' read -r -a colors <<< $( get_tmux_option " @monokai -tmux-ram-usage-colors" " yellow black " )
196
199
script=" #($current_dir /tmux_ram_info.sh)"
197
200
198
201
elif [ $plugin = " network" ]; then
199
- IFS=' ' read -r -a colors <<< $( get_tmux_option " @dracula -network-colors" " cyan dark_gray " )
202
+ IFS=' ' read -r -a colors <<< $( get_tmux_option " @monokai -network-colors" " blue black " )
200
203
script=" #($current_dir /network.sh)"
201
204
202
205
elif [ $plugin = " network-bandwidth" ]; then
203
- IFS=' ' read -r -a colors <<< $( get_tmux_option " @dracula -network-bandwidth-colors" " cyan dark_gray " )
206
+ IFS=' ' read -r -a colors <<< $( get_tmux_option " @monokai -network-bandwidth-colors" " blue black " )
204
207
tmux set-option -g status-right-length 250
205
208
script=" #($current_dir /network_bandwidth.sh)"
206
209
207
210
elif [ $plugin = " network-ping" ]; then
208
- IFS=' ' read -r -a colors <<< $( get_tmux_option " @dracula -network-ping-colors" " cyan dark_gray " )
211
+ IFS=' ' read -r -a colors <<< $( get_tmux_option " @monokai -network-ping-colors" " gray white " )
209
212
script=" #($current_dir /network_ping.sh)"
210
213
211
214
elif [ $plugin = " network-vpn" ]; then
212
- IFS=' ' read -r -a colors <<< $( get_tmux_option " @dracula -network-vpn-colors" " cyan dark_gray " )
215
+ IFS=' ' read -r -a colors <<< $( get_tmux_option " @monokai -network-vpn-colors" " blue black " )
213
216
script=" #($current_dir /network_vpn.sh)"
214
217
215
218
elif [ $plugin = " attached-clients" ]; then
216
- IFS=' ' read -r -a colors <<< $( get_tmux_option " @dracula -attached-clients-colors" " cyan dark_gray " )
219
+ IFS=' ' read -r -a colors <<< $( get_tmux_option " @monokai -attached-clients-colors" " blue black " )
217
220
script=" #($current_dir /attached_clients.sh)"
218
221
219
222
elif [ $plugin = " mpc" ]; then
220
- IFS=' ' read -r -a colors <<< $( get_tmux_option " @dracula -mpc-colors" " green dark_gray " )
223
+ IFS=' ' read -r -a colors <<< $( get_tmux_option " @monokai -mpc-colors" " green black " )
221
224
script=" #($current_dir /mpc.sh)"
222
225
223
226
elif [ $plugin = " spotify-tui" ]; then
224
- IFS=' ' read -r -a colors <<< $( get_tmux_option " @dracula -spotify-tui-colors" " green dark_gray " )
227
+ IFS=' ' read -r -a colors <<< $( get_tmux_option " @monokai -spotify-tui-colors" " green black " )
225
228
script=" #($current_dir /spotify-tui.sh)"
226
229
227
230
elif [ $plugin = " playerctl" ]; then
228
- IFS=' ' read -r -a colors <<< $( get_tmux_option " @dracula -playerctl-colors" " green dark_gray " )
231
+ IFS=' ' read -r -a colors <<< $( get_tmux_option " @monokai -playerctl-colors" " green black " )
229
232
script=" #($current_dir /playerctl.sh)"
230
233
231
234
elif [ $plugin = " kubernetes-context" ]; then
232
- IFS=' ' read -r -a colors <<< $( get_tmux_option " @dracula -kubernetes-context-colors" " cyan dark_gray " )
235
+ IFS=' ' read -r -a colors <<< $( get_tmux_option " @monokai -kubernetes-context-colors" " blue black " )
233
236
script=" #($current_dir /kubernetes_context.sh $eks_hide_arn $eks_extract_account $hide_kubernetes_user $show_kubernetes_context_label )"
234
237
235
238
elif [ $plugin = " terraform" ]; then
236
- IFS=' ' read -r -a colors <<< $( get_tmux_option " @dracula -terraform-colors" " light_purple dark_gray " )
239
+ IFS=' ' read -r -a colors <<< $( get_tmux_option " @monokai -terraform-colors" " blue black " )
237
240
script=" #($current_dir /terraform.sh $terraform_label )"
238
241
239
242
elif [ $plugin = " continuum" ]; then
240
- IFS=' ' read -r -a colors <<< $( get_tmux_option " @dracula -continuum-colors" " cyan dark_gray " )
243
+ IFS=' ' read -r -a colors <<< $( get_tmux_option " @monokai -continuum-colors" " blue black " )
241
244
script=" #($current_dir /continuum.sh)"
242
245
243
246
elif [ $plugin = " weather" ]; then
244
- IFS=' ' read -r -a colors <<< $( get_tmux_option " @dracula -weather-colors" " orange dark_gray " )
247
+ IFS=' ' read -r -a colors <<< $( get_tmux_option " @monokai -weather-colors" " magenta black " )
245
248
script=" #($current_dir /weather_wrapper.sh $show_fahrenheit $show_location '$fixed_location ')"
246
249
247
250
elif [ $plugin = " time" ]; then
248
- IFS=' ' read -r -a colors <<< $( get_tmux_option " @dracula -time-colors" " dark_purple white" )
251
+ IFS=' ' read -r -a colors <<< $( get_tmux_option " @monokai -time-colors" " green white" )
249
252
if [ -n " $time_format " ]; then
250
253
script=${time_format}
251
254
else
@@ -259,12 +262,13 @@ main()
259
262
script=" %a %m/%d %I:%M %p ${timezone} "
260
263
fi
261
264
fi
265
+
262
266
elif [ $plugin = " synchronize-panes" ]; then
263
- IFS=' ' read -r -a colors <<< $( get_tmux_option " @dracula -synchronize-panes-colors" " cyan dark_gray " )
267
+ IFS=' ' read -r -a colors <<< $( get_tmux_option " @monokai -synchronize-panes-colors" " blue black " )
264
268
script=" #($current_dir /synchronize_panes.sh $show_synchronize_panes_label )"
265
269
266
270
elif [ $plugin = " ssh-session" ]; then
267
- IFS=' ' read -r -a colors <<< $( get_tmux_option " @dracula -ssh-session-colors" " green dark_gray " )
271
+ IFS=' ' read -r -a colors <<< $( get_tmux_option " @monokai -ssh-session-colors" " green black " )
268
272
script=" #($current_dir /ssh_session.sh $show_ssh_session_port )"
269
273
270
274
else
@@ -287,16 +291,23 @@ main()
287
291
fi
288
292
done
289
293
294
+ if $show_powerline ; then
295
+ tmux set-option -ga status-right " #[fg=${green} ,bg=${yellow} ]${right_sep} #[bg=${green} ,fg=${black} ,bold] #h #[bg=${black} ,fg=${green} ]"
296
+ else
297
+ tmux set-option -ga status-right " #[fg=${green} ,bg=${blue} ]${right_sep} #[bg=${green} ,fg=${black} ,bold] #h "
298
+ fi
299
+
290
300
# Window option
291
301
if $show_powerline ; then
292
- tmux set-window-option -g window-status-current-format " #[fg =${gray} ,bg =${dark_purple } ]${left_sep} #[fg=${white } ,bg=${dark_purple} ] #I #W${current_flags} #[fg =${dark_purple} ,bg =${gray } ]${left_sep} "
302
+ tmux set-window-option -g window-status-current-format " #[bg =${white} ,fg =${gray } ]${left_sep} #[fg=${black } ,bg=${white} ] #I #W${current_flags} #[bg =${gray} ,fg =${white } ]${left_sep} "
293
303
else
294
- tmux set-window-option -g window-status-current-format " #[fg=${white } ,bg=${dark_purple } ] #I #W${current_flags} "
304
+ tmux set-window-option -g window-status-current-format " #[fg=${gray } ,bg=${white } ] #I #W${current_flags} "
295
305
fi
296
306
297
- tmux set-window-option -g window-status-format " #[fg=${white} ]#[ bg=${gray} ] #I #W${flags} "
307
+ tmux set-window-option -g window-status-format " #[bg= ${gray} , fg=${gray} ] ${left_sep} #[fg= ${white} , bg=${gray} ]#I #W${flags} #[bg= ${gray} ,fg= ${gray} ] ${left_sep }"
298
308
tmux set-window-option -g window-status-activity-style " bold"
299
309
tmux set-window-option -g window-status-bell-style " bold"
310
+ tmux set-window-option -g window-status-separator " "
300
311
}
301
312
302
313
# run main function
0 commit comments