Skip to content

Commit e232eef

Browse files
author
henry.potgieter
committed
Change naming from --nerd-graph to --vertical-graph
1 parent dc298e1 commit e232eef

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

common/graph.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ std::string get_graph_by_value( unsigned value, unsigned max, unsigned len )
6161
return bars;
6262
}
6363

64-
std::string get_graph_nerd( unsigned value )
64+
std::string get_graph_vert( unsigned value )
6565
{
6666
static const std::map<unsigned, std::string> graph_chars = {
6767
{ 0, " " }, { 10, "" }, { 20, "" }, { 30, "" }, { 40, "" },

common/graph.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@
2323

2424
std::string get_graph_by_percentage( unsigned, unsigned len = 10 );
2525
std::string get_graph_by_value( unsigned, unsigned, unsigned len = 10 );
26-
std::string get_graph_nerd( unsigned );
26+
std::string get_graph_vert( unsigned );
2727

2828
#endif

common/main.cc

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737

3838
std::string cpu_string( CPU_MODE cpu_mode, unsigned int cpu_usage_delay, unsigned int graph_lines,
3939
bool use_colors = false,
40-
bool use_powerline_left = false, bool use_powerline_right = false, bool use_nerd_graph = false)
40+
bool use_powerline_left = false, bool use_powerline_right = false, bool use_vert_graph = false)
4141
{
4242

4343
float percentage;
@@ -80,10 +80,10 @@ std::string cpu_string( CPU_MODE cpu_mode, unsigned int cpu_usage_delay, unsigne
8080
}
8181
}
8282

83-
if( use_nerd_graph )
83+
if( use_vert_graph )
8484
{
8585
oss << "";
86-
oss << get_graph_nerd( unsigned( percentage ) );
86+
oss << get_graph_vert( unsigned( percentage ) );
8787
oss << "";
8888
}
8989
else if( graph_lines > 0)
@@ -129,8 +129,8 @@ void print_help()
129129
<< "\tUse powerline left symbols throughout the output, enables --colors\n"
130130
<< "-q, --powerline-right\n"
131131
<< "\tUse powerline right symbols throughout the output, enables --colors\n"
132-
<< "-n, --nerd-graph\n"
133-
<< "\tUse NerdFont symbols to render CPU graph as vertical bar chart\n"
132+
<< "-n, --vertical-graph\n"
133+
<< "\tUse vertical bar chart for CPU graph\n"
134134
<< "-i <value>, --interval <value>\n"
135135
<< "\tSet tmux status refresh interval in seconds. Default: 1 second\n"
136136
<< "-g <value>, --graph-lines <value>\n"
@@ -152,7 +152,7 @@ int main( int argc, char** argv )
152152
bool use_colors = false;
153153
bool use_powerline_left = false;
154154
bool use_powerline_right = false;
155-
bool use_nerd_graph = false;
155+
bool use_vert_graph = false;
156156
MEMORY_MODE mem_mode = MEMORY_MODE_DEFAULT;
157157
CPU_MODE cpu_mode = CPU_MODE_DEFAULT;
158158

@@ -166,7 +166,7 @@ int main( int argc, char** argv )
166166
{ "colors", no_argument, NULL, 'c' },
167167
{ "powerline-left", no_argument, NULL, 'p' },
168168
{ "powerline-right", no_argument, NULL, 'q' },
169-
{ "nerd-graph", no_argument, NULL, 'n' },
169+
{ "vertical-graph", no_argument, NULL, 'v' },
170170
{ "interval", required_argument, NULL, 'i' },
171171
{ "graph-lines", required_argument, NULL, 'g' },
172172
{ "mem-mode", required_argument, NULL, 'm' },
@@ -177,7 +177,7 @@ int main( int argc, char** argv )
177177

178178
int c;
179179
// while c != -1
180-
while( (c = getopt_long( argc, argv, "hi:cpqng:m:a:t:", long_options, NULL) ) != -1 )
180+
while( (c = getopt_long( argc, argv, "hi:cpqvg:m:a:t:", long_options, NULL) ) != -1 )
181181
{
182182
switch( c )
183183
{
@@ -196,8 +196,8 @@ int main( int argc, char** argv )
196196
use_colors = true;
197197
use_powerline_right = true;
198198
break;
199-
case 'n': // --nerd-graph
200-
use_nerd_graph = true;
199+
case 'v': // --vertical-graph
200+
use_vert_graph = true;
201201
break;
202202
case 'i': // --interval, -i
203203
if( atoi( optarg ) < 1 )
@@ -260,7 +260,7 @@ int main( int argc, char** argv )
260260
MemoryStatus memory_status;
261261
mem_status( memory_status );
262262
std::cout << mem_string( memory_status, mem_mode, use_colors, use_powerline_left, use_powerline_right )
263-
<< cpu_string( cpu_mode, cpu_usage_delay, graph_lines, use_colors, use_powerline_left, use_powerline_right, use_nerd_graph )
263+
<< cpu_string( cpu_mode, cpu_usage_delay, graph_lines, use_colors, use_powerline_left, use_powerline_right, use_vert_graph )
264264
<< load_string( use_colors, use_powerline_left, use_powerline_right, averages_count );
265265

266266
std::cout << std::endl;

0 commit comments

Comments
 (0)