feat scratchpads: Support monitor scale
This commit is contained in:
parent
d0fcbf123f
commit
121c11c26b
1 changed files with 2 additions and 1 deletions
|
@ -423,7 +423,8 @@ class Extension(Plugin): # pylint: disable=missing-class-docstring
|
||||||
p = int(s[:-1])
|
p = int(s[:-1])
|
||||||
if p < 0 or p > 100:
|
if p < 0 or p > 100:
|
||||||
raise Exception(f"Percentage must be in range [0; 100], got {p}")
|
raise Exception(f"Percentage must be in range [0; 100], got {p}")
|
||||||
return int(monitor[dim] * p / 100)
|
scale = float(monitor["scale"])
|
||||||
|
return int(monitor[dim] / scale * p / 100)
|
||||||
else:
|
else:
|
||||||
raise Exception(f"Unsupported format for dimension {dim} size, got {s}")
|
raise Exception(f"Unsupported format for dimension {dim} size, got {s}")
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue