bpytop icon indicating copy to clipboard operation
bpytop copied to clipboard

[REQUEST] Swap network download/upload graphs

Open Sheridan opened this issue 2 years ago • 3 comments

Or make option for this. Because download and upload

Sheridan avatar Apr 12 '22 08:04 Sheridan

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

hirokoclanger avatar Apr 20 '22 16:04 hirokoclanger

Network download and upload

image

Sheridan avatar Apr 22 '22 14:04 Sheridan

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.

abesnier avatar Sep 29 '22 08:09 abesnier