Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/vilari-mickopf/hyprevents

Invoke shell functions in response to Hyprland socket2 events
https://github.com/vilari-mickopf/hyprevents

events hyprland socket2 wayland

Last synced: 6 days ago
JSON representation

Invoke shell functions in response to Hyprland socket2 events

Awesome Lists containing this project

README

        

# hyprevents
Invoke shell functions in response to Hyprland socket2 events. Forked from [hyprwm](https://github.com/hyprwm/contrib). hyprevents reads Hyprland events from stdin as documented at [wiki](http://wiki.hyprland.org/IPC/#tmphyprhissocket2sock).

The event string is parsed, splitting the data into individual arguments for each event received, a function with the name event_ is invoked when invoked, the data is passed as named arguments

## Dependencies
- `hyprland` obviously
- `socat` to connect with hyprland events
- `make`

## Install
```bash
yay -S hyprevents-git
```
or
```bash
sudo make install
```

## Usage
```bash
cp event_handler custom_event_handler
```
In `custom_event_handler` add implementations for the events you want to handle and run:
```bash
hyprevents --file custom_event_handler
```

Reload event handler with:
```bash
hyprevents -f custom_event_handler --reload
```

Kill event handler with:
```bash
hyprevents -f custom_event_handler --kill
```