Hyprland#
- class ignis.services.hyprland.HyprlandService(*args: Any, **kwargs: Any)#
Hyprland IPC client.
- Raises:
HyprlandIPCNotFoundError -- If Hyprland IPC is not found.
Note
The contents of
dict
properties are not described here. To find out their contents just print them into the terminal.>>> print(hyprland.workspaces) [ { "id": 1, "name": "1", "monitor": "DP-1", "monitorID": 1, "windows": 1, "hasfullscreen": False, "lastwindow": "0x561dc35d2e80", "lastwindowtitle": "hyprland.py - ignis - Visual Studio Code", }, { "id": 10, "name": "10", "monitor": "HDMI-A-1", "monitorID": 0, "windows": 1, "hasfullscreen": False, "lastwindow": "0x561dc3845f30", "lastwindowtitle": "Type hints cheat sheet - mypy 1.11.2 documentation — Mozilla Firefox", }, ]
>>> print(hyprland.active_window) { "address": "0x561dc35d2e80", "mapped": True, "hidden": False, "at": [1942, 22], "size": [1876, 1036], "workspace": {"id": 1, "name": "1"}, "floating": False, "pseudo": False, "monitor": 1, "class": "code-url-handler", "title": "hyprland.py - ignis - Visual Studio Code", "initialClass": "code-url-handler", "initialTitle": "Visual Studio Code", "pid": 1674, "xwayland": False, "pinned": False, "fullscreen": 0, "fullscreenClient": 0, "grouped": [], "tags": [], "swallowing": "0x0", "focusHistoryID": 0, }
Example usage:
from ignis.services.hyprland import HyprlandService hyprland = HyprlandService.get_default() print(hyprland.workspaces) print(hyprland.kb_layout) hyprland.connect("notify::kb-layout", lambda x, y: print(hyprland.kb_layout))