Keyboard driven and lightweight Wayland notification daemon for wlroots-based compositors.
 
 
 
Go to file
Daniel Eklöf c6b93ff28b
ci/woodpecker/push/woodpecker Pipeline failed Details
shm: try with MFD_NOEXEC_SEAL first, then without
MFD_NOEXEC_SEAL is only supported on kernels 6.3 and later.

If we were compiled on linux >= 6.3, but run on linux < 6.3, we'd exit
with an error, due to memfd_create() failing with EINVAL.

This patch fixes the problem by first trying to call
memfd_create() *with* MFD_NOEXEC_SEAL, and if that fails with EINVAL,
we try again without it.
2023-10-13 16:37:31 +02:00
.builds ci (sr.ht): pull directly from git.sr.ht 2022-08-23 16:44:35 +02:00
3rd-party/nanosvg nanosvg: update to 9da543e 2022-12-04 19:47:55 +01:00
completions completions: zsh: add -c,--config=PATH 2021-05-12 21:53:00 +02:00
doc config: add ‘dpi-aware=no|yes|auto’ option 2023-02-23 17:16:09 +01:00
external wayland: add support for the KDE idle protocol 2022-10-21 20:06:29 +02:00
subprojects subprojects: use meson wrap files for tllist+fcft 2020-12-25 11:58:06 +01:00
.gitignore gitignore: ignore compile_commands.json 2021-06-13 15:39:34 +02:00
.gitmodules update wlr-protocols url 2022-07-27 22:15:09 -05:00
.woodpecker.yml ci: 'pipeline' -> 'steps' 2023-08-18 16:49:32 +02:00
CHANGELOG.md changelog: add new ‘unreleased’ section 2023-07-14 08:42:51 +02:00
LICENSE license: fix bad copy-paste: first commit was in 2019 2020-07-25 08:51:33 +02:00
PKGBUILD meson+pkgbuild: update to 1.4.1 2023-07-14 08:41:24 +02:00
README.md docs: inform user about manual dbus user session 2023-07-16 11:29:08 +02:00
char32.c char32: include stdc-predef.h to ensure we pull in __STDC_ISO_10646__ 2023-03-31 13:08:19 +02:00
char32.h fcft: adapt to API changes in fcft-3.x 2022-02-05 16:40:58 +01:00
config.c config: apply fontconfig rules if user didn’t set an explicit font size 2023-03-03 18:17:42 +01:00
config.h config: add ‘dpi-aware=no|yes|auto’ option 2023-02-23 17:16:09 +01:00
ctrl-protocol.h ctrl: actions: detect when notification has no actions and report this specifically 2019-11-19 11:35:14 +01:00
ctrl.c ctrl: refactor: add client_disconnected() 2021-11-14 19:29:49 +01:00
ctrl.h ctrl: add a dbus member to the ctrl object 2019-10-18 23:27:53 +02:00
dbus.c dbus: parse file:// URIs in icon paths 2022-10-28 10:39:43 +02:00
dbus.h dbus: implement dbus_signal_action() 2019-10-18 23:27:21 +02:00
fdm.c tllist: is now an external "library", so use <> includes 2019-11-17 19:19:17 +01:00
fdm.h fdm: sync with latest FDM - fdm_del() now closes FD 2019-11-05 10:58:30 +01:00
fnott.desktop Add fnott.desktop 2019-10-12 20:12:41 +02:00
fnott.ini config: add ‘dpi-aware=no|yes|auto’ option 2023-02-23 17:16:09 +01:00
fnottctl.c fnottctl: initialize logger 2021-11-14 19:13:45 +01:00
generate-version.sh generate-version: handle git repo not having any tags 2021-10-11 20:25:37 +02:00
icon.c icon: fix FD leak: close theme directory FD 2022-05-20 17:56:43 +02:00
icon.h icon: performance and correctness fixes to icon lookup 2022-04-24 13:36:44 +02:00
log.c log: make syslog facility and level configurable, always log filename+lineno 2020-02-20 20:00:04 +01:00
log.h log: make syslog facility and level configurable, always log filename+lineno 2020-02-20 20:00:04 +01:00
main.c config: add ‘default-icon’ option (per-urgency option) 2022-10-27 13:53:55 +02:00
meson.build meson+pkgbuild: update to 1.4.1 2023-07-14 08:41:24 +02:00
nanosvg.c nanosvg: define NANOSVG_ALL_COLOR_KEYWORDS 2023-03-21 09:02:54 +01:00
nanosvgrast.c nanosvg: pull in the full source tree 2021-10-04 21:41:45 +02:00
notification.c notification: commit surface, even when there’s already a pending buffer 2023-06-13 17:08:53 +02:00
notification.h notif: defer expiration and dismissal while showing action selection helper 2023-03-27 20:56:43 +02:00
png-fnott.h png: loads PNG files into pixman images 2019-10-11 21:01:42 +02:00
png.c png: make sure image_data is initialized before the first 'goto err' 2019-10-25 18:23:44 +02:00
screenshot-2.png readme: add second screenshot, with multiple notifications 2022-10-28 11:03:06 +02:00
screenshot.png Revert "screenshot: reduce size" 2022-10-28 11:11:24 +02:00
shm.c shm: try with MFD_NOEXEC_SEAL first, then without 2023-10-13 16:37:31 +02:00
shm.h wip: inital frame rendering of notification box 2019-10-08 19:07:23 +02:00
spawn.c spawn: new utility functions to expand and spawn a command template 2021-06-13 15:40:24 +02:00
spawn.h spawn: new utility functions to expand and spawn a command template 2021-06-13 15:40:24 +02:00
stride.h playing around with libdbus - we can receive notifications 2019-10-06 18:43:29 +02:00
svg.c svg: pre-multiply alpha 2021-10-07 19:16:11 +02:00
svg.h icon: use nanosvg to rasterize SVG images 2019-10-12 17:12:23 +02:00
tokenize.c config: add ‘play-sound’ option to fnott.ini 2021-06-13 15:40:24 +02:00
tokenize.h config: add ‘play-sound’ option to fnott.ini 2021-06-13 15:40:24 +02:00
uri.c uri: deocoded_len is unused 2023-03-31 13:07:52 +02:00
uri.h dbus: parse file:// URIs in icon paths 2022-10-28 10:39:43 +02:00
wayland.c config: add ‘dpi-aware=no|yes|auto’ option 2023-02-23 17:16:09 +01:00
wayland.h config: add ‘dpi-aware=no|yes|auto’ option 2023-02-23 17:16:09 +01:00
xdg.c icon: performance and correctness fixes to icon lookup 2022-04-24 13:36:44 +02:00
xdg.h icon: performance and correctness fixes to icon lookup 2022-04-24 13:36:44 +02:00

