-
Notifications
You must be signed in to change notification settings - Fork 514
/
Copy pathdefault.sh
120 lines (110 loc) · 4.81 KB
/
default.sh
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
117
118
119
120
# Default Theme
# If changes made here does not take effect, then try to re-create the tmux session to force reload.
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
# See Color formatting section below for details on what colors can be used here.
TMUX_POWERLINE_DEFAULT_BACKGROUND_COLOR=${TMUX_POWERLINE_DEFAULT_BACKGROUND_COLOR:-'235'}
TMUX_POWERLINE_DEFAULT_FOREGROUND_COLOR=${TMUX_POWERLINE_DEFAULT_FOREGROUND_COLOR:-'255'}
TMUX_POWERLINE_SEG_AIR_COLOR=$("${TMUX_POWERLINE_DIR_HOME}/segments/air_color.sh")
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` for additional formatting options for the status line.
# The `format regular` and `format inverse` functions are provided as conveniences
if [ -z $TMUX_POWERLINE_WINDOW_STATUS_CURRENT ]; then
TMUX_POWERLINE_WINDOW_STATUS_CURRENT=(
"#[$(format inverse)]" \
"$TMUX_POWERLINE_DEFAULT_LEFTSIDE_SEPARATOR" \
" #I#F " \
"$TMUX_POWERLINE_SEPARATOR_RIGHT_THIN" \
" #W " \
"#[$(format regular)]" \
"$TMUX_POWERLINE_DEFAULT_LEFTSIDE_SEPARATOR"
)
fi
if [ -z $TMUX_POWERLINE_WINDOW_STATUS_STYLE ]; then
TMUX_POWERLINE_WINDOW_STATUS_STYLE=(
"$(format regular)"
)
fi
if [ -z $TMUX_POWERLINE_WINDOW_STATUS_FORMAT ]; then
TMUX_POWERLINE_WINDOW_STATUS_FORMAT=(
"#[$(format regular)]" \
" #I#{?window_flags,#F, } " \
"$TMUX_POWERLINE_SEPARATOR_RIGHT_THIN" \
" #W "
)
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. Color formatting (see `man tmux` for complete list):
# * Named colors, e.g. black, red, green, yellow, blue, magenta, cyan, white
# * Hexadecimal RGB string e.g. #ffffff
# * 'default' for the default tmux color.
# * 'terminal' for the terminal's default background/foreground color
# * The numbers 0-255 for the 256-color palette. Run `tmux-powerline/color-palette.sh` to see the colors.
# * 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
if [ -z $TMUX_POWERLINE_LEFT_STATUS_SEGMENTS ]; then
TMUX_POWERLINE_LEFT_STATUS_SEGMENTS=(
"tmux_session_info 148 234" \
"hostname 33 0" \
#"mode_indicator 165 0" \
#"ifstat 30 255" \
#"ifstat_sys 30 255" \
"lan_ip 24 255 ${TMUX_POWERLINE_SEPARATOR_RIGHT_THIN}" \
"wan_ip 24 255" \
"vcs_branch 29 88" \
#"vcs_compare 60 255" \
#"vcs_staged 64 255" \
#"vcs_modified 9 255" \
#"vcs_others 245 0" \
)
fi
if [ -z $TMUX_POWERLINE_RIGHT_STATUS_SEGMENTS ]; then
TMUX_POWERLINE_RIGHT_STATUS_SEGMENTS=(
#"earthquake 3 0" \
"pwd 89 211" \
#"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" \
#"air ${TMUX_POWERLINE_SEG_AIR_COLOR} 255" \
"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}" \
)
fi