Table of Contents
Hyprnotify is a Freedesktop.org compliant notification daemon implementing hyprctl notify
as its backend.
To get hyprnotify you can either download the binary build by github actions. Or build it locally.
hyprnotify
is available on the AUR. You can install it with a AUR helper like yay
.
yay -S hyprnotify
hyprnotify
is available on NixOS unstable.
It is quite simple to add:
- Add the unstable tarball:
let
unstableTarball =
fetchTarball
https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz;
in
# ...
- Add an overlay to use unstable packages
nixpkgs.config = {
packageOverrides = pkgs: {
unstable = import unstableTarball {
config = config.nixpkgs.config;
};
};
};
- Add
unstable.hyprnotify
to yourenvironment.systemPackages
You can download the release binaries directly from the releases page.
go
compileralsa-lib
orlibasound
for sound supportlibnotify
to send notifications withnotify-send
(optional)
- 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
Execute the daemon:
hyprnotify
Argument | Remark |
---|---|
--font-size or -f |
Set custom default font size (default is 13) |
--fixed-font-size |
Ignores font size hints |
--no-sound or -s |
Enable silent mode |
--help |
Displays help text |
Important
It is recommended to set the Hyprland default font-family
to be monospace
on hyprland.conf misc section. Otherwise you may experience unusual spacing and padding. See here: https://wiki.hyprland.org/Configuring/Variables/#misc
Send a notification:
notify-send "Hello, World!"
Send a notification with body text:
notify-send "Chat?" "Is this real"
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
Hint | Example | Remark |
---|---|---|
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 |
ID | Icon | Preview |
---|---|---|
0 |
WARNING | |
1 |
INFO | |
2 |
HINT | |
3 |
ERROR | |
4 |
CONFUSED | |
5 |
OK |
When using replace-id
with notify-send
notify-send --replace-id=10 "Hello"
All the notifications with IDs 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.
- Implement the DBus Specification
- Replace shell command invocation with IPC
- Hints Support:
- urgency
- font-size
- color
- icon
- Add support for sound
- Default sound support
- sound hints
- Fix race condition in
CloseNotification
Signal - Scrap the Project
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
Distributed under the Apache-2.0 License. See LICENSE
for more information.
Harsh Sharma - @codelif_ - harsh@codelif.in
Project Link: https://github.com/codelif/hyprnotify
- hyprwm community for Hyprland (special thanks to vaxry)
- go for go
- Freedesktop.org Desktop Notification Specification