Skip to content

Commit 2b19ca8

Browse files
committed
Increase CPU percent width by 1 (fixes #81)
CPU percent width is 5, which accommodates the maximum possible width (100.0). When it's at full width, though, the percent string runs right up against the item before it. When the graph is enabled, running up against the graph just looks strange, but still readable ([ |||]100.0%). With the graph disabled (-g 0) though, it runs into the memory widget, which makes both of them very difficult to read (11/32GB100%). This commit adds one space to the CPU percent width. It offsets a non-pegged load by one, but it ensures there's always at least one space to separate the widgets.
1 parent b2c6cd4 commit 2b19ca8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

common/main.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ std::string cpu_string( CPU_MODE cpu_mode, unsigned int cpu_usage_delay, unsigne
8686
oss << get_graph_by_percentage( unsigned( percentage ), graph_lines );
8787
oss << "]";
8888
}
89-
oss.width( 5 );
89+
oss.width( 6 );
9090
oss.setf( std::ios::fixed, std::ios::floatfield );
9191
oss.precision( 1 );
9292
oss.fill( ' ' );

0 commit comments

Comments
 (0)