All Projects → phillbush → Xnotify

phillbush / Xnotify

Licence: mit
read notifications from stdin and pop them up on the screen

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Xnotify

notifyme
react-notification-timeline is a react based component helps in managing the notification in time-based manner.
Stars: ✭ 94 (-3.09%)
Mutual labels:  notifications, notification
Nscde
Modern and functional CDE desktop based on FVWM
Stars: ✭ 526 (+442.27%)
Mutual labels:  unix, x11
vue-notification-bell
Vue.js notification bell component.
Stars: ✭ 64 (-34.02%)
Mutual labels:  notifications, notification
x11-cr
X11 bindings for Crystal language.
Stars: ✭ 32 (-67.01%)
Mutual labels:  unix, x11
React Notie
Simple notifications for react
Stars: ✭ 27 (-72.16%)
Mutual labels:  notifications, notification
gobble
Rust rewrite of Devour
Stars: ✭ 23 (-76.29%)
Mutual labels:  unix, x11
Monitor Table Change With Sqltabledependency
Get SQL Server notification on record table change
Stars: ✭ 459 (+373.2%)
Mutual labels:  notifications, notification
spontit-api-python-wrapper
Send functional, flexible push notifications to iOS, Android, and desktop devices (without your own app or website).
Stars: ✭ 35 (-63.92%)
Mutual labels:  notifications, notification
Yii2 Slack Log
Pretty Slack log target for Yii 2
Stars: ✭ 24 (-75.26%)
Mutual labels:  notifications, notification
Yii2 Telegram Log
Telegram log target for Yii 2
Stars: ✭ 24 (-75.26%)
Mutual labels:  notifications, notification
AndroidProjects
个人总结归纳Android知识点。1.Data Binding框架MVVM;2. BaseView;3.CollapseView;4.Notification;5.MultiChannelBuild;6.SwipeBack;7.CustomTabs;8.HandlerCourse;9.VolleyStudy;10.OkHttpStudy;11.PermissionManage;12.InterView;13.KotlinLearning
Stars: ✭ 32 (-67.01%)
Mutual labels:  notifications, notification
Pmenu
A pie-menu in xlib and imlib2.
Stars: ✭ 66 (-31.96%)
Mutual labels:  unix, x11
react-awesome-notifications
A beautiful fully customizable React + Redux notification system built with styled-components
Stars: ✭ 29 (-70.1%)
Mutual labels:  notifications, notification
react-notify
Tiny React's module that shows notifications.
Stars: ✭ 55 (-43.3%)
Mutual labels:  notifications, notification
PushMeBaby
iOS Push Notification Debug App. You can use this app during iOS Push Notification (development or production) to push notifications on your device from your Mac.
Stars: ✭ 47 (-51.55%)
Mutual labels:  notifications, notification
Notifications
🛎 Notifications Center engine like GitHub or other application for any Rails applications.
Stars: ✭ 359 (+270.1%)
Mutual labels:  notifications, notification
flasher
A powerful and flexible flash notifications system for PHP
Stars: ✭ 46 (-52.58%)
Mutual labels:  notifications, notification
Graphical notifications Zabbix
No description or website provided.
Stars: ✭ 77 (-20.62%)
Mutual labels:  notifications, notification
Notie
🔔 a clean and simple notification, input, and selection suite for javascript, with no dependencies
Stars: ✭ 6,170 (+6260.82%)
Mutual labels:  notifications, notification
Xsuspender
👀 💻 💤 🔋 Save battery by auto-suspending unfocused X11 applications.
Stars: ✭ 53 (-45.36%)
Mutual labels:  unix, x11

XNotify

XNotify displays a notification on the screen. XNotify receives a notification specification in stdin and shows a notification for the user on the screen.

See the manual for more information on how xnotify works.

Features

XNotify comes with the following features:

  • xnotify receives notifications from stdin. You can use a fifo to echo notifications on the fly like

    echo Hello World > /path/to/xnotify.fifo

  • xnotify queue notifications and display them one above the other.

  • Image support, just prefix the notification string with IMG:/path/to/the/file.png and a tab.

  • Multiple monitor support. You can set the monitor with the -m option.

  • Support for fallback fonts (you can set more than one fonts, that will be tried in order).

  • X resources support (you don't need to recompile Xnotify for configuring it).

Files

The files are:

  • ./README: This file.
  • ./Makefile: The makefile.
  • ./config.h: The hardcoded default configuration for XNotify.
  • ./config.mk: The setup for the makefile.
  • ./xnotify.{c,h}: The source code of XNotify.

Installation

First, edit ./config.mk to match your local setup.

In order to build XNotify you need the Imlib2, Xlib and Xft header files. The default configuration for XNotify is specified in the file config.h, you can edit it, but most configuration can be changed at runtime via X resources and via command-line options. Enter the following command to build XNotify. This command creates the binary file ./xnotify.

make

By default, XNotify is installed into the /usr/local prefix. Enter the following command to install XNotify (if necessary as root). This command installs the binary file ./xnotify into the ${PREFIX}/bin/ directory, and the manual file ./xnotify.1 into ${MANPREFIX}/man1/ directory.

make install

Running XNotify

XNotify receives as input one line per notification. Each line is made out of a notification title and a notification body separated by any number of tabs. Lines without a title are ignored.

The following is an example of how to run XNotify

$ xnotify -m 10 -G NE -g -10+10 -s 15

This line means: read notifications from stdin, display the notifications on the north east (-G NE) of the monitor 0 (-m 0), that is, on the upper right corner of the first monitor. The notifications should be placed 10 pixels to the left and 10 pixels down (thus creating a 10 pixel gap with the upper right corner). Each notification stay alive for 15 seconds.

To create a named pipe for XNotify, you can place the following in the beginning of your ~/.xinitrc. This will create a named pipe unique to your current X display in your home directory at ~/.cache. Then, it will open xnotify in the background, reading from this named pipe.

XNOTIFY_FIFO="$HOME/.cache/xnotify$DISPLAY.fifo"
export XNOTIFY_FIFO
rm -f $XNOTIFY_FIFO
mkfifo $XNOTIFY_FIFO
xnotify 0<>$XNOTIFY_FIFO

Note that the first two lines (the line setting the environment variable and the line exporting it) should be at the beginning of your ~/.xinitrc, so other programs you invoke are aware of this variable.

To create a notification with a image, input to XNotify a line beginning with IMG:/path/to/file.png followed by a tab. For example:

$ printf 'IMG:/path/to/file.png\tThis is a notification\n' > $XNOTIFY_FIFO

To read dbus notifications from stdin, you'll need tiramisu. You'll also need jq in order to parse tiramisu's JSON output. Then add the following line to your .xinitrc, after the line calling xnotify.

$ tiramisu -j | jq --raw-output --unbuffered '.summary + "\t" + .body' > $XNOTIFY_FIFO &

To use a different size other than the default for the notifications, run xnotify with the -g option set to the notification size in WIDTHxHEIGHT. For example:

$ xnotify -g 300x80

The argument for the -g option has the form [WIDTHxHEIGHT][{+-}XPOS{+-}YPOS]. Parts between square brackets are optional. {+-} means to chose either + or -.

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].