Open blitzgneisserin opened 5 months ago
oh, nice, thanks for putting this together. indeed looks like this is substantially more complicated to do than the old version was. need to look at it in detail. wlroots should be good enough for everyone of course.. but i suppose when writing so much code for exhaustive functionality it'd be good if it worked on kde too.
just noticed that i don't even have hwinfo installed. this might be true for more people who occasionally use the script. maybe, in the interest of maximum compatibility, should we write a small c test program using exactly the same mechanism to find the monitor name as the main vkdt program would?
i.e. use some minimal glfwInit()
and glfwGetMonitorName(monitors[0]);
without even creating a window? not sure what this would do on macintosh or windows computers, but probably would be better than now.
needs c code to extract the icc tags but these files are simple enough.
a small c test program using exactly the same mechanism to find the monitor name as the main vkdt program
I had a similar idea but didn't know how to do that.
I just wrote a small test script in Python to find out the monitor name with glfw.get_monitor_name(monitor), but the script only found out the name of the connection, e.g. HDMI-A-1. But probably I am only being stupid and this needs to be done differently.
i think that's exactly the string. i know nothing about python, but these HDMI-0 (nvidia) or HDMI-A-1 (amd?) identifiers look familiar.
On Mon, Jun 17, 2024 at 12:50 PM Anna @.***> wrote:
a small c test program using exactly the same mechanism to find the monitor name as the main vkdt program
I had a similar idea but didn't know how to do that.
I just wrote a small test script in Python to find out the monitor name with glfw.get_monitor_name(monitor), but the script only found out the name of the connection, e.g. HDMI-A-1. But probably I am only being stupid and this needs to be done differently.
— Reply to this email directly, view it on GitHub https://github.com/hanatos/vkdt/pull/130#issuecomment-2173067299, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMAKKMDD4HBDPTAWTRORRDZH25RFAVCNFSM6AAAAABJMXPHPCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZTGA3DOMRZHE . You are receiving this because you commented.Message ID: @.***>
I am not sure I understand what you mean. The connection names do not work for the new native Wayland appimages. They see the monitor as e.g. [gui] monitor [0] BNQ BenQ SW240/21573 at 0 0
, not as HDMI-A-1
I just did find a way to get the exact monitor name on KDE Plasma, with Python, but some Python modules/packages are needed for that.
import gi
gi.require_version('Gdk', '3.0')
from gi.repository import Gdk
def get_monitor_names():
display = Gdk.Display.get_default()
monitor_names = []
for i in range(display.get_n_monitors()):
monitor = display.get_monitor(i)
monitor_name = monitor.get_model()
monitor_names.append(monitor_name)
return monitor_names
def write_monitor_names_to_file(filename):
monitor_names = get_monitor_names()
with open(filename, 'w') as file:
for name in monitor_names:
file.write(name + '\n')
if __name__ == '__main__':
write_monitor_names_to_file('monitornames.txt')
Oh man, now the problem is that the file name contains a /.
Well, don't think that this was easy. Probably it could be much shorter, but I don't know how.
This works on wlroots-based compositors, but not on KDE Plasma 6, there I get this strange number, but no idea from where: