Dunst - a dmenu-ish notification daemon

Hello everybody,
The information in this post is very out of date. Have a look at the homepage for a more up to date introduction.
I've spend the last day creating a simple notification-daemon. It uses the drawing code from dmenu and because of that looks a lot like it.
It can listen to notifications from libnotify or be used standalone to display messages (maybe useful in some scripts).
Originally it was suppost to be a patch for dwm and I just used the drawing code from dmenu to prevent constant restarting of dwm to test it.
But in the end i figured it would be more usefull as a standalone application.
homepage
The source is available at http://github.com/knopwob/dunst
If you're interested in this kind of notification-daemon make sure you also check out twmn .
Here are a few screenshots of dunst at work:
critic, suggestions, and so on is welcome, of course.
Last edited by knopwob (2012-08-23 19:18:00)

you've got good points here.
ninian wrote:
Aha ... you're well ahead of me there! I completely appreciate your priorities. But here are my thoughts ...
I think the two functions of Dunst need to be considered almost separately:
1) The daemon function, which for compatibility should follow the Desktop Notifications Specification as far as the Dmenu-ish programming allows (eg, probably no icons!). This would allow Dunst to be used as a lightweight drop-in replacement for notification-daemon, xfce4-notifyd, etc. In particular, notify-send should produce similar notification messages with Dunst as can be achieved with the other notification daemons (including timeout options, eg critical messages remain on screen, but others timeout with the normal defaults or whatever is specified with the -to option).
complying to specifications is always a good thing   I think, we are on the same page concerning urgency-levels and timeouts. This will be implemented in the near future.
About the issue with notify-send's name being displayed. It don't like the idea of hardcoding an exception for one application. As far as I know, no other notification daemon displays the name of the Application, which sended the message. But actually I like it. So how about making it optional. I've got something like this in mind:
dunst -format "%a: %s -- %b" <-- This would be the current state
%a -> application name
%s -> summary
%b -> message body.
This way, if you don't want the application name displayed, you could change the option to something like this:
dunst -format "%s: %b"
This way only the summary and the body of the message will be displayed. As it is (as far as I know) the state with the other notification-daemons around.
ninian wrote:Having different colours for different calling applications wouldn't be of much use to me, because it's the category of message which is usually more important than the application name itself. For example, a reminders program can issue standard or urgent reminders. I might like the ordinary ones in blue, but the urgent ones in red.
Yes I agree with you that there should be a visual clue for the urgency-level of a message. I guess an additional option for the color of urgend messages would be appropriate.
At this point I think I should also think about adding a config file, because the commandline could grow fairly large if you use all the available options.
ninian wrote:
2) The direct messaging function, using -msg, can be formatted much more flexibly as it doesn't need to conform to the standard above. But as long as it produces similar results which "fit in" with the notifications produced by the Dunst daemon, I'd be happy, no matter the bells and whistles available for formatting the message.
At the moment I use dzen2 for home-made notifications, categorized by different colours and timeouts into: errors (with or without an alarm bell), warnings, information messages, standard messages. Other formal notifications (from Thunderbird, Osmo, etc) are handled by xfce4-notifyd. What I'd love is just to use Dunst for everything, probably via notify-send.
I guess this is where you found the issue about multiple messages being displayed on top of each other? As soon as I found a way to make dunst notice, that there's already a message displayed by another instance of dunst and make it act accordingly (either add the message to the existing message or add another message next to it) this should be possible.
Last edited by knopwob (2011-09-13 17:00:03)

