System64fumo / syshud

Simple heads up display written in gtkmm 4
Do What The F*ck You Want To Public License
40 stars 0 forks source link

syshud can only display one hud per runtime? #14

Open littleblack111 opened 6 days ago

littleblack111 commented 6 days ago

atm. if i have brightness on -M or monitor. it will only show hud on brightness. without brightness, it will only show hud on audio. had to launch syshud -M audio_in,audio_out and syshud -M brightness at the same time?

System64fumo commented 6 days ago

I'm failing to understand your question. Do you mean you want to see both bars at the same time? Something like this? img

littleblack111 commented 6 days ago

yes. for some reason. with audio in, out, brightness all in -M or monitor. only brightness will show. and audio wont. but audio will after removing brightness. and it showed: Backlight: /sys/class/backlight/ddcci13 when with brightness. and Output: alsa_output.pci-0000_00_1f.3.analog-stereo, ID: 49 Input: alsa_input.usb-046d_Logitech_BRIO_403C18BA-03.analog-stereo, ID: 48 without brightness

System64fumo commented 6 days ago

Wait.. You mean if you enable all 3 and then go change your brightness it works but if you change your volume the hud won't show it? I don't know? It seems to be working perfectly fine on my end?

https://github.com/user-attachments/assets/70f472ce-4974-4ec2-ba25-ecbb966b921c

As for the stacked bars thing, I find it quite.. weird? Like, Why not also add another bar for audio_in or any future monitor that i decide to add.. (Which is a terrible idea) I would really rather not implement such thing.

littleblack111 commented 6 days ago

ooo. i see whats going on here... it will work for both audio and brightness if i add -b /sys/bus/ddcci/devices/ddcci13/backlight/ddcci13. but would only have brightness if its not set. which the brightness still displayed properly...

System64fumo commented 6 days ago

What do you mean by that? If you don't have a backlight set it should automatically detect the first backlight available in /sys/class/backlight/ when the brightness monitor is enabled. -b is for custom paths in case you don't want to use the first available backlight (Or in my case using a fake backlight)

littleblack111 commented 6 days ago

im confused too... -b /sys/class/backlight doesnt work. but /sys/class/backlight/ddcci13. probroblly cuz im using dccii driver for external monitor to work? but the automatic one work without -b. but the audio doesnt with the automaticly set -b

System64fumo commented 6 days ago

No you just don't understand how this works.

The automatic detection path is: /sys/class/backlight/ It will search for the first instance of a backlight which in your case is ddcci13 Then will monitor /sys/class/backlight/ddcci13/brightness

Using a custom path selects the backlight directly So instead of searching for a directory in that path it will assume that the path you gave it is the path containing brightness and max_brightness files

littleblack111 commented 6 days ago

TIL. but thats not related to the issue... so this is what happens with -b specified path: both audio and brightness work fine. and this is what happens without -b specified path: only brightness show

System64fumo commented 6 days ago

Hummmmm interesting behavior.. What version of syshud are you on just to double check?

System64fumo commented 6 days ago

Wait.. Oh my god.. i figured it out.. Do you have a config in ~/.config/sys64/hud/config.conf? Because you're supposed to configure syshud with that otherwise the defaults will load from /usr/share/sys64/hud/config.conf...

littleblack111 commented 6 days ago

nope. no ~/.config/sys64/hud/config.conf but in /usr/share/sys64/hub/config.conf: monitors=audio_in,audio_out,brightness

and version:

╰─$ syshud -v                                                                                           ─╯
Key 'keyboard' not found in section 'main'
Commit: Bugfix
Date: 2024-09-10
System64fumo commented 6 days ago

Yeah.. consider copying /usr/share/sys64/hud/config.conf to ~/.config/sys64/hud/config.conf then make your changes there Things should work alright after that.. Hopefully

littleblack111 commented 6 days ago

nope. copied it over. then relaunched. no luck

System64fumo commented 6 days ago

Damn.. I really don't know then. Can't reproduce on my system so i can't really help you with that.

I'll check this out later today on my phone since it actually has a backlight unlike my desktop, If it works fine there then yeah i geniunly cannot help you..

Feel free to debug this on your own though.. I recommend starting in this for loop https://github.com/System64fumo/syshud/blob/0a681bf0960052ab37452edd3cbf6b429c0ee8d6/src/window.cpp#L305

Add a few std::printf("Name of monitor\n"); to each monitor see if the audio ones loads If not then the backlight monitor is somehow blocking (Which should not be the case.. ever)