Skip to main content

An unofficial async python wrapper for Hyprland's IPC supposed to somewhat work like awesomewm api in lua

Project description


An unofficial async python wrapper for Hyprland's IPC supposed to somewhat work like awesomewm api in lua


  • async sockets
  • change config options
  • event listeners
  • keybinds
  • windowrules
  • hyprland info
  • misc hyprland commands(change workspace, move active window etc...)(dispatchers)
  • a nice way to handle colors
  • build file based on current hl version
  • get config values from the current hyprland config instead of using default values

getting binds still dont work

  • docs
  • widgets??



from git

pip install git+


from pypi

pip install hyprland


change window border to a random number between 0 and 20 everytime a new window is opened

import hyprland
from hyprland import Bind, BindFlag

class Config(hyprland.Events):
    def __init__(self):
        self.c = hyprland.Config()

    async def terminal(self):
        await hyprland.Dispatch.exec("kitty --single-instance")
    async def on_connect(self):
        print("Connected to hyprland")
        await self.c.add_binds([
            # general binds

            # mouse binds

            # keyboard binds

        # workspace binds
        for i in range(1,11):
            await self.c.add_bind(Bind([f"SUPER",str(i) if i!= 10 else str(0)],hyprland.Dispatch.workspace,args=[i]))
        for i in range(1,11):
            await self.c.add_bind(Bind([f"ALT",str(i) if i!= 10 else str(0)],hyprland.Dispatch.move_to_workspace,args=[i]))

c = Config()


Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hyprland-0.2.54.tar.gz (14.0 kB view hashes)

Uploaded source

Built Distribution

hyprland-0.2.54-py3-none-any.whl (15.2 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page