README.md

CI status

Fnott

Fnott is a keyboard driven and lightweight notification daemon for wlroots-based Wayland compositors.

It implements (parts of) the Desktop Notifications Specification.

Packaging status

Supports styling and progress hints:

screenshot

Notifications are automatically sized (with the possibility of limiting their max width and height):

screenshot-2

Supported features

  • Summary
  • Body
  • Actions (requires a dmenu-like utility to display and let user select action)
  • Urgency
  • Icons
    • PNGs (using libpng)
    • SVGs (using bundled nanosvg)
  • Markup
  • Timeout

More documentation is available in the installed man pages:

Requirements

Running

  • fontconfig
  • freetype
  • pixman
  • libpng
  • wayland (client and cursor libraries)
  • wlroots*
  • dbus
  • fcft, unless built as a subproject

* Fnott must be run in a Wayland compositor that implements the wlroots protocols.

Building

In addition to the dev variant of the packages above, you need:

  • meson
  • ninja
  • scdoc
  • wayland-protocols
  • tllist, unless built as a subproject

Usage

Copy the example fnott.ini to ${HOME}/.config/fnott/fnott.ini and edit to your liking.

Start the daemon by running fnott. Note that it does not daemonize or background itself.

Note: if your environment doesn't do it automatically (e.g. non-systemd), you need to start a dbus session yourself:

dbus-daemon --session --address=unix:path=$XDG_RUNTIME_DIR/bus

Test it with e.g. notify-send "this is the summary" "this is the body".

Use fnottctl dismiss to dismiss the highest priority notification (usually the oldest), fnottctl dismiss all to dismiss all notifications, or fnottctl dismiss <id> to dismiss a specific notification (use fnottctl list to list currently active notifications).

Additionally if you compositor implements either the KDE idle protocol, or the newer idle-notify protocol, fnott will not dismiss any notification if you are idle by the amount of time configured in fnott.ini

You can also click on a notification to dismiss it.

Note: you probably want to bind at least fnottctl dismiss to a keyboard shortcut in your Wayland compositor configuration.

Installation

To build, first, create a build directory, and switch to it:

mkdir -p bld/release && cd bld/release

Second, configure the build (if you intend to install it globally, you might also want --prefix=/usr):

meson --buildtype=release ../..

Three, build it:

ninja

You can now run it directly from the build directory:

./fnott

Test that it works:

notify-send -a "MyApplicationName" "This Is The Summary" "hello world"

Optionally, install it:

ninja install

License

Fnott is released under the MIT license.

Fnott uses nanosvg, released under the Zlib license.