Skip to content

Commit

Permalink
Version 2.2.9
Browse files Browse the repository at this point in the history
  • Loading branch information
fdev31 committed Apr 19, 2024
1 parent a92951c commit 295014b
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pyprland/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ async def run_client():
manager = Pyprland()

if sys.argv[1] == "version":
print("2.2.8-12") # Automatically updated version
print("2.2.9") # Automatically updated version
return

if sys.argv[1] == "edit":
Expand Down
7 changes: 4 additions & 3 deletions pyprland/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,10 @@ def get_logger(name="pypr", level=None) -> logging.Logger:

@dataclass(order=True)
class VersionInfo:
major: int = 0
minor: int = 0
micro: int = 0
"Stores version information"
major: int = 0 # noqa: F841
minor: int = 0 # noqa: F841
micro: int = 0 # noqa: F841


@dataclass
Expand Down
6 changes: 4 additions & 2 deletions pyprland/plugins/pyprland.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ async def init(self):
state.hyprland_version = VersionInfo(
*(int(i) for i in version[1:].split(".")[:3])
)
except Exception:
self.log.error("Fail to parse hyprctl version.")
except Exception as e: # pylint: disable=broad-except
self.log.error("Fail to parse hyprctl version: %s", e)
await self.notify_error("Fail to parse hyprctl version")
state.hyprland_version = VersionInfo(0, 0, 0)

state.active_workspace = (await self.hyprctlJSON("activeworkspace"))["name"]
monitors = await self.hyprctlJSON("monitors")
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pyprland"
version = "2.2.8"
version = "2.2.9"
description = "Hyperland plugin system - batteries included"
authors = ["fdev31 <[email protected]>"]
license = "MIT"
Expand Down
11 changes: 11 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,17 @@ async def mocked_hyprctlJSON(command, logger=None):
return deepcopy(MONITORS)
if command == "activeworkspace":
return {"name": "1", "id": 1}
if command == "version":
return {
"branch": "",
"commit": "fe7b748eb668136dd0558b7c8279bfcd7ab4d759",
"dirty": False,
"commit_message": "props: bump version to 0.39.1",
"commit_date": "Tue Apr 16 16:01:03 2024",
"tag": "v0.39.1",
"commits": 4460,
"flags": [],
}
raise NotImplementedError()


Expand Down

0 comments on commit 295014b

Please sign in to comment.