Similar Messages

  • SiND, a Simple, textbased, Notification Daemon

    Alright. I've just gotten the notification daemon I've been writing into a solid spot, so I'd thought I'd share!
    SiND is a [basically] freedesktop-compliant notification daemon. It receives notifications from dbus, and, well, just spits them out to stdout.
    It does so in a buffered way, printing all the current notifications whenever a new one arrives or one expires.
    Using the --lines option, you get a psuedo-curses program , free to display your notifications in whatever terminal you want.
    This also means you can pipe it into a dzen slave window. or whatever other panel you want.
    Or whatever else you want to do!
    You can format how each notification is printed (app-name, summary, body, id) and you can also spit out an extra line (a... status line ) containing some extra information, like how many active notifications there are and custom strings if you get new ones. So you can stick it in your panel's title bar. Or whatever.
    SiND - Github
    Personally, I've never been a fan of desktop notifications, but since I can just output into any old terminal, I've found myself using it for short-term todolists and stuff using notify-send. I've also found not being tied down to a gui makes 'regular' notifications a lot less annoying, too (and you can pipe em through grep!)
    Basically, I wanted to write a notification daemon that lets you do whatever you want to do to desktop notifications. If you need help making SiND do whatever you want, lemme know.
    Want more flair? See also:
    dunst
    twmn
    Last edited by wretch (2013-04-09 23:49:35)

    Army wrote:Your PKGBUILD isn't working this way, your _gitroot only works for yourself. And please don't add stuff like "pwd" to the build function, there's no use for it! Here's a working PKGBUILD I made which follows the packaging standards.
    Ahh, thanks! Shoulda checked that out before. Thanks a bunch for your version.
    I wont be able to update the aur pkgbuild for a day or two, so if anyone else is interested in trying this out, just try Army's pkgbuild.
    Army wrote:I probably won't use sind, because I'm very happy with dunst, but I like yours as well, because it can be used in scripts for e.g. conky, like your script shows. I like that!
    Indeed! Dunst and twmnd are both really nice. I was using twmnd for a while.
    I personally found myself wanting to use something even simpler, so I wrote sind, hopefully others here will enjoy the scripting capabilities of sind as well. That was my main intent in writing it.

  • Notification-daemon: clearing the notifications queue

    I'm using notification-daemon (0.7.3-1) and libnotify (0.7.4-1), calling notify-send from an external program. After several notifications have popped up (not sure of the number), they stop appearing, but still show up in the queue, which is accessible from the notification area (using GNOME 3 with xmonad). The only way I've found to clear the queue and have the notifications start appearing again is to click the "Clear Notifications" button in the system tray queue window.
    You'd think notify-send would have an option to do this. I would love to just use dbus directly, but can't seem to find anything in the doc for clearing the queue (best I could find was http://www.galago-project.org/specs/notification/0.9/ ). The queue viewer is clearly able to do it, so there's got to be a mechanism.

    Hi,
    Thank you for your post.
    I am trying to involve someone to further look at this issue. There might be some time delay. Appreciate your patience.
    Thank you for your understanding and support.
    Regards,
    Lily Wu
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

  • [HELP] good old fashion notification-daemon

    Hi:
    I recently install Archlinux with Openbox. I'm looking for the old style notification daemon: A simple square box in the corner. Like in gnome 2. There any way to get it back?
    thxs

    Raynman wrote:Try notification-daemon from the extra repository.
    this is the ugly black semi-transparent rounded box that i hate xD

  • NotifyOSD look-alike theme engine for the notification daemon

    I've started to work on a theme engine named "coco" for the notification daemon, and I'm sharing what I have so far in case someone finds it useful. My goal is to make it look like NotifyOSD (https://wiki.ubuntu.com/NotifyOSD). I'm taking the notification-daemon-engine-nodoka source code as a starting point, so you can follow the same steps that are on the AUR to install it.
    Here is a screenshot of what I have so far:
    And here is the git repository with all the source code:
    http://github.com/tatofoo/notification- … ngine-coco
    Keep in mind that I've disabled all kind of buttons for now, and the icon that appears on the screenshot is from NotifyOSD (https://launchpad.net/ubuntu/+source/no … -icons/0.3).

    Hey, thanks for adding it to the AUR.
    I don't have my computer here right now, so I can't really test it, but do you have composition enabled? Also, which version of notification-daemon do you have?
    I haven't really cleaned the nodoka code that coco doesn't use, maybe when I do that the bug goes away, I'll try to do that before the weekend and I'll let you know so you can try again.

  • Notification Daemon Themes not Working

    Hey all-
    I'm running arch64 and have been trying to get the nodoka notification daemon theme from Fedora to work for the past few days now. I install it like any other source file and it ends up in /usr/lib/notification-daemon-1.0/engines, but when I enable it in gconf, the theme stays the same. This worked on arch32, so what is the deal now? Has anyone experienced something similar/know how to fix this?
    Peter

    I have the same problem. Theres an error when you try to use the nodoka engine in 64 bit. I know theres an rpm floating around to install the engine for x86_64 but im not sure hoe to install it.

  • [SOLVED] notification daemon

    Hi,
    I am currently on the switch to a "none DE" window manager.
    I have some notifications send to me using "notify-send"
    How can I get this notifications? I know there is noteo. Is it the only option?
    Thanks!
    Nathan
    Last edited by LonelyStar (2009-05-21 17:26:51)

    The package is called notification-daemon ...

  • Notipy: A minimalistic gtk3 notification daemon written in python.

    Hello fellow archers,
    with noteo seemingly dead and all other available notification daemons being
    more or less tightly coupled to a window manager, I thought it would be cool
    to have a (hopefully) worthy successor.
    Introducing notipy:
    As its github page states, notipy is an implementation of the
    Desktop Notification Specification. It shows message popups using gtk3, allowing
    for pango marked up message bodies and icons that can be specified in various
    ways.
    For more information, please refer to the github page. I hope some people will
    find it helpful. Any comments, feature requests or bug reports should go either
    to this thread or directly to github.
    Kind greetings!
    Last edited by the_isz (2011-05-31 08:04:24)

    quigybo wrote:
    Very cool, I like it. One minor issue though:
    $ notipy.py -a NORTH_WEST
    usage: notipy.py [-h] [-l {DEBUG,INFO,WARNING,ERROR,CRITICAL}]
    [-t EXPIRETIMEOUT] [-m MARGINS]
    [-a {NORTH_WEST,SOUTH_WEST,SOUTH_EAST,NORTH_EAST}]
    [-d {VERTICAL,HORIZONTAL}]
    notipy.py: error: argument -a/--layout-anchor: invalid choice: 0 (choose from 'NORTH_WEST', 'SOUTH_WEST', 'SOUTH_EAST', 'NORTH_EAST')
    Same issue with -d. Also, I think you have your east and west mixed up.
    Thanks for the hints. Wonder why that didn't occur to me during testing, but I
    can definitely reproduce it. Will fix it soon, tomorrow, if not today.
    Also thanks for the compliment about the comments. I'm trying to code up to what
    my software-engineering professor used to hammer into our heads:
    "THE CODE IS NOT YOURS! So write code that is readable by others, too."
    Lastly, I just noted that the notipy package should probably provide
    notification-daemon. I will add that to the PKGBUILD for the next version.

  • Notification-daemon / deadbeef --- modification

    Hi ppl.
    I am using Gnomes notification daemon and a DeadBeef player.
    On screen display notifications are working, but all of the notification messages goes to letter envelope icon in system tray.
    Is there a way to keep OSD notifications from DeadBeef, but NOT to send them to notification icon in system tray?
    Last edited by webmasteryoda (2011-06-25 22:15:25)

    http://bharathi.posterous.com/change-gn … n-position ? i'm using xfce4, so I don't really know if it is position what concerns you, nevertheless gconf is your hope.
    if not, consider switching to notify-osd-customizable and using notifyconf (both in AUR), it's more... customizable

  • Notification-daemon-xfce not working with hal

    Hi,
    I am using xfce-notification-daemon-svn from community and have dbus and hal running.
    Now when i run notify-send "test" everything is fine and the notification appears.
    But in Thunar i don't get any notifications (eg. when unmounting a device).
    I looked into messages.log / daemons.log / errors.log and there was no error regarding dbus, hal or notification-daemon.
    PS: I am running Arch64.
    Does someone have an idea?

    It is an Arch64 problem -- I just filed a bug report about this: http://bugs.archlinux.org/task/9893?str … &closedto=
    Simple solution seems to be to rebuild exo package using ABS.

  • Cow-notify - customizable notification daemon

    cow-notify, fork from dwmstatus
    Notification daemon that runs on background and executes configured command (If there isn't any executes xsetroot -name)
    parses following tags:
    [summary] - Replace with summary
    [body] - Replace with body
    [expire] - Replace with expiritation time (milliseconds)
    By default there is no config file, if you want to execute custom command, then create this file :
    $XDG_CONFIG_HOME/cow-notify/config and type command eg. "xcowsay --image myimage.png '[summary]' '[body]'"
    I suggest making the config file read only for everyone expect you, so other users can't go and change it to something more dangerous.
    !IMPORTANT! Execution
    if(!(sh = getenv("SHELL"))) sh = "/bin/sh";
    execlp(sh, sh, "-c", parsed, (char*)NULL);
    Since it exectues shell, all shell rules also apply.
    So make sure your [body] and [summary] are enclosed with single quotes, otherwise notify events can execute commands.
    cow-notify escapes all single quote characters inside [body] and [summary], so you don't have to worry about those. However if you have shell that does not use single quotes for strong quoting then you might want to edit the source.
    Issues :
    * Fails to reply on some python programs (?)
    https://github.com/Cloudef/cow-notify # Github
    https://aur.archlinux.org/packages.php?ID=52751 # AUR, thanks synorgy
    Last edited by Cloudef (2011-11-29 19:00:31)

    ArchArael wrote:
    That's really cute. ^______^
    How do I proceed to enable the mascot?
    OT: I like your avatar.
    You can either grab the original macopix
    Or fork I've made here with few bugs fixed and animation signaling added.
    Then setup your macopix run at startup with --sockmsg option, and set cow-notify send messages to it like in my example.
    cow-notify might fail on system startup sometimes for some reason, and this can be fixed with delay (sleep 50 && cow-notify) &
    You can grab the dancing miku mascot from here
    Also I suggest setting slight startup delay for macopix too if you autostart it. (sleep 20 && macopix) & is fine.
    Some references which might help you further:
    My openbox autostart.sh # See the cow-notify and macopix lines.
    https://github.com/Cloudef/dotFiles/blo … tostart.sh
    Cow-notify config:
    https://github.com/Cloudef/dotFiles/blo … ify/config
    Deadbeef conky script that also makes the miku dance :
    https://github.com/Cloudef/dotFiles/blo … b-cover.sh

  • XFCE notification daemon

    I have notification-daemon-xfce and libnotify installed but when I unmount or mount a drive, there is no notification of this. In the past it would say something like "this drive is now safe to remove". The only setting I have found is to change the position. How to I customize what it shows, when it shows it?

    The function of the notification daemon is *only* to display those little boxes, nothing more.  The fact that it's xfce's is immaterial; basically there is a libnotify spec that the daemon can follow as closely as it wishes, implementing niceties like html markup in your little popup boxes, or other such things.
    The responsibility for putting something you want in the box lies with thunar, or probably thunar-volman.  As far as I know the your customisation options lie somewhere between a) filing a bug and b) editing the libnotify call in thunar's code yourself.
    There are also "themes" for libnotify popups...good luck compiling them.
    (Sorry, I have no love for libnotify)

  • XDG Autostart for Notification Daemon

    Arch installs some .desktop files in /etc/xdg/autostart as it should. Examples include
    wicd-tray.desktop
    pulseaudio.dekstop
    parcellite-startup.desktop
    at-spi-dbus-bus.desktop
    polkit-gnome-authentication-agent-1.desktop
    but not
    notification-daemon.desktop
    Why does Arch put that one in /usr/share/applications? Does it not belong in autostart with other desktop daemons? I actually made a symlink by hand from /usr/share/applications to /etc/xdg/autostart just for this daemon.
    Thanks

    I have the same problem. Theres an error when you try to use the nodoka engine in 64 bit. I know theres an rpm floating around to install the engine for x86_64 but im not sure hoe to install it.

  • GNOME 3.2 Notifications daemon fails when Wireless Card is disabled

    I noticed that when starting up GNOME with the wireless card off, I get an error message saying that notifications don't work.  When I enable the wireless power and restart GNOME, the errors go away.  What do notifications have to do with wireless?
    Last edited by kandrews (2011-10-08 21:01:31)

    sounds like a bug

  • Dmenu menu with spaces?

    I am trying to create a dmenu, that runs specific commands on each entry. but i fail to use entries with spaces.
    This is how i am trying to archive it, without success, i might add:
    #!/bin/bash
    prog="
    test
    test with space
    cmd=$(dmenu <<< "$prog")
    case ${cmd%% *} in
    test) notify-send "foo" ;;
    test with spaces) notify-send "bar"
    *) exec "'${cmd}'" ;;
    esac
    what would be a better solution?

    schalox wrote:
    What if you use double quotes when assigning array's items?
    declare -A actions=(
    ['1. Quick Fullscreen']="scrot -d 1 "$FILEMASK" && notify ${TIME} "Screenshot saved""
    since declare opens a subshell this wont work either. too bad, it looks much cleaner
    anyway, i was able to solve my good old case - here the whole script:
    #!/bin/bash
    # teiler - A script to share (german word: teilen) screenshots/casts for tiling WMs - Pun intended
    # (c) Rasmus Steinke <rasi at xssn dot at>
    # Additional Ideas, testing and some code by Zeltak <zeltak at gmail dot com>
    # Requirements:
    # xclip, fb-client, pinta, dzen2, dmenu, ffmpeg, scrot, bc, some notification daemon
    #changelog
    #v0.8
    #Put notify-send into its own function, Made delay being calculated from counter value.
    #v0.7
    #Massive Code Cleanup
    #v0.6
    #Countdown script stolen from Google and integrated.
    #v0.5
    #added clip uploading
    #v0.4
    #added screencast function
    #v0.3
    #added 1.notifications 2.unique names for each type (for quick launch) 3.better photo editor (pinta) 4.dmenu title
    ############### Configuration options ##############################
    IMG_PATH=/home/carnager/Pictures/Screenshots/
    FILEMASK=%Y-%m-%d-@%H-%M-%S-scrot.png
    UL=fb
    EDIT=pinta
    RES=1920x1080 #set your screen resolution
    TIME=3000 #How long will notifications be visible? (in miliseconds)
    COUNTER1=3 #Seconds to count for delay (Use $COUNTD variable)
    COUNTER2=6 #Seconds to count for delay (Use $COUNTD2 variable)
    #DMENU/DZEN2 CONFIGURATION
    FONT="Envy Code R-9"
    NF="#7c7c72"
    NB="#1a1a1a"
    SF="#FFFFFF"
    SB="#33B5E5"
    DZEN2_W=100 #Width of dzen2
    DZEN2_X=850 #X Padding
    ################## Configuration End ##############################
    # Needed for the countdown
    # Based on some script by Marco Fontani - MFONTANI at cpan dot org
    set -bm
    COLOR='#7c7c72'
    function countdown () {
    seq 1 ${1:-10} | tac | \
    perl -ne'BEGIN{$|++;$msg=shift}$m=int($_/60);$s=int($_-$m*60);printf("$m:%02d -- $msg\n",$s);sleep 1;' \
    "${2:-ready...}"
    # Outsource the notfiy-send to its own function to clean up the mess below a bit ;)
    function notify() {
    notify-send -u low --hint=int:transient:1 -t ${1} "Scrot" "${2}"
    ####Some Variables to clean up the code a bit
    COUNTD="countdown $COUNTER1 GO | dzen2 -fn \"$FONT\" -fg \"$NF\" -ta c -w \"$DZEN2_W\" -bg \"$NB\" -x \"$DZEN2_X\""
    COUNTD2="countdown $COUNTER2 GO | dzen2 -fn \"$FONT\" -fg \"$NF\" -ta c -w \"$DZEN2_W\" -bg \"$NB\" -x \"$DZEN2_X\""
    XCLIP="(xclip -o;echo) | xclip -selection clipboard"
    cd $IMG_PATH
    #!/bin/bash
    MENU="1. Quick Fullscreen
    2. Select Area
    3. Fullscreen Shot and Edit
    4. Selection and Edit
    f. Fullscreen and Upload
    d. Delayed Fullscreen and Upload
    e. Fullscreen and Edit and Upload
    s. Selection and Upload
    p. Selection and Edit and Upload
    x. Upload Clipboard Content
    c. Start Recording a Videocast
    k. Stop Recording a Videocast
    CHOICE="$(echo "$MENU" | dmenu -o 0.8 -l 20 -fn 'Envy Code R-10' -nf '#999' -nb '#000' -sf '#eee' -sb '#0077bb' -p "Make Your Wish:")"
    case "$CHOICE" in
    "1. Quick Fullscreen")
    scrot -d 1 "$FILEMASK" && notify ${TIME} "Screenshot saved"
    "2. Selection")
    eval $COUNTD & scrot -d $(echo $COUNTER1+1 | bc) "$FILEMASK" && notify ${TIME} "Screenshot saved"
    "3. Fullscreen Shot and Edit")
    scrot -d 1 "$FILEMASK" -e "$EDIT \$f" && notify ${TIME} "Screenshot edited and saved"
    "4. Selection and Edit")
    scrot -s "$FILEMASK" -e "$EDIT \$f" && notify ${TIME} "Screenshot edited and saved"
    "f. Fullscreen and Upload")
    scrot -d 1 "$FILEMASK" -e "$UL \$f" && eval $XCLIP && notify ${TIME} "Screenshot uploaded"
    "d. Delayed Fullscreen and Upload")
    eval $COUNTD & scrot -d $(echo $COUNTER1+1 | bc) "$FILEMASK" -e "$UL \$f && rm -f \$f" && eval $XCLIP && notify ${TIME} "Screenshot uploaded"
    "e. Fullscreen and Edit and Upload")
    scrot -d 1 "$FILEMASK" -e "$EDIT \$f && $UL \$f && rm -f \$f" && eval $XCLIP && notify ${TIME} "Screenshot uploaded"
    "s. Selection and Upload")
    scrot -s "$FILEMASK" -e "$UL \$f && rm -f \$f" && eval $XCLIP && notify ${TIME} "Screenshot uploaded"
    "p. Selection and Edit and Upload")
    scrot -s "$FILEMASK" -e "$EDIT \$f && $UL \$f && rm -f \$f" && eval $XCLIP && notify ${TIME} "Screenshot uploaded"
    "x. Upload Clipboard Content")
    eval $COUNTD2 & sleep $(echo $COUNTER2+1 | bc) && xclip -o | fb && eval $XCLIP && notify ${TIME} "Clipboard uploaded"
    "c. Start Recording a Videocast")
    ffmpeg -r 25 -f x11grab -s $RES -i $DISPLAY+0,0 -vcodec libx264 temp_cast.mkv && notify ${TIME} "Screencast started"
    "k. Stop Recording a Videocast")
    kill $(pgrep -f x11grab) && sleep 3 && $UL temp_cast.mkv && rm -f temp_cast.mkv && eval $XCLIP && notify ${TIME} "Screencast uploaded"
    notify-send "No Selection Made"
    esac
    and here is how it looks:

