Skip to content

Commit

Permalink
ALL: Renamed findMonitors() and findMonitorsInfo to findMonitorsAtPoi…
Browse files Browse the repository at this point in the history
…nt() and findMonitorsAtPointInfo().

Added findMonitorWithName() and findMonitorWithNameInfo()
Added typing_extensions dependency at runtime
  • Loading branch information
Kalmat committed Sep 19, 2023
1 parent 9706eec commit e6824c3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Binary file modified dist/PyMonCtl-0.6-py3-none-any.whl
Binary file not shown.
8 changes: 4 additions & 4 deletions src/pymonctl/_pymonctl_linux.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ def mode(self) -> Optional[DisplayMode]:
if ret:
try:
res = ret.split(" ")
lines = list(filter(None, res))
lines: List[str] = list(filter(None, res))
w, h = lines[0].split("x")
r = float(lines[1].replace("+", "").replace("*", ""))
value = DisplayMode(int(w), int(h), r)
Expand All @@ -418,7 +418,7 @@ def defaultMode(self) -> Optional[DisplayMode]:
if ret:
try:
res = ret.split(" ")
lines = list(filter(None, res))
lines: List[str] = list(filter(None, res))
a, b = lines[0].split("x")
w = int(a)
h = int(b)
Expand Down Expand Up @@ -498,7 +498,7 @@ def isSuspended(self) -> Optional[bool]:
cmd = "xset -q | grep ' Monitor is ' | awk '{ print$4 }'"
ret = _runProc(cmd)
if ret:
return ret == "Standby"
return bool(ret == "Standby")
return None

def attach(self):
Expand Down Expand Up @@ -630,7 +630,7 @@ def _scale(name: str = "") -> Optional[Tuple[float, float]]:
if ret:
try:
res = ret.split(" ")
lines = list(filter(None, res))
lines: List[str] = list(filter(None, res))
a, b = lines[0].split("x")
w = int(a)
h = int(b)
Expand Down

0 comments on commit e6824c3

Please sign in to comment.