More screen resolution detection fixes

This commit is contained in:
Kevin Alberts 2025-09-05 11:59:38 +02:00
parent c58e1d4e5c
commit ee311b12be

View file

@ -102,7 +102,7 @@ class Config(GeneralConfig):
# Home office, 1920x1080 horizontal right and 1080x1920 vertical left
if qtile_width == 3000 and (qtile_height > 1912 and qtile_height <= 1920):
cls.screen_kwargs = [
{'x': 0, 'y': 840, 'width': 1920, 'height': qtile_height-840},
{'x': 0, 'y': 839, 'width': 1920, 'height': qtile_height-839},
{'x': 1920, 'y': 0, 'width': 1080, 'height': qtile_height},
]
# Dual 1680x1050
@ -112,22 +112,20 @@ class Config(GeneralConfig):
{'x': 1680, 'y': 0, 'width': 1680, 'height': 1050},
]
# Dual 1920x1080
elif qtile_width == 3840 and qtile_height == 1080:
elif qtile_width == 3840 and (qtile_height > 1070 and qtile_height <= 1080):
cls.screen_kwargs = [
{'x': 0, 'y': 0, 'width': 1920, 'height': 1080},
{'x': 1920, 'y': 0, 'width': 1920, 'height': 1080},
]
# Single 1920x1080
elif qtile_width == 1920 and qtile_height == 1080:
elif qtile_width == 1920 and (qtile_height > 1070 and qtile_height <= 1080):
cls.screen_kwargs = [{'x': 0, 'y': 0, 'width': 1920, 'height': 1080}]
# Single 1680x1050
elif qtile_width == 1680 and qtile_height == 1050:
elif qtile_width == 1680 and (qtile_height > 1040 and qtile_height <= 1050):
cls.screen_kwargs = [{'x': 0, 'y': 0, 'width': 1680, 'height': 1050}]
# Else, set to autoconfigure
# Else, configure for 1 large screen
else:
cls.screen_kwargs = []
# {'x': 0, 'y': 0, 'width': int(os.getenv("QTILE_WIDTH", "3840"))//2, 'height': int(os.getenv("QTILE_HEIGHT", "1080"))},
# {'x': int(os.getenv("QTILE_WIDTH", "3840"))//2, 'y': 0, 'width': int(os.getenv("QTILE_WIDTH", "3840"))//2, 'height': int(os.getenv("QTILE_HEIGHT", "1080"))},
cls.screen_kwargs = [{'x': 0, 'y': 0, 'width': qtile_width, 'height': qtile_height}]
logger.warning(f"Kwargs: {cls.screen_kwargs}")