{"id":13605062,"url":"https://github.com/dudik/herbe","last_synced_at":"2025-04-07T21:27:28.015Z","repository":{"id":39652640,"uuid":"281126658","full_name":"dudik/herbe","owner":"dudik","description":"Daemon-less notifications without D-Bus. Minimal and lightweight.","archived":false,"fork":false,"pushed_at":"2024-05-25T18:36:46.000Z","size":168,"stargazers_count":517,"open_issues_count":31,"forks_count":40,"subscribers_count":16,"default_branch":"master","last_synced_at":"2024-11-07T09:44:14.552Z","etag":null,"topics":["c","daemon-less","lightweight","minimal","notifications"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dudik.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-20T13:39:19.000Z","updated_at":"2024-10-03T10:56:07.000Z","dependencies_parsed_at":"2024-11-07T09:34:54.129Z","dependency_job_id":null,"html_url":"https://github.com/dudik/herbe","commit_stats":{"total_commits":60,"total_committers":3,"mean_commits":20.0,"dds":0.35,"last_synced_commit":"dec89e4d669a38a3f6dd8a6f2e2bae39f26369d3"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dudik%2Fherbe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dudik%2Fherbe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dudik%2Fherbe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dudik%2Fherbe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dudik","download_url":"https://codeload.github.com/dudik/herbe/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247731769,"owners_count":20986729,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","daemon-less","lightweight","minimal","notifications"],"created_at":"2024-08-01T19:00:54.235Z","updated_at":"2025-04-07T21:27:27.860Z","avatar_url":"https://github.com/dudik.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"# 🌱 herbe\n\u003e Daemon-less notifications without D-Bus. Minimal and lightweight.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://user-images.githubusercontent.com/24730635/90975811-cd62fd00-e537-11ea-9169-92e68a71d0a0.gif\" /\u003e\n\u003c/p\u003e\n\n## Features\n* Under 200 lines of code\n* Doesn't run in the background, just displays the notification and exits\n* No external dependencies except Xlib and Xft\n* Configurable through `config.h` or Xresources ([using this patch](https://github.com/dudik/herbe/pull/11))\n* [Actions support](#actions)\n* Extensible through [patches](https://github.com/dudik/herbe/pulls?q=is%3Aopen+is%3Apr+label%3Apatch)\n\n## Table of contents\n\n* [Usage](#usage)\n  * [Patches](#patches)\n  * [Dismiss a notification](#dismiss-a-notification)\n  * [Actions](#actions)\n  * [Newlines](#newlines)\n  * [Multiple notifications](#multiple-notifications)\n  * [Notifications don't show up](#notifications-dont-show-up)\n* [Installation](#installation)\n  * [Packages](#packages)\n  * [Dependencies](#dependencies)\n  * [Build](#build)\n* [Configuration](#configuration)\n* [Contribute](#contribute)\n\n## Usage\n\n### Patches\n[List of available patches](https://github.com/dudik/herbe/pulls?q=is%3Aopen+is%3Apr+label%3Apatch)\n\nTo create a new patch you'll have to open a pull request with your changes. Append `.diff` to the pull request URL to get a downloadable diff file. Don't forget to prefix the title with `patch:` and to apply the `patch` label to it. For inspiration, look at [my Xresources patch](https://github.com/dudik/herbe/pull/11). Thank you.\n\n_Note: This patching method was heavily inspired by [dylan's sowm](https://github.com/dylanaraps/sowm)._\n\n### Dismiss a notification\nA notification can be dismissed either by clicking on it with `DISMISS_BUTTON` (set in config.h, defaults to left mouse button) or sending a `SIGUSR1` signal to it:\n```shell\n$ pkill -SIGUSR1 herbe\n```\nDismissed notifications return exit code 2.\n\n### Actions\nAction is a piece of shell code that runs when a notification gets accepted. Accepting a notification is the same as dismissing it, but you have to use either `ACTION_BUTTON` (defaults to right mouse button) or the `SIGUSR2` signal.\nAn accepted notification always returns exit code 0. To specify an action:\n```shell\n$ herbe \"Notification body\" \u0026\u0026 echo \"This is an action\"\n```\nWhere everything after `\u0026\u0026` is the action and will get executed after the notification gets accepted.\n\n### Newlines\nEvery command line argument gets printed on a separate line by default e.g.:\n```shell\n$ herbe \"First line\" \"Second line\" \"Third line\" ...\n```\nYou can also use `\\n` e.g. in `bash`:\n```shell\n$ herbe $'First line\\nSecond line\\nThird line'\n```\nBut by default `herbe` prints `\\n` literally:\n```shell\n$ herbe \"First line\\nStill the first line\"\n```\nOutput of other programs will get printed correctly, just make sure to escape it (so you don't end up with every word on a separate line):\n```shell\n$ herbe \"$(ps axch -o cmd:15,%cpu --sort=-%cpu | head)\"\n```\n\n### Multiple notifications\nNotifications are put in a queue and shown one after another in order of creation (first in, first out). They don't overlap and each one is shown for its entire duration.\n\n### Notifications don't show up\nMost likely a running notification got terminated forcefully (SIGKILL or any uncaught signal) which caused the semaphore not getting unlocked. First, kill any `herbe` instance that is stuck:\n```shell\n$ pkill -SIGKILL herbe\n```\nThen just call `herbe` without any arguments:\n```shell\n$ herbe\n```\nNotifications should now show up as expected.\n\nDon't ever send any signals to `herbe` except these:\n```shell\n# same as pkill -SIGTERM herbe, terminates every running herbe process\n$ pkill herbe\n\n$ pkill -SIGUSR1 herbe\n$ pkill -SIGUSR2 herbe\n```\nAnd you should be fine. That's all you really need to interact with `herbe`.\n\n## Installation\n### Packages\n[![Packaging status](https://repology.org/badge/vertical-allrepos/herbe.svg)](https://repology.org/project/herbe/versions)\n\n[OpenBSD patch](https://github.com/dudik/herbe/pull/4)\n\n[FreeBSD patch](https://github.com/dudik/herbe/pull/16)\n\n[Wayland port](https://github.com/muevoid/Wayherb) by [muevoid](https://github.com/muevoid)\n\n**Only the [herbe-git AUR package](https://aur.archlinux.org/packages/herbe-git/) is maintained by me.**\n\n### Dependencies\n* X11 (Xlib)\n* Xft\n\nThe names of packages are different depending on which distribution you use.\nFor example, if you use [Void Linux](https://voidlinux.org/) you will have to install these dependencies:\n```shell\nsudo xbps-install base-devel libX11-devel libXft-devel\n```\n\n### Build\n```shell\ngit clone https://github.com/dudik/herbe\ncd herbe\nsudo make install\n```\n`make install` requires root privileges because it copies the resulting binary to `/usr/local/bin`. This makes `herbe` accessible globally.\n\nYou can also use `make clean` to remove the binary from the build folder, `sudo make uninstall` to remove the binary from `/usr/local/bin` or just `make` to build the binary locally.\n\n## Configuration\nherbe is configured at compile-time by editing `config.h`. Every option should be self-explanatory. There is no `height` option because height is determined by font size and text padding.\n\n[Xresources patch](https://github.com/dudik/herbe/pull/11)\n\n## Contribute\nIf you want to report a bug or you have a feature request, feel free to [open an issue](https://github.com/dudik/herbe/issues).\n\n## Projects with herbe integration\n- [qutebrowser](https://qutebrowser.org/) supports showing web notifications via herbe, via the `content.notifications.presenter` setting.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdudik%2Fherbe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdudik%2Fherbe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdudik%2Fherbe/lists"}