Skip to main content

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

Project description

Hyprland-py

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

Todo

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

Install

git

from git

pip install git+https://github.com/hyprland-community/hyprland-py

release

from pypi

pip install hyprland.py

Example

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

import hyprland

class Config(hyprland.Events):
    def __init__(self):
        self.c = hyprland.Config()
        super().__init__()
    
    async def on_connect(self):
        print("Connected to the server!")
        self.c.general.border_size = 10
        await self.c.decoration.set_rounding(10)


    async def on_any(self,*args,**kwargs):
        print(f"any: {args}")
    

c = Config()

c.async_connect()

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.1.tar.gz (12.5 kB view hashes)

Uploaded Source

Built Distribution

hyprland-0.1-py3-none-any.whl (13.3 kB view hashes)

Uploaded Python 3

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