From 7120888afe89a62d3cfc26056ee4b0c9235cda8b Mon Sep 17 00:00:00 2001 From: Ali Hatami Tajik Date: Mon, 3 Apr 2023 11:19:22 +0330 Subject: [PATCH] Implement get edid name --- src/scripts/python/setupmonitor.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/scripts/python/setupmonitor.py b/src/scripts/python/setupmonitor.py index e054156..0be74ca 100644 --- a/src/scripts/python/setupmonitor.py +++ b/src/scripts/python/setupmonitor.py @@ -68,9 +68,11 @@ def all_connected_monitor(): ) -def get_edid_name(drm_name): +def get_edid_name(drm_name: str): """Change eGalax DRM name to atom name""" - return "#TODO" + card_num, name = drm_name[4:].split("-", maxsplit=1) + first, second = name.rsplit("-", maxsplit=1) + return first + "-" + card_num + "-" + second def prepare_monitors(config):