Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/vilari-mickopf/hyprevents
- Owner: vilari-mickopf
- Created: 2022-12-06T01:41:55.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-08-24T10:37:42.000Z (3 months ago)
- Last Synced: 2024-08-24T11:44:12.628Z (3 months ago)
- Topics: events, hyprland, socket2, wayland
- Language: Shell
- Homepage:
- Size: 28.3 KB
- Stars: 8
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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
```