@@ -3221,7 +3221,7 @@ draw_processes() { #? Draw processes and values to screen
3221
3221
local reverse_string reverse_pos order_left=" ───────────┤" filter_string current_num detail_location det_no_add com_fg pg_arrow_up_fg pg_arrow_down_fg p_height=$(( height- 3 ))
3222
3222
local pid=0 pid_graph pid_step_r pid_step_g pid_step_b pid_add_r pid_add_g pid_add_b bg_add bg_step proc_start up_fg down_fg page_up_fg page_down_fg this_box=processes
3223
3223
local d_width=${box[details_width]} d_height=${box[details_height]} d_line=${box[details_line]} d_col=${box[details_col]}
3224
- local detail_graph_width=$(( d_width/ 3 + 2 )) detail_graph_height=$(( d_height- 1 )) kill_fg det_mod fg_add_r fg_add_g fg_add_b fg_inv
3224
+ local detail_graph_width=$(( d_width/ 3 + 2 )) detail_graph_height=$(( d_height- 1 )) kill_fg det_mod fg_add_r fg_add_g fg_add_b
3225
3225
local right_width=$(( d_width- detail_graph_width- 2 ))
3226
3226
local right_col=$(( d_col+ detail_graph_width+ 4 ))
3227
3227
local -a pid_rgb=(${theme[proc_misc]} ) fg_rgb=(${theme[main_fg_dec]} )
@@ -3230,14 +3230,23 @@ draw_processes() { #? Draw processes and values to screen
3230
3230
if [[ $argument == " now" ]]; then skip_process_draw=1; fi
3231
3231
3232
3232
if [[ $proc_gradient == true ]]; then
3233
- if (( fg_r+ fg_g+ fg_b< (255 * 3 )/ 2 )) ; then fg_inv=1; fi
3234
- fg_add_r=" ${fg_inv: +-} $(( (fg_r- (fg_r/ 6 ) )/ height)) "
3235
- fg_add_g=" ${fg_inv: +-} $(( (fg_g- (fg_g/ 6 ) )/ height)) "
3236
- fg_add_b=" ${fg_inv: +-} $(( (fg_b- (fg_b/ 6 ) )/ height)) "
3237
-
3238
- pid_add_r=" ${fg_inv: +-} $(( (pid_r- (pid_r/ 6 ) )/ height)) "
3239
- pid_add_g=" ${fg_inv: +-} $(( (pid_g- (pid_g/ 6 ) )/ height)) "
3240
- pid_add_b=" ${fg_inv: +-} $(( (pid_b- (pid_b/ 6 ) )/ height)) "
3233
+ if (( fg_r+ fg_g+ fg_b< (255 * 3 )/ 2 )) ; then
3234
+ fg_add_r=" $(( (fg_r- 255 - ((fg_r- 255 )/ 6 ) )/ height)) "
3235
+ fg_add_g=" $(( (fg_g- 255 - ((fg_g- 255 )/ 6 ) )/ height)) "
3236
+ fg_add_b=" $(( (fg_b- 255 - ((fg_b- 255 )/ 6 ) )/ height)) "
3237
+
3238
+ pid_add_r=" $(( (pid_r- 255 - ((pid_r- 255 )/ 6 ) )/ height)) "
3239
+ pid_add_g=" $(( (pid_g- 255 - ((pid_g- 255 )/ 6 ) )/ height)) "
3240
+ pid_add_b=" $(( (pid_b- 255 - ((pid_b- 255 )/ 6 ) )/ height)) "
3241
+ else
3242
+ fg_add_r=" $(( (fg_r- (fg_r/ 6 ) )/ height)) "
3243
+ fg_add_g=" $(( (fg_g- (fg_g/ 6 ) )/ height)) "
3244
+ fg_add_b=" $(( (fg_b- (fg_b/ 6 ) )/ height)) "
3245
+
3246
+ pid_add_r=" $(( (pid_r- (pid_r/ 6 ) )/ height)) "
3247
+ pid_add_g=" $(( (pid_g- (pid_g/ 6 ) )/ height)) "
3248
+ pid_add_b=" $(( (pid_b- (pid_b/ 6 ) )/ height)) "
3249
+ fi
3241
3250
fi
3242
3251
3243
3252
unset proc_out
0 commit comments