Skip to content

Commit

Permalink
Black fixes for earlier commits
Browse files Browse the repository at this point in the history
  • Loading branch information
elParaguayo authored and ramnes committed Nov 4, 2023
1 parent 8ab739b commit 850bd79
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 23 deletions.
4 changes: 3 additions & 1 deletion libqtile/backend/wayland/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,9 @@ def is_visible(self) -> bool:
return self.container.node.enabled

@abc.abstractmethod
def _to_static(self, x: int | None, y: int | None, width: int | None, height: int | None) -> Static:
def _to_static(
self, x: int | None, y: int | None, width: int | None, height: int | None
) -> Static:
# This must return a new `Static` subclass instance
pass

Expand Down
4 changes: 3 additions & 1 deletion libqtile/backend/wayland/xdgwindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,9 @@ def static(

hook.fire("client_managed", win)

def _to_static(self, x: int | None, y: int | None, width: int | None, height: int | None) -> XdgStatic:
def _to_static(
self, x: int | None, y: int | None, width: int | None, height: int | None
) -> XdgStatic:
return XdgStatic(
self.core,
self.qtile,
Expand Down
5 changes: 4 additions & 1 deletion libqtile/backend/wayland/xwindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,9 @@ def static(
Window.static(self, screen, x, y, width, height)
hook.fire("client_managed", self.qtile.windows_map[self._wid])

def _to_static(self, x: int | None, y: int | None, width: int | None, height: int | None) -> XStatic:
def _to_static(
self, x: int | None, y: int | None, width: int | None, height: int | None
) -> XStatic:
return XStatic(
self.core, self.qtile, self, self._idle_inhibitors_count, x, y, width, height
)
Expand All @@ -347,6 +349,7 @@ class ConfigWindow:
Reproduced here to remove a dependency on xcffib.
"""

X = 1
Y = 2
Width = 4
Expand Down
24 changes: 4 additions & 20 deletions test/test_when.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,26 +54,10 @@ class WhenConfig(Config):
focused=config.Match(wm_class="TestWindow"), if_no_focused=True
),
),
config.Key(
["control"],
"t",
lazy.next_layout().when(condition=1 + 1 == 2)
),
config.Key(
["control"],
"f",
lazy.next_layout().when(condition=1 + 1 == 3)
),
config.Key(
["control", "shift"],
"t",
lazy.next_layout().when(func=lambda: True)
),
config.Key(
["control", "shift"],
"f",
lazy.next_layout().when(func=lambda: False)
),
config.Key(["control"], "t", lazy.next_layout().when(condition=1 + 1 == 2)),
config.Key(["control"], "f", lazy.next_layout().when(condition=1 + 1 == 3)),
config.Key(["control", "shift"], "t", lazy.next_layout().when(func=lambda: True)),
config.Key(["control", "shift"], "f", lazy.next_layout().when(func=lambda: False)),
]
layouts = [layout.MonadWide(), layout.MonadTall()]

Expand Down

0 comments on commit 850bd79

Please sign in to comment.