Skip to content

Commit 9d07a5c

Browse files
committed
scratchpads.show: add some workaround for recent hyprland versions
Scratchpad wasn't always centered on first show
1 parent 87e2e81 commit 9d07a5c

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

pyprland/plugins/scratchpads/objects.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
__all__ = ["Scratch"]
44

5+
import asyncio
56
import logging
67
import os
78
from dataclasses import dataclass, field
@@ -122,6 +123,7 @@ async def initialize(self, ex: "_scratchpads_extension_m.Extension") -> None:
122123
self.client_info = m_client
123124
assert self.client_info, "couldn't find a matching client"
124125
await ex.hyprctl(f"movetoworkspacesilent special:scratch_{self.uid},address:{self.full_address}")
126+
await asyncio.sleep(0.001) # workaround
125127
self.meta.initialized = True
126128

127129
async def is_alive(self) -> bool:

pyprland/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
"""Package version."""
22

3-
VERSION = "2.4.5-15"
3+
VERSION = "2.4.5-17"

0 commit comments

Comments
 (0)