@@ -301,12 +301,18 @@ load_modules() {
301301}
302302
303303main () {
304- local theme
305- theme=" $( get_tmux_option " @catppuccin_flavour" " mocha" ) "
306-
307304 # Aggregate all commands in one array
308305 local tmux_commands=()
309306
307+ # module directories
308+ local custom_path=" $( get_tmux_option " @catppuccin_custom_plugin_dir" " ${PLUGIN_DIR} /custom" ) "
309+ local modules_custom_path=$custom_path
310+ local modules_status_path=$PLUGIN_DIR /status
311+ local modules_window_path=$PLUGIN_DIR /window
312+ local modules_pane_path=$PLUGIN_DIR /pane
313+
314+ # load local theme
315+ local theme=" $( get_tmux_option " @catppuccin_flavour" " mocha" ) "
310316 # NOTE: Pulling in the selected theme by the theme that's being set as local
311317 # variables.
312318 # shellcheck source=catppuccin-frappe.tmuxtheme
@@ -321,23 +327,30 @@ main() {
321327 eval " local $key " =" $val "
322328 done < " ${PLUGIN_DIR} /catppuccin-${theme} .tmuxtheme"
323329
324- # module directories
325- local custom_path=" $( get_tmux_option " @catppuccin_custom_plugin_dir" " ${PLUGIN_DIR} /custom" ) "
326- local modules_custom_path=$custom_path
327- local modules_status_path=$PLUGIN_DIR /status
328- local modules_window_path=$PLUGIN_DIR /window
329- local modules_pane_path=$PLUGIN_DIR /pane
330-
331- # status
330+ # status general
332331 local status_default=$( get_tmux_option " @catppuccin_status_default" " on" )
333- local status_justify=$( get_tmux_option " @catppuccin_status_justify" " left" )
334-
335332 set status " $status_default "
333+
334+ local status_justify=$( get_tmux_option " @catppuccin_status_justify" " left" )
336335 set status-justify " $status_justify "
337- set status-bg " ${thm_bg} "
336+
337+ local status_background=$( get_tmux_option " @catppuccin_status_background" " theme" )
338+ if [ " ${status_background} " = " theme" ];
339+ then
340+ set status-bg " ${thm_bg} "
341+ else
342+ if [ " ${status_background} " = " default" ]
343+ then
344+ set status-style bg=default
345+ else
346+ set status-bg " ${status_background} "
347+ fi
348+ fi
349+
338350 set status-left-length " 100"
339351 set status-right-length " 100"
340352
353+
341354 # messages
342355 set message-style " fg=${thm_cyan} ,bg=${thm_gray} ,align=centre"
343356 set message-command-style " fg=${thm_cyan} ,bg=${thm_gray} ,align=centre"
@@ -361,43 +374,41 @@ main() {
361374 setw pane-border-style " $pane_border_style "
362375 setw pane-border-format " $pane_format "
363376
377+ # window
378+ local window_status_separator=$( get_tmux_option " @catppuccin_window_separator" " " )
379+ setw window-status-separator " $window_status_separator "
364380
365- # windows
366381 setw window-status-activity-style " fg=${thm_fg} ,bg=${thm_bg} ,none"
367- setw window-status-separator " "
368382 setw window-status-style " fg=${thm_fg} ,bg=${thm_bg} ,none"
369383
370- # --------=== Statusline
371-
372384 local window_left_separator=$( get_tmux_option " @catppuccin_window_left_separator" " █" )
373385 local window_right_separator=$( get_tmux_option " @catppuccin_window_right_separator" " █" )
374386 local window_middle_separator=$( get_tmux_option " @catppuccin_window_middle_separator" " █ " )
375387 local window_number_position=$( get_tmux_option " @catppuccin_window_number_position" " left" ) # right, left
376388 local window_status_enable=$( get_tmux_option " @catppuccin_window_status_enable" " no" ) # right, left
377389
378390 local window_format=$( load_modules " window_default_format" " $modules_custom_path " " $modules_window_path " )
379- local window_current_format=$( load_modules " window_current_format" " $modules_custom_path " " $modules_window_path " )
380-
381391 setw window-status-format " $window_format "
392+
393+ local window_current_format=$( load_modules " window_current_format" " $modules_custom_path " " $modules_window_path " )
382394 setw window-status-current-format " $window_current_format "
383395
396+ # status module
384397 local status_left_separator=$( get_tmux_option " @catppuccin_status_left_separator" " " )
385398 local status_right_separator=$( get_tmux_option " @catppuccin_status_right_separator" " █" )
386399 local status_right_separator_inverse=$( get_tmux_option " @catppuccin_status_right_separator_inverse" " no" )
387400 local status_connect_separator=$( get_tmux_option " @catppuccin_status_connect_separator" " yes" )
388401 local status_fill=$( get_tmux_option " @catppuccin_status_fill" " icon" )
389402
390- local status_modules_right=$( get_tmux_option " @catppuccin_status_modules_right" " application session" )
391- local loaded_modules_right=$( load_modules " $status_modules_right " " $modules_custom_path " " $modules_status_path " )
392-
393403 local status_modules_left=$( get_tmux_option " @catppuccin_status_modules_left" " " )
394404 local loaded_modules_left=$( load_modules " $status_modules_left " " $modules_custom_path " " $modules_status_path " )
395-
396405 set status-left " $loaded_modules_left "
406+
407+ local status_modules_right=$( get_tmux_option " @catppuccin_status_modules_right" " application session" )
408+ local loaded_modules_right=$( load_modules " $status_modules_right " " $modules_custom_path " " $modules_status_path " )
397409 set status-right " $loaded_modules_right "
398410
399- # --------=== Modes
400- #
411+ # modes
401412 setw clock-mode-colour " ${thm_blue} "
402413 setw mode-style " fg=${thm_pink} bg=${thm_black4} bold"
403414
0 commit comments