Maybe you are looking for

  • Depot Sales-Error in J1IJ

    Hi Experts, We are trying to do Depot sales configuration. we have configured stock transfer first . scenario i would explain below. we created Purchase order with the help of ME21N then we have done the delivery with the help of T code VL10B, VL02N

  • Photos are dark and cannot be used in slideshow mode.  Also cannot move photos in a sequence.  Also photos will not move from grid to add to another collection.

    Lightroom 4, photos are dark when in slideshow mode.  Therefore, cannot create a slideshow.  Cannot move photos from grid to add to another collection.  Also cannot change sequence of photos.  Have searched multiple  times for troubleshooting help on

  • Email addresses & app world

    Hello everyone!  I have just bought myself the Curve 9300 and given my old bb (8520) to a friend. He's just tried to access bb app world but it came up with my email address and required my password. He said he attempted to put another email address

  • Problems with Document Connect

    I have a problem with Document Connect. I am unable access office live workspace. I have been on the help line with microsoft but they were unable to help. Then I went to an apple store and was informed by one of the sales assistance that Document Co

  • LR3 error messages

    I have been successfully using LR3 until a few hours ago. Suddenly Error messages now start to appear saying an error occurred sending this file : access is denied I have uploaded files on LR3 30 times today! without any issues I have uninstalled and