fix: Hyprland socket address update

This commit is contained in:
Leni Aniva 2024-05-31 00:04:19 -07:00
parent 301b57ec06
commit 133b8f59fb
Signed by: aniva
GPG Key ID: 4D9B1C8D10EA4C50
1 changed files with 3 additions and 1 deletions

View File

@ -113,7 +113,9 @@ def detect():
Main entry point, detects the type of compositor used Main entry point, detects the type of compositor used
""" """
if signature := os.environ.get("HYPRLAND_INSTANCE_SIGNATURE", None): if signature := os.environ.get("HYPRLAND_INSTANCE_SIGNATURE", None):
socket_addr = f"/tmp/hypr/{signature}/.socket2.sock" # See https://wiki.hyprland.org/IPC/
xdg_runtime_dir = os.environ["XDG_RUNTIME_DIR"]
socket_addr = f"/{xdg_runtime_dir}/hypr/{signature}/.socket2.sock"
return hypr_listen(socket_addr) return hypr_listen(socket_addr)
if signature := os.environ.get("SWAYSOCK", None): if signature := os.environ.get("SWAYSOCK", None):
return sway_listen() return sway_listen()