aristocratos / bpytop

Linux/OSX/FreeBSD resource monitor
Apache License 2.0
10.07k stars 397 forks source link

[REQUEST] Swap network download/upload graphs #383

Open Sheridan opened 2 years ago

Sheridan commented 2 years ago

Or make option for this. Because download and upload

hirokoclanger commented 2 years ago

Swap them to what? Can you please specify this a bit more or add suggestion picture. :)

Sheridan commented 2 years ago

Network download and upload

image

abesnier commented 1 year ago

I concur, I find it really disturbing to have the up link down, and the down link up.

There are three places to change if you want to do it yourself (line numbers as per current master:)

Line 2372 {create_box(x=cls.box_x, y=cls.box_y, width=cls.box_width, height=cls.box_height, line_color=THEME.div_line, fill=False, title="Download", title2="Upload")}'becomes {create_box(x=cls.box_x, y=cls.box_y, width=cls.box_width, height=cls.box_height, line_color=THEME.div_line, fill=False, title="Upload", title2="Download")}'

Line 2409 for direction in ["download", "upload"]: becomes for direction in ["upload", "download"]:

And in the lines below (2415 and 2416à, replace download by upload

Lines 2430/2431

out += (f'{Mv.to(y, x)}{THEME.graph_text(net.sync_string if CONFIG.net_sync else net.strings[net.nic]["download"]["graph_top"])}'
                f'{Mv.to(y+h-1, x)}{THEME.graph_text(net.sync_string if CONFIG.net_sync else net.strings[net.nic]["upload"]["graph_top"])}')

become

out += (f'{Mv.to(y, x)}{THEME.graph_text(net.sync_string if CONFIG.net_sync else net.strings[net.nic]["upload"]["graph_top"])}'
                f'{Mv.to(y+h-1, x)}{THEME.graph_text(net.sync_string if CONFIG.net_sync else net.strings[net.nic]["download"]["graph_top"])}')

That's just a hack though, not a config option, and will be reverted when you update BPYTOP.