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: 25 days ago
JSON representation
Invoke shell functions in response to Hyprland socket2 events
- Host: GitHub
- URL: https://github.com/vilari-mickopf/hyprevents
- Owner: vilari-mickopf
- License: mit
- Created: 2022-12-06T01:41:55.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-10-15T10:05:49.000Z (6 months ago)
- Last Synced: 2025-03-24T04:49:26.071Z (about 1 month ago)
- Topics: events, hyprland, socket2, wayland
- Language: Shell
- Homepage:
- Size: 30.3 KB
- Stars: 9
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-hyprland - Hypr Events
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
```