From 14c0b143fa656e3ac8095941875072a01cb1a69b Mon Sep 17 00:00:00 2001 From: Ali Hatami Tajik Date: Sat, 4 Mar 2023 14:08:12 +0330 Subject: [PATCH] Add randr module This module is meant to provide a wrapper around xrandr. + Pos enum added which is position of screens - commandline options should be applied to it. --- src/scripts/python/xutil/randr.py | 36 +++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 src/scripts/python/xutil/randr.py diff --git a/src/scripts/python/xutil/randr.py b/src/scripts/python/xutil/randr.py new file mode 100644 index 0000000..1d2637f --- /dev/null +++ b/src/scripts/python/xutil/randr.py @@ -0,0 +1,36 @@ + +"""RandR + +Author: Ali Hatami Tajik [hatam](mailto:a.hatam008@gmail.com) +Date: 2023 Mar 04 + +--- +This module provides a wrapper utility around xrandr. + +Classes: + Mode + Setting + Screen + Dir + Pos + + +Utilities: + get_screens + +""" + +from enum import Enum +from dataclasses import dataclass + + +class Pos(Enum): + """Position types in xrandr + + Position the output relative to the position of another output. + """ + LEFT_OF = 0, + RIGHT_OF = 1, + ABOVE = 2, + BELOW = 3, + SAME_AS = 4