
This is the start of plumbing things through into the theme files, but I do think that there is a better way here. I'm open to suggestions and will probably ask for some help in the Discord for Catppuccin.
80 lines
2.6 KiB
Bash
Executable file
80 lines
2.6 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
# NOTE: you can use vars with $<var> and ${<var>} as long as the str is double quoted: ""
|
|
# WARNING: hex colors can't contain capital letters
|
|
|
|
# --> Catppuccin (Mocha)
|
|
thm_bg="#1e1e2e"
|
|
thm_fg="#cdd6f4"
|
|
thm_cyan="#89dceb"
|
|
thm_black="#181825"
|
|
thm_gray="#313244"
|
|
thm_magenta="#cba6f7"
|
|
thm_pink="#f5c2e7"
|
|
thm_red="#f38ba8"
|
|
thm_green="#a6e3a1"
|
|
thm_yellow="#f9e2af"
|
|
thm_blue="#89b4fa"
|
|
thm_orange="#fab387"
|
|
thm_black4="#585b70"
|
|
|
|
# ----------------------------=== Theme ===--------------------------
|
|
|
|
# utils
|
|
set() {
|
|
local option=$1
|
|
local value=$2
|
|
tmux set-option -gq "$option" "$value"
|
|
}
|
|
|
|
setw() {
|
|
local option=$1
|
|
local value=$2
|
|
tmux set-window-option -gq "$option" "$value"
|
|
}
|
|
|
|
# status
|
|
set status "on"
|
|
set status-bg "${thm_bg}"
|
|
set status-justify "left"
|
|
set status-left-length "100"
|
|
set status-right-length "100"
|
|
|
|
# messages
|
|
set message-style "fg=${thm_cyan},bg=${thm_gray},align=centre"
|
|
set message-command-style "fg=${thm_cyan},bg=${thm_gray},align=centre"
|
|
|
|
# panes
|
|
set pane-border-style "fg=${thm_gray}"
|
|
set pane-active-border-style "fg=${thm_blue}"
|
|
|
|
# windows
|
|
setw window-status-activity-style "fg=${thm_fg},bg=${thm_bg},none"
|
|
setw window-status-separator ""
|
|
setw window-status-style "fg=${thm_fg},bg=${thm_bg},none"
|
|
|
|
# TODO: continue implementing this later today...
|
|
wt_enabled=$(tmux show -gqv @catppuccin_window_tabs_enabled)
|
|
|
|
status_left=""
|
|
if [[ "${wt_enabled}" == "on" ]]
|
|
then
|
|
status_left="window_tabs_enabled"
|
|
fi
|
|
|
|
# --------=== Statusline
|
|
|
|
set status-left "#[fg=$thm_red,bg=$thm_bg,nobold,nounderscore,noitalics]$status_left#[fg=$thm_fg,bg=$thm_bg,nobold,nounderscore,noitalics]"
|
|
set status-right "#[fg=$thm_pink,bg=$thm_bg,nobold,nounderscore,noitalics]#[fg=$thm_bg,bg=$thm_pink,nobold,nounderscore,noitalics] #[fg=$thm_fg,bg=$thm_gray] #W #{?client_prefix,#[fg=$thm_red],#[fg=$thm_green]}#[bg=$thm_gray]#{?client_prefix,#[bg=$thm_red],#[bg=$thm_green]}#[fg=$thm_bg] #[fg=$thm_fg,bg=$thm_gray] #S "
|
|
|
|
# current_dir
|
|
setw window-status-format "#[fg=$thm_bg,bg=$thm_blue] #I #[fg=$thm_fg,bg=$thm_gray] #{b:pane_current_path} "
|
|
setw window-status-current-format "#[fg=$thm_bg,bg=$thm_orange] #I #[fg=$thm_fg,bg=$thm_bg] #{b:pane_current_path} "
|
|
|
|
# parent_dir/current_dir
|
|
# setw window-status-format "#[fg=colour232,bg=colour111] #I #[fg=colour222,bg=colour235] #(echo '#{pane_current_path}' | rev | cut -d'/' -f-2 | rev) "
|
|
# setw window-status-current-format "#[fg=colour232,bg=colour208] #I #[fg=colour255,bg=colour237] #(echo '#{pane_current_path}' | rev | cut -d'/' -f-2 | rev) "
|
|
|
|
# --------=== Modes
|
|
setw clock-mode-colour "${thm_blue}"
|
|
setw mode-style "fg=${thm_pink} bg=${thm_black4} bold"
|