Browse Source

Add rotation and reflection enums

reflection and rotation are added from man page
pull/2/head
Ali Hatami Tajik 2 years ago
parent
commit
86c1235598
  1. 37
      src/scripts/python/xutil/randr.py

37
src/scripts/python/xutil/randr.py

@ -24,6 +24,11 @@ from enum import Enum
from dataclasses import dataclass
# TODO: Option class which can be applied by get_args method
# TODO: Screen-related option class ~
# TODO: abs position
class Pos(Enum):
"""Position types in xrandr
@ -34,3 +39,35 @@ class Pos(Enum):
ABOVE = 2,
BELOW = 3,
SAME_AS = 4
class RotationDir(Enum):
"""Rotation direction
This causes the output contents to be rotated in the specified direction.
"""
NORMAL = 0,
LEFT = 1,
RIGHT = 2,
INVERTED = 3
class ReflectDir(Enum):
"""Reflection direction
This causes the output contents to be reflected across the specified axes.
"""
NORMAL = 0,
X = 1,
Y = 2,
XY = 3
@dataclass
class Setting:
resolution = None,
is_primary = False,
is_enabeled = True,
rotation = None
position = None
reflection = None

Loading…
Cancel
Save