All Projects → kamek-pf → Ntfd

kamek-pf / Ntfd

Licence: gpl-3.0
A lightweight notification daemon for fancy desktop integrations

Programming Languages

haskell
3896 projects

Projects that are alternatives of or similar to Ntfd

Dots
A Repository For Config Files / Dotfiles / Themes / Color Schemes / Etc...
Stars: ✭ 100 (+127.27%)
Mutual labels:  rofi, mpd
Dotfiles
My dotfiles, managed with GNU stow
Stars: ✭ 56 (+27.27%)
Mutual labels:  rofi, mpd
Clerk
clerk - mpd client, based on rofi/fzf
Stars: ✭ 180 (+309.09%)
Mutual labels:  rofi, mpd
Dotfiles
My dotfiles managed by GNU Stow - Arch, i3-gaps, bspwm, ncmpcpp, (neo)vim, zsh etc.
Stars: ✭ 99 (+125%)
Mutual labels:  rofi, mpd
rofi-mpd
shell script for mpd that uses rofi to add songs, albums, playlist, jump to a song in the current playlist etc.
Stars: ✭ 19 (-56.82%)
Mutual labels:  mpd, rofi
Vv
Web App client for MPD(Music Player Daemon)
Stars: ✭ 33 (-25%)
Mutual labels:  mpd
Nmcli Rofi
A simple manager for network connections using rofi and nmcli
Stars: ✭ 39 (-11.36%)
Mutual labels:  rofi
Notifo
Multi channel notification service for collaboration tools, e-commerce, news service and more.
Stars: ✭ 32 (-27.27%)
Mutual labels:  notifications
Easynotifylibproject
Send firebase notifications to your users very easily: A new Android Lib
Stars: ✭ 31 (-29.55%)
Mutual labels:  notifications
Godotnotificationcenter
A notification center for Godot Engine
Stars: ✭ 43 (-2.27%)
Mutual labels:  notifications
Builder
Prepare your Laravel apps incredibly fast, with various commands, services, facades and boilerplates.
Stars: ✭ 1,009 (+2193.18%)
Mutual labels:  notifications
Slimpd
PHP/JS based MPD-web-client for large music collections
Stars: ✭ 37 (-15.91%)
Mutual labels:  mpd
React Notifications Component
Delightful and highly customisable React Component to notify your users
Stars: ✭ 978 (+2122.73%)
Mutual labels:  notifications
Toasty
A notification package for Elm apps.
Stars: ✭ 39 (-11.36%)
Mutual labels:  notifications
Onesignal Python
Python client for OneSignal push notification service
Stars: ✭ 33 (-25%)
Mutual labels:  notifications
Watchtower
A process for automating Docker container base image updates.
Stars: ✭ 9,526 (+21550%)
Mutual labels:  notifications
Nativescript Azure Mobile Apps
☁️ NativeScript plugin for working with Microsoft Azure Mobile Apps services
Stars: ✭ 31 (-29.55%)
Mutual labels:  notifications
Dotfiles
Get ready for dotfiles. Contains i3, i3blocks, rofi, dunst, picom, vim, tmux, and zsh.
Stars: ✭ 985 (+2138.64%)
Mutual labels:  rofi
Cordova Plugin Firebase
Cordova plugin for Google Firebase
Stars: ✭ 997 (+2165.91%)
Mutual labels:  notifications
React Native Ua
React Native module for Urban Airship
Stars: ✭ 37 (-15.91%)
Mutual labels:  notifications

ntfd - Notification daemon

GitHub GitHub release (latest by date)

A lightweight notification daemon for fancy desktop integrations.

ntfd synchronizes with different services and offers synchronous APIs for desktop integration via D-Bus.
It can be used as a data source for Polybar, Rofi or any other similar tool.

ntfd feeding data to Polybar and Dunst

Installation

Arch users can install ntfd-bin from the AUR.
Other Linux users can either grab a statically linked binary from the release page or build from source.
Instructions to build from source can be found at the bottom of the README.

Configuration

If you installed from the AUR, just edit ~/.config/ntfd/config.toml as you need and enable the modules you're interested in.
Keep scrolling for module specific instructions.

If you're building from source, copy config.toml into your config directory, then edit it to enable what you need:

mkdir -p ~/.config/ntfd
cp config.toml ~/.config/ntfd

Usage

