2023-11-23 22:18:18 -05:00
|
|
|
|
#!/bin/bash
|
2023-11-22 21:39:37 -05:00
|
|
|
|
# If changes made here does not take effect, then try to re-create the tmux session to force reload.
|
|
|
|
|
|
2023-11-23 22:18:18 -05:00
|
|
|
|
# copied from catppuccin/tmux Mocha https://github.com/catppuccin/tmux/blob/main/catppuccin-mocha.tmuxtheme
|
2023-11-22 21:39:37 -05:00
|
|
|
|
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"
|
|
|
|
|
|
|
|
|
|
wedge_left="█"
|
|
|
|
|
wedge_right="█"
|
|
|
|
|
|
|
|
|
|
wedge() {
|
|
|
|
|
printf '%s' "#[fg=$2,bg=$thm_bg]" \
|
|
|
|
|
"$wedge_left" \
|
|
|
|
|
"#[fg=$thm_bg,bg=$2]" \
|
|
|
|
|
"$1" \
|
|
|
|
|
"#[fg=$2,bg=$thm_bg]" \
|
|
|
|
|
"$wedge_right"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if patched_font_in_use; then
|
|
|
|
|
TMUX_POWERLINE_SEPARATOR_LEFT_BOLD=""
|
|
|
|
|
TMUX_POWERLINE_SEPARATOR_LEFT_THIN=""
|
|
|
|
|
TMUX_POWERLINE_SEPARATOR_RIGHT_BOLD=""
|
|
|
|
|
TMUX_POWERLINE_SEPARATOR_RIGHT_THIN=""
|
|
|
|
|
else
|
|
|
|
|
TMUX_POWERLINE_SEPARATOR_LEFT_BOLD="◀"
|
|
|
|
|
TMUX_POWERLINE_SEPARATOR_LEFT_THIN="❮"
|
|
|
|
|
TMUX_POWERLINE_SEPARATOR_RIGHT_BOLD="▶"
|
|
|
|
|
TMUX_POWERLINE_SEPARATOR_RIGHT_THIN="❯"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
TMUX_POWERLINE_DEFAULT_BACKGROUND_COLOR=${TMUX_POWERLINE_DEFAULT_BACKGROUND_COLOR:-$thm_bg}
|
|
|
|
|
TMUX_POWERLINE_DEFAULT_FOREGROUND_COLOR=${TMUX_POWERLINE_DEFAULT_FOREGROUND_COLOR:-$thm_fg}
|
|
|
|
|
|
|
|
|
|
TMUX_POWERLINE_DEFAULT_LEFTSIDE_SEPARATOR=${TMUX_POWERLINE_DEFAULT_LEFTSIDE_SEPARATOR:-$TMUX_POWERLINE_SEPARATOR_RIGHT_BOLD}
|
|
|
|
|
TMUX_POWERLINE_DEFAULT_RIGHTSIDE_SEPARATOR=${TMUX_POWERLINE_DEFAULT_RIGHTSIDE_SEPARATOR:-$TMUX_POWERLINE_SEPARATOR_LEFT_BOLD}
|
|
|
|
|
|
|
|
|
|
# See man tmux.conf for additional formatting options for the status line.
|
|
|
|
|
# The `format regular` and `format inverse` functions are provided as conveniences
|
|
|
|
|
|
2023-11-23 22:18:18 -05:00
|
|
|
|
if [[ -z $TMUX_POWERLINE_WINDOW_STATUS_CURRENT ]]; then
|
2023-11-22 21:39:37 -05:00
|
|
|
|
TMUX_POWERLINE_WINDOW_STATUS_CURRENT=" #W $(wedge "#I" "$thm_orange")"
|
|
|
|
|
fi
|
|
|
|
|
|
2023-11-23 22:18:18 -05:00
|
|
|
|
if [[ -z $TMUX_POWERLINE_WINDOW_STATUS_STYLE ]]; then
|
2023-11-22 21:39:37 -05:00
|
|
|
|
TMUX_POWERLINE_WINDOW_STATUS_STYLE=(
|
|
|
|
|
"$(format regular)"
|
|
|
|
|
)
|
|
|
|
|
fi
|
|
|
|
|
|
2023-11-23 22:18:18 -05:00
|
|
|
|
if [[ -z $TMUX_POWERLINE_WINDOW_STATUS_FORMAT ]]; then
|
2023-11-22 21:39:37 -05:00
|
|
|
|
TMUX_POWERLINE_WINDOW_STATUS_FORMAT=" #W $(wedge "#I" "$thm_blue")"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# Format: segment_name background_color foreground_color [non_default_separator] [separator_background_color] [separator_foreground_color] [spacing_disable] [separator_disable]
|
|
|
|
|
#
|
|
|
|
|
# * background_color and foreground_color. Formats:
|
|
|
|
|
# * Named colors (chech man page of tmux for complete list) e.g. black, red, green, yellow, blue, magenta, cyan, white
|
|
|
|
|
# * a hexadecimal RGB string e.g. #ffffff
|
|
|
|
|
# * 'default' for the defalt tmux color.
|
|
|
|
|
# * non_default_separator - specify an alternative character for this segment's separator
|
|
|
|
|
# * separator_background_color - specify a unique background color for the separator
|
|
|
|
|
# * separator_foreground_color - specify a unique foreground color for the separator
|
|
|
|
|
# * spacing_disable - remove space on left, right or both sides of the segment:
|
|
|
|
|
# * "left_disable" - disable space on the left
|
|
|
|
|
# * "right_disable" - disable space on the right
|
|
|
|
|
# * "both_disable" - disable spaces on both sides
|
|
|
|
|
# * - any other character/string produces no change to default behavior (eg "none", "X", etc.)
|
|
|
|
|
#
|
|
|
|
|
# * separator_disable - disables drawing a separator on this segment, very useful for segments
|
|
|
|
|
# with dynamic background colours (eg tmux_mem_cpu_load):
|
|
|
|
|
# * "separator_disable" - disables the separator
|
|
|
|
|
# * - any other character/string produces no change to default behavior
|
|
|
|
|
#
|
|
|
|
|
# Example segment with separator disabled and right space character disabled:
|
|
|
|
|
# "hostname 33 0 {TMUX_POWERLINE_SEPARATOR_RIGHT_BOLD} 33 0 right_disable separator_disable"
|
|
|
|
|
#
|
|
|
|
|
# Note that although redundant the non_default_separator, separator_background_color and
|
|
|
|
|
# separator_foreground_color options must still be specified so that appropriate index
|
|
|
|
|
# of options to support the spacing_disable and separator_disable features can be used
|
|
|
|
|
|
2023-11-23 22:18:18 -05:00
|
|
|
|
if [[ -z $TMUX_POWERLINE_LEFT_STATUS_SEGMENTS ]]; then
|
2023-11-22 21:39:37 -05:00
|
|
|
|
TMUX_POWERLINE_LEFT_STATUS_SEGMENTS=(
|
2023-11-23 22:18:18 -05:00
|
|
|
|
"mode_indicator 33"
|
|
|
|
|
#"tmux_session_info 148 234"
|
|
|
|
|
#"hostname 33 0"
|
|
|
|
|
#"ifstat 30 255"
|
|
|
|
|
#"ifstat_sys 30 255"
|
|
|
|
|
#"lan_ip 24 255 ${TMUX_POWERLINE_SEPARATOR_RIGHT_THIN}"
|
|
|
|
|
#"wan_ip 24 255"
|
|
|
|
|
"vcs_branch $thm_gray $thm_blue"
|
|
|
|
|
#"vcs_compare 60 255"
|
|
|
|
|
#"vcs_staged 64 255"
|
|
|
|
|
#"vcs_modified 9 255"
|
|
|
|
|
#"vcs_others 245 0"
|
2023-11-22 21:39:37 -05:00
|
|
|
|
)
|
|
|
|
|
fi
|
|
|
|
|
|
2023-11-23 22:18:18 -05:00
|
|
|
|
if [[ -z $TMUX_POWERLINE_RIGHT_STATUS_SEGMENTS ]]; then
|
2023-11-22 21:39:37 -05:00
|
|
|
|
TMUX_POWERLINE_RIGHT_STATUS_SEGMENTS=(
|
2023-11-23 22:18:18 -05:00
|
|
|
|
#"earthquake 3 0"
|
|
|
|
|
"pwd $thm_pink $thm_bg"
|
|
|
|
|
#"macos_notification_count 29 255"
|
|
|
|
|
#"mailcount 9 255"
|
|
|
|
|
"now_playing 234 37"
|
|
|
|
|
#"cpu 240 136"
|
|
|
|
|
#"load 237 167"
|
|
|
|
|
#"tmux_mem_cpu_load 234 136"
|
|
|
|
|
"battery 137 127"
|
|
|
|
|
#"weather 37 255"
|
|
|
|
|
#"rainbarf 0 ${TMUX_POWERLINE_DEFAULT_FOREGROUND_COLOR}"
|
|
|
|
|
#"xkb_layout 125 117"
|
|
|
|
|
#"date_day 235 136"
|
|
|
|
|
#"date 235 136 ${TMUX_POWERLINE_SEPARATOR_LEFT_THIN}"
|
|
|
|
|
#"time 235 136 ${TMUX_POWERLINE_SEPARATOR_LEFT_THIN}"
|
|
|
|
|
#"utc_time 235 136 ${TMUX_POWERLINE_SEPARATOR_LEFT_THIN}"
|
2023-11-22 21:39:37 -05:00
|
|
|
|
)
|
|
|
|
|
fi
|