Git Product home page Git Product logo

hyprnotify's Introduction

Contributors Forks Stargazers Issues MIT License Go


Logo

Hyprnotify

A DBus Implementation for 'hyprctl notify'

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. 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

NixOS

hyprnotify is available on NixOS unstable. It is quite simple to add:

  1. Add the unstable tarball:
let
  unstableTarball =
    fetchTarball
      https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz;
in
# ...
  1. Add an overlay to use unstable packages
nixpkgs.config = {
  packageOverrides = pkgs: {
    unstable = import unstableTarball {
      config = config.nixpkgs.config;
    };
  };
};
  1. Add unstable.hyprnotify to your environment.systemPackages

Other Linux Distributions

You can download the release binaries directly from the releases page.

Building from Source

Prerequisites

  • go compiler
  • alsa-lib or libasound for sound support
  • libnotify to send notifications with notify-send (optional)

Compiling

  1. Clone the repo and cd into it
    git clone https://github.com/codelif/hyprnotify.git
    cd hyprnotify
  2. Build
    go build ./cmd/hyprnotify
  3. 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 WARNING
1 INFO INFO
2 HINT HINT
3 ERROR ERROR
4 CONFUSED CONFUSED
5 OK 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

  • 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

(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!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. 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

(back to top)

hyprnotify's People

Contributors

bloeckchengrafik avatar codelif avatar coquer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

hyprnotify's Issues

NixOS Package

Hello,

thanks for building this, just what I need.
I'm currently in the process of publishing a nixos package for hyprnotify. Should I add a installation section for nixos in the readme (like the one for arch) or do you think the repology badge is enough?

Greetings from Germany and have a wonderful day!

Launching hyprnotify on hyprland start causes System to loose Audio

After starting into Hyprland I had no Audio from, anything.
Pavucontrol (and software like Discord/Vesktop) show no input device and only dumy output.

Except notifications still play a sound, and when I killed hyprnotify it restore sound immediatly.
Launching hyprnotify through a terminal will result in Audio being retained, sort of, as the audio starts glitching, notifications are not reliable.

My guess this is Hyprnotify is taking over the Audio device. I am kind of too tired right now to tired to look into the code or even triage further for today.
I have pipewire-pulse and alsa-lib installed, I feel like that could be the culprit.

PS: As a workaround hyprnotify --silent works

More configurations

Nice tool by the way :)
Please is it provides a .config folder to customize it ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.