First, make sure ntfd is running in the background. You can start it at the begining of you session:

ntfd &

Here are a few example DBus queries you can use from shell scripts, you'll need jq to run the examples:

DBus properties:

# Get the current weather icon
busctl --user -j get-property io.ntfd /weather openweathermap.strings CurrentIcon | jq -r .data

# Rendered version of the configured weather template:
busctl --user -j get-property io.ntfd /weather openweathermap.strings RenderedTemplate | jq -r .data

DBus methods:

# Supported units are "celsius", "kelvin" and "fahrenheit":

# Current temperature in celsius:
busctl --user -j call io.ntfd /weather openweathermap.strings CurrentTemperature s "celsius" | jq -r '.data[0]'

# Forecast temperature in fahrenheit:
busctl --user -j call io.ntfd /weather openweathermap.strings CurrentTemperature s "fahrenheit" | jq -r '.data[0]'

To explore the DBus API, I recommend d-feet, a graphical tool to explore DBus interfaces.
In d-feet, go to the Session Bus tab from the top bar, and look for io.ntfd.

The busctl documentation might also come in handy, especially for method calls.

Weather module

The weather module sends desktop notifications when weather conditions are degrading.
It also exposes a D-Bus API with some convenience methods for easier desktop integration.

Polybar integration

In the screenshot, the first number is the current temperature and the second one is a 3 hour forecast.
The output is fully configurable via templating, you can also query individual values.
Edit the ~/.config/ntfd/config.toml and follow the instructions.
For Polybar integration like in the example, update your Polybar config like so:

[module/weather]
type = custom/script
exec = busctl --user -j get-property io.ntfd /weather openweathermap.strings RenderedTemplate | jq -r .data
interval = 60
label-font = 3

I recommend a 60 second interval, this way the bar will stay in sync with the notifications.
Note that the Polybar integration depends on both Weather Icons and Material Icons, don't forget to add them to your config or it won't render correctly:

font-1 = WeatherIcons:size=17
...
font-3 = MaterialIcons:size=19
...

GitHub module

The GitHub module sends desktop notifications when there's activity on GitHub.
It exposes a D-Bus similar to the weather module.

Polybar integration

The screenshots shows the number of currently unread notifications. Nothing is rendered unless some notifications are unread.
Edit the ~/.config/ntfd/config.toml and follow the instructions.
For Polybar integration like in the example, update your Polybar config like so:

[module/github]
type = custom/script
exec = busctl --user -j get-property io.ntfd /github github.strings RenderedTemplate | jq -r .data
interval = 10
label-font = 3

I recommend a 10 second interval, this way the bar will stay in sync with the notifications.
The example in the default config file needs the Octicons font to render correctly.

MPD module

The MPD module sends desktop notifications when songs start playing.
See config.toml for configuration options.

Roadmap

Integration with the following services is planned:

  • [x] OperweatherMap
    • [x] Current weather, forecast
    • [x] Template rendering for Polybar integration
    • [x] Re-implement polybar-forecast)
    • [x] Alerts through notifications
  • [x] MPD
    • [x] Desktop notifications
  • [x] Github
    • [x] Unread notifications count
    • [x] Live notifications
  • [ ] Arch
    • [ ] Pacman updates ? (how ?)
  • [ ] Gmail
    • [ ] Live notifications
    • [ ] Unread messages count, multi account support
  • [ ] Facebook (?)
    • [ ] Live messages (?)
    • [ ] Unread notifications count (?)
  • [ ] Twitch
    • [ ] Live streams count (followed by the user)
    • [ ] Rofi integration with mpv
  • [ ] Reddit (?)

Build from source

You can setup a Stack toolchain to build the project, or use Docker to build a statically linked executable:

docker build -t kamek-pf/ntfd .
docker run --rm -ti -v $(pwd):/mnt kamek-pf/ntfd /bin/sh -c 'cp ntfd /mnt'

The binary will be available as ntfd from the project's root.

Run tests

The test suite expects a valid OWM_API_KEY and GITHUB_TOKEN environment variables. Simply run stack test.

Troubleshooting

My Dunst notification icons look tiny

Dunst has an unreleased fix for this. In the meantime you can copy the weather-xyz icons from
/usr/share/icons/YourTheme/status/symbolic somewhere else, resize them and add the new path to icon_folders in your dunstrc.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].