From d285fd5fd4b13afc2bd90af9792a0f599ef82b3e Mon Sep 17 00:00:00 2001 From: Phillip Berndt Date: Mon, 16 Jan 2023 09:55:17 +0100 Subject: [PATCH] Add missing comparisons on version --- autorandr.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/autorandr.py b/autorandr.py index 3eb3a9b..1f44c28 100755 --- a/autorandr.py +++ b/autorandr.py @@ -138,6 +138,15 @@ class Version(object): def __ge__(self, other): return not (self < other) + def __ne__(self, other): + return not (self == other) + + def __le__(self, other): + return (self < other) or (self == other) + + def __gt__(self, other): + return self >= other and not (self == other) + def is_closed_lid(output): if not re.match(r'(eDP(-?[0-9]\+)*|LVDS(-?[0-9]\+)*)', output): return False -- 2.39.2