Skip to content

Commit de4b251

Browse files
committed
add dark_gray color, correct powerline issues
1 parent 2a33251 commit de4b251

File tree

4 files changed

+14
-13
lines changed

4 files changed

+14
-13
lines changed

scripts/monokai.sh

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ main()
3737
# Monokai Pro Color Pallette
3838
white='#fcfcfa'
3939
black='#2d2a2e'
40+
dark_gray='#403e41'
4041
gray='#727072'
4142
red='#ff6188'
4243
green='#a9dc76'
@@ -124,12 +125,12 @@ main()
124125
tmux set-option -g message-style "bg=${gray},fg=${white}"
125126

126127
# status bar
127-
tmux set-option -g status-style "bg=${gray},fg=${white}"
128+
tmux set-option -g status-style "bg=${dark_gray},fg=${white}"
128129

129130
# Status left
130131
if $show_powerline; then
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}"
132-
powerbg=${gray}
132+
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=${dark_gray}]#{?client_prefix,#[fg=${magenta}],}${left_sep}"
133+
powerbg=${dark_gray}
133134
else
134135
tmux set-option -g status-left "#[bg=${green},fg=${black},bold]#{?client_prefix,#[bg=${magenta}],} ${left_icon} "
135136
fi
@@ -208,7 +209,7 @@ main()
208209
script="#($current_dir/network_bandwidth.sh)"
209210

210211
elif [ $plugin = "network-ping" ]; then
211-
IFS=' ' read -r -a colors <<<$(get_tmux_option "@monokai-network-ping-colors" "gray white")
212+
IFS=' ' read -r -a colors <<<$(get_tmux_option "@monokai-network-ping-colors" "dark_gray white")
212213
script="#($current_dir/network_ping.sh)"
213214

214215
elif [ $plugin = "network-vpn" ]; then
@@ -248,7 +249,7 @@ main()
248249
script="#($current_dir/weather_wrapper.sh $show_fahrenheit $show_location '$fixed_location')"
249250

250251
elif [ $plugin = "time" ]; then
251-
IFS=' ' read -r -a colors <<< $(get_tmux_option "@monokai-time-colors" "green white")
252+
IFS=' ' read -r -a colors <<< $(get_tmux_option "@monokai-time-colors" "green black")
252253
if [ -n "$time_format" ]; then
253254
script=${time_format}
254255
else
@@ -292,19 +293,19 @@ main()
292293
done
293294

294295
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+
tmux set-option -ga status-right "#[fg=${green},bg=${magenta}]${right_sep}#[bg=${green},fg=${black},bold] #h #[bg=${black},fg=${green}]"
296297
else
297298
tmux set-option -ga status-right "#[fg=${green},bg=${blue}]${right_sep}#[bg=${green},fg=${black},bold] #h "
298299
fi
299300

300301
# Window option
301302
if $show_powerline; then
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}"
303+
tmux set-window-option -g window-status-current-format "#[bg=${gray},fg=${dark_gray}]${left_sep} #[fg=${white},bg=${gray}]#I #W${current_flags} #[bg=${dark_gray},fg=${gray}]${left_sep}"
303304
else
304-
tmux set-window-option -g window-status-current-format "#[fg=${gray},bg=${white}] #I #W${current_flags} "
305+
tmux set-window-option -g window-status-current-format "#[fg=${white},bg=${gray}] #I #W${current_flags} "
305306
fi
306307

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}"
308+
tmux set-window-option -g window-status-format "#[bg=${dark_gray},fg=${dark_gray}]${left_sep} #[fg=${white},bg=${dark_gray}]#I #W${flags} #[bg=${dark_gray},fg=${dark_gray}]${left_sep}"
308309
tmux set-window-option -g window-status-activity-style "bold"
309310
tmux set-window-option -g window-status-bell-style "bold"
310311
tmux set-window-option -g window-status-separator ""

scripts/network_ping.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ ping_function() {
1414
Linux | Darwin)
1515
# storing the hostname/IP in the variable PINGSERVER, default is 1.1.1.1 (Cloudflare)
1616
pingserver=$(get_tmux_option "@monokai-ping-server" "1.1.1.1")
17-
pingtime=$(ping -c 1 "$pingserver" | tail -1 | awk '{print $4}' | cut -d '/' -f 2 | cut -c1-2)
17+
pingtime=$(ping -c 1 "$pingserver" | tail -1 | awk '{print $4}' | cut -d '/' -f 2 | cut -c1-2 | sed 's/\.$//')
1818
echo "$pingtime ms"
1919
;;
2020

scripts/ram_info.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ get_ratio()
2222
# System Profiler performs an activation lock check, which can result in
2323
# time outs or a lagged response. (~10 seconds)
2424
# total_mem=$(system_profiler SPHardwareDataType | grep "Memory:" | awk '{print $2 $3}')
25-
total_mem=$(sysctl -n hw.memsize | awk '{print $0/1024/1024/1024 " GB"}')
25+
total_mem=$(sysctl -n hw.memsize | awk '{print $0/1024/1024/1024 "GB"}')
2626
if ((used_mem < 1024 )); then
2727
echo "${used_mem}MB/$total_mem"
2828
else

scripts/utils.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ get_tmux_window_option() {
2222
fi
2323
}
2424

25-
# normalize the percentage string to always have a length of 5
25+
# normalize the percentage string to always have a length of 4
2626
normalize_percent_len() {
2727
# the max length that the percent can reach, which happens for a two digit number with a decimal house: "99.9%"
28-
max_len=5
28+
max_len=4
2929
percent_len=${#1}
3030
let diff_len=$max_len-$percent_len
3131
# if the diff_len is even, left will have 1 more space than right

0 commit comments

Comments
 (0)