flightlessmango / MangoHud

A Vulkan and OpenGL overlay for monitoring FPS, temperatures, CPU/GPU load and more. Discord: https://discordapp.com/invite/Gj5YmBb
MIT License
6.31k stars 275 forks source link

Value of exec not placed correctly #1376

Open waven opened 2 months ago

waven commented 2 months ago

Describe the bug Value of exec is not placed correctly in the column and is overlapping the column on the left.

List relevant hardware/software information

To Reproduce Steps to reproduce the behavior:

  1. Add exec=echo "Test123Test123" to the config

Screenshots mangohud_exec

DonKatsu commented 1 month ago

This seems to be present with the regular layout as well. If the exec output is long enough, it starts outside of the column. Yet if it's short enough, it appears slightly ahead inside the column.

Screenshot of just exec=uname -r. Screenshot of just exec=printf a.

The reason I ran into this is I was trying the cachyos-lto kernel, making my uname -r output long enough to overlap with the custom_text=Kernel preceding it. Screenshot So I tried without custom_text, which had it starting outside the HUD. 6.10.0-3-cachyos is short enough to not overlap with custom_text=Kernel, but still long enough for the positional issue without.

Also, exec somehow prints after winesync's output if it immediately follows that. And will run into the positional issue. Screenshot of exec=printf test123 next to winesync output. Screenshot of exec=uname -r overlapping winesync output.

flightlessmango commented 1 month ago

@DonKatsu, you're meant to use custom_text with exec. Exec just displays on the next column.

custom_text=kernel
exec=uname -r
DonKatsu commented 1 month ago

Oh yeah, it even says as much in the readme. Whoops. But like I said that is what I'm using where the longer uname -r output overlaps with custom_text=Kernel. The only way I can figure to make them fit with that output length is to force width higher to make more column space. But that adds too much space to everything else. So that maybe ends up being a formatting problem, instead of a bug? And a separate issue anyway.

flightlessmango commented 1 month ago

In this case you can move the text one more column with a blank exec

custom_text=kernel
exec=
exec=uname -r
DonKatsu commented 1 month ago

Ah, I didn't think to try that. Ends up a bit distant. I was able to push it over by doing exec=uname -r | sed 's/$/ /'. Not sure if there's a better solution to do that, but it seems to work for me. Thanks.