Skip to content

Commit

Permalink
Swap dim if monitor has a transform
Browse files Browse the repository at this point in the history
  • Loading branch information
ZarredFelicite authored and fdev31 committed Dec 1, 2023
1 parent d85ff23 commit 86748d8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pyprland/plugins/scratchpads.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ def convert_coords(logger, coords, monitor):

def convert(size, dim):
scale = float(monitor["scale"])
if monitor["transform"] in [1, 3]:
if dim == "width":
dim = "height"
elif dim == "height":
dim = "width"
if size[-1] == "%":
p = int(size[:-1])
if p < 0 or p > 100:
Expand Down

0 comments on commit 86748d8

Please sign in to comment.