hyprnotify
hyprnotify copied to clipboard
DBus Implementation of Freedesktop Notification spec for 'hyprctl notify'
Table of Contents
- About The Project
-
Getting Started
- Arch Linux
- Other Linux Distributions
- Building from Source
- Usage
- Roadmap
- Contributing
- License
- Contact
- Acknowledgments
About The Project
Hyprnotify is a Freedesktop.org compliant notification daemon implementing hyprctl notify as its backend.

(back to top)
Getting Started
To get hyprnotify you can either download the binary build by github actions. Or build it locally.
Arch Linux
hyprnotify is available on the AUR. You can install it with a AUR helper like yay.
yay -S hyprnotify
Other Linux Distributions
You can download the release binaries directly from the releases page.
Building from Source
Prerequisites
gocompileralsa-liborlibasoundfor sound supportlibnotifyto send notifications withnotify-send(optional)
Compiling
- Clone the repo and cd into it
git clone https://github.com/codelif/hyprnotify.git cd hyprnotify - Build
go build ./cmd/hyprnotify - Run the binary
./hyprnotify
(back to top)
Usage
Execute the daemon:
hyprnotify
Examples
Send a notification:
notify-send "Hello, World!"
Add a font-size hint:
notify-send "This is very big!" -h int:x-hyprnotify-font-size:40
Add an urgency hint and last for 20 seconds:
notify-send "This is serious stuff!" -u critical -t 20000
Custom Hints
| Hint | Example | Comment |
|---|---|---|
x-hyprnotify-font-size |
int:x-hyprnotify-font-size:30 |
font size for notification |
x-hyprnotify-color |
string:x-hyprnotify-color:#ff30fa |
hex color code for notif. color |
x-hyprnotify-icon |
int:x-hyprnotify-icon:3 |
icon identifier for notification |
x-hyprnotify-icon
| ID | Icon | Preview |
|---|---|---|
0 |
WARNING | |
1 |
INFO | |
2 |
HINT | |
3 |
ERROR | |
4 |
CONFUSED | |
5 |
OK |
Audio Playback
A notification sound is played along with a notification.
To disable this behaviour pass --silent flag when executing.
hyprnotify --silent
--no-sound and -s also works the same way.
Note about replace-id:
When using replace-id with notify-send
notify-send --replace-id=10 "Hello"
All the notifications with IDs of more than replace-id will also be deleted. (11, 12, 13...)
This is due to the inherent design of hyprctl dismissnotify. So, it is not fixable.
Due to this, it is advisable to use it to replace only the latest notification.
(back to top)
Roadmap
- [x] Implement the DBus Specification
- [x] Replace shell command invocation with IPC
- [x] Hints Support:
- [x] urgency
- [x] font-size
- [x] color
- [x] icon
- [ ] Add support for sound
- [x] Default sound support
- [ ] sound hints
- [x] Fix race condition in
CloseNotificationSignal - [ ] Scrap the Project
(back to top)
Contributing
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
(back to top)
License
Distributed under the Apache-2.0 License. See LICENSE for more information.
(back to top)
Contact
Harsh Sharma - @codelif_ - [email protected]
Project Link: https://github.com/codelif/hyprnotify
(back to top)
Acknowledgments
- hyprwm community for Hyprland (special thanks to vaxry)
- go for go
- Freedesktop.org Desktop Notification Specification
(back to top)