You are not logged in.

#126 2012-06-20 21:06:58

knopwob
Member
From: Hannover, Germany
Registered: 2010-01-30
Posts: 237
Website

Re: dunst - a dmenu-ish notification daemon

Hi,

I just pushed a few changes. First of all a fix of a small annoyance I had:
If you had a message format like "%s %b" (summary and body) and the body is empty, you end up with a traling whitespace, which looks odd, because the window would get to big on the right side. Now, before displaying a message all spaces are removed from the beginning and end of the message.

The second one should be interesting for the debian-based distro users:
Thanks to algernon the dependency on iniparser is removed.

Offline

#127 2012-06-22 13:23:09

hoeffl
Member
Registered: 2011-09-26
Posts: 10

Re: dunst - a dmenu-ish notification daemon

Hi,

I don't know much about notification systems and so on, so I've got a question: Why are notifications from Dropbox not shown in dunst? They are shown when using notify-osd for example...
It's a wonderful program:)

Regards

Offline

#128 2012-06-22 17:15:40

knopwob
Member
From: Hannover, Germany
Registered: 2010-01-30
Posts: 237
Website

Re: dunst - a dmenu-ish notification daemon

hoeffl wrote:

Hi,
Why are notifications from Dropbox not shown in dunst? They are shown when using notify-osd for example...

It's most likely a bug in dunst. Which version of dropbox do you mean? this one? If not, please post the link to the package, so I can have a look.

Offline

#129 2012-06-22 19:09:34

Šaran
Member
From: Bosnia
Registered: 2011-09-03
Posts: 407

Re: dunst - a dmenu-ish notification daemon

I think I've found few bugs in light branch:
1. indicate_hidden doesn't work. No matter how many notifications there are, no number gets shown.
2. If I send, for example, 4 different notifications via notify-send, I need to press key bind 4 times to close them, but each time only the last notification is visible. eg.

notify-send one
notify-send two
notify-send three
notify-send four

In this case, pressing ctrl+space will not show three, two or one, but only four.

Offline

#130 2012-06-22 19:22:35

knopwob
Member
From: Hannover, Germany
Registered: 2010-01-30
Posts: 237
Website

Re: dunst - a dmenu-ish notification daemon

@Šaran, can you please post your config.h?

Offline

#131 2012-06-22 20:36:32

Sirsurthur
Member
Registered: 2009-02-02
Posts: 114

Re: dunst - a dmenu-ish notification daemon

Hello knopwob,

Thanks for this beautiful app. I just noticed that characters like "é, è , ê, etc." were not displayed well. It looks like an utf-8 issue or something like that ?

Offline

#132 2012-06-22 20:40:22

knopwob
Member
From: Hannover, Germany
Registered: 2010-01-30
Posts: 237
Website

Re: dunst - a dmenu-ish notification daemon

Sirsurthur wrote:

Hello knopwob,

Thanks for this beautiful app. I just noticed that characters like "é, è , ê, etc." were not displayed well. It looks like an utf-8 issue or something like that ?

They work fine here. Does the font support those, or maybe there's something wrong with your locale?

Offline

#133 2012-06-22 20:45:07

Sirsurthur
Member
Registered: 2009-02-02
Posts: 114

Re: dunst - a dmenu-ish notification daemon

My font is gohufont :  font = -gohu-gohufont-medium-r-normal--14-100-100-100-c-80-iso8859-1 which seems to work well elsewhere ?

Edit: maybe I should just put Gohufont in dunstrc instead of -gohu-gohufont-medium-r-normal--14-100-100-100-c-80-iso8859-1?

Last edited by Sirsurthur (2012-06-22 20:45:48)

Offline

#134 2012-06-22 20:55:53

knopwob
Member
From: Hannover, Germany
Registered: 2010-01-30
Posts: 237
Website

Re: dunst - a dmenu-ish notification daemon

Sirsurthur wrote:

Edit: maybe I should just put Gohufont in dunstrc instead of -gohu-gohufont-medium-r-normal--14-100-100-100-c-80-iso8859-1?

If it works, sure wink

Offline

#135 2012-06-23 13:15:28

mnzaki
Member
Registered: 2012-06-08
Posts: 13

Re: dunst - a dmenu-ish notification daemon

I just want to say thank you for this great utility! It works marvelously and fits right in with dzen2, dmenu, and friends.

Offline

#136 2012-06-23 20:55:14

Šaran
Member
From: Bosnia
Registered: 2011-09-03
Posts: 407

Re: dunst - a dmenu-ish notification daemon

knopwob wrote:

@Šaran, can you please post your config.h?

Sure, here it is.

#ifndef CONFIG_H
#define CONFIG_H

#include "dunst.h"


/* appearance */
const char *font = "-Misc-Stlarch-Medium-R-Normal--11-100-75-75-C-80-ISO10646-1" "," "-*-ohsnap-medium-*-*-*-14-*-*-*-*-*-*-*";
/*
 * Background and forground colors for messages with
 * low normal and critical urgency.
 */
const char *normbgcolor = "#1C1B1A";
const char *normfgcolor = "#DDDDDD";
const char *critbgcolor = "#1C1B1A";
const char *critfgcolor = "#000000";
const char *lowbgcolor =  "#1C1B1A";
const char *lowfgcolor = "#000000";
const char *format = "%s %b"; /* default format */
int timeouts[] = { 10, 10, 0 }; /* low, normal, critical */
const char *geom = "0x15-290-1065"; /* geometry */
int sort = True; /* sort messages by urgency */
int indicate_hidden = True; /* show count of hidden messages */

/* If this is > 0, messages won't be closed, when user is idle for
 * longer than idle_threshold seconds */
const int idle_threshold = 120;

/* set to NULL for no keybinging */
char *key_string = "space";

/* key to redisplay last message(s) */
char *history_key_string = "grave";

KeySym mask = ControlMask;

/* 0 -> print nothing
 * 1 -> print messages to stdout
 * 2 -> print everything to stdout (Useful for finding rules
 * 3 -> print everything above + debug info
 */
int verbosity = 0;

/* You can use shell-like wildcards to match <appname> <summary> <body> and <icon>. */
const rule_t rules[] = {
    /* appname,       summary,         body,  icon,  timeout,  urgency,  fg,    bg, format */
    { NULL,           NULL,            NULL,  NULL,  -1,       -1,       NULL,  NULL, NULL },
    /* { "notify-send",  NULL,            NULL,  NULL,  -1,       -1,       NULL,  NULL, "%s %b" }, */
    /* { "Pidgin",       NULL,            NULL,  NULL,  -1,       -1,       NULL,  NULL, "%s %b" }, */
    /* { "Pidgin",       "*signed on*",   NULL,  NULL,  -1,       LOW,      NULL,  NULL, "%s %b" }, */
    /* { "Pidgin",       "*signed off*",  NULL,  NULL,  -1,       LOW,      NULL,  NULL, "%s %b" }, */
    /* { "Pidgin",       "*says*",        NULL,  NULL,  -1,       CRIT,     NULL,  NULL, "%s %b" }, */
    /* { "Pidgin",       "twitter.com*",  NULL,  NULL,  -1,       NORM,     NULL,  NULL, "%s %b" }, */
};



#endif

Offline

#137 2012-06-24 07:42:06

hoeffl
Member
Registered: 2011-09-26
Posts: 10

Re: dunst - a dmenu-ish notification daemon

knopwob wrote:

It's most likely a bug in dunst. Which version of dropbox do you mean? this one? If not, please post the link to the package, so I can have a look.

Ahm, yes. This package. But I never had a version of Dropbox whose notifications where displayed by dunst...

Offline

#138 2012-06-24 13:48:47

knopwob
Member
From: Hannover, Germany
Registered: 2010-01-30
Posts: 237
Website

Re: dunst - a dmenu-ish notification daemon

skanky wrote:

If anyone has any neat uses for this I'd be interested to hear them. I'm currently using it with procmail and remind, but I'm sure there are other things (eg I'm thinking of wrapping my mplayer music playing in a script that uses it). Assuming, that is, that knopwob doesn't mind the clutter in the thread (could start a new one)?

I forgot one that I have in my zshrc:

# nwf stands for "notify when finished"
function nwf {
    "$@"
    if [ $? -gt 0 ]; then
        notify-send -u critical "$1 FAILED"
    else
        notify-send -u critical "$1 finished"
    fi
}

I use this for long running processes that I wan't to get notified when they've finished. For example

nwf makepkg

Offline

#139 2012-06-24 17:23:47

knopwob
Member
From: Hannover, Germany
Registered: 2010-01-30
Posts: 237
Website

Re: dunst - a dmenu-ish notification daemon

hoeffl wrote:

Why are notifications from Dropbox not shown in dunst?

I just pushed a fix for that. Dropbox was relying on a Dbus method that dunst didn't implement. Please update and let me know if it now works as expected.

Offline

#140 2012-06-24 18:31:39

Unia
Member
From: The Netherlands
Registered: 2010-03-30
Posts: 2,476
Website

Re: dunst - a dmenu-ish notification daemon

knopwob wrote:
hoeffl wrote:

Why are notifications from Dropbox not shown in dunst?

I just pushed a fix for that. Dropbox was relying on a Dbus method that dunst didn't implement. Please update and let me know if it now works as expected.

I updated the same file in my Dunst repo (Remember? I asked to host a specific version because it was perfect for me at that stage) but I find it not working. Could just be because I have older versions of other files, though.


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#141 2012-06-24 19:26:51

skanky
Member
From: WAIS
Registered: 2009-10-23
Posts: 1,845

Re: dunst - a dmenu-ish notification daemon

knopwob wrote:
skanky wrote:

If anyone has any neat uses for this I'd be interested to hear them. I'm currently using it with procmail and remind, but I'm sure there are other things (eg I'm thinking of wrapping my mplayer music playing in a script that uses it). Assuming, that is, that knopwob doesn't mind the clutter in the thread (could start a new one)?

I forgot one that I have in my zshrc:

# nwf stands for "notify when finished"
function nwf {
    "$@"
    if [ $? -gt 0 ]; then
        notify-send -u critical "$1 FAILED"
    else
        notify-send -u critical "$1 finished"
    fi
}

I use this for long running processes that I wan't to get notified when they've finished. For example

nwf makepkg

NIcked, thanks. smile


"...one cannot be angry when one looks at a penguin."  - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle

Offline

#142 2012-06-24 23:26:12

knopwob
Member
From: Hannover, Germany
Registered: 2010-01-30
Posts: 237
Website

Re: dunst - a dmenu-ish notification daemon

Unia wrote:
knopwob wrote:
hoeffl wrote:

Why are notifications from Dropbox not shown in dunst?

I just pushed a fix for that. Dropbox was relying on a Dbus method that dunst didn't implement. Please update and let me know if it now works as expected.

I updated the same file in my Dunst repo (Remember? I asked to host a specific version because it was perfect for me at that stage) but I find it not working. Could just be because I have older versions of other files, though.

I just tested your repo and it seems to work here. I put stuff into the dropbox folder, then go to the dropbox homepage, delelete the files with the webinterface and then get a notification via dunst, that the files have been deleted remotly.

Offline

#143 2012-06-25 06:49:54

scottjad
Member
Registered: 2009-03-09
Posts: 13

Re: dunst - a dmenu-ish notification daemon

knopwob wrote:
skanky wrote:

If anyone has any neat uses for this I'd be interested to hear them. I'm currently using it with procmail and remind, but I'm sure there are other things (eg I'm thinking of wrapping my mplayer music playing in a script that uses it). Assuming, that is, that knopwob doesn't mind the clutter in the thread (could start a new one)?

I forgot one that I have in my zshrc:

# nwf stands for "notify when finished"
function nwf {
    "$@"
    if [ $? -gt 0 ]; then
        notify-send -u critical "$1 FAILED"
    else
        notify-send -u critical "$1 finished"
    fi
}

I use this for long running processes that I wan't to get notified when they've finished. For example

nwf makepkg

I have something like this run automatically, and I split up  the two. So I notify of all failures, and I notify of completions of tasks that last longer than, I forget how long, maybe a minute or something. Mine is only for interactive use though.

I don't remember if I copied it or wrote it, but it's in https://github.com/scottjad/dotfiles/bl … zshrc#L310 and https://github.com/scottjad/dotfiles/bl … zshrc#L299

Offline

#144 2012-06-25 08:03:31

Unia
Member
From: The Netherlands
Registered: 2010-03-30
Posts: 2,476
Website

Re: dunst - a dmenu-ish notification daemon

knopwob wrote:
Unia wrote:
knopwob wrote:

I just pushed a fix for that. Dropbox was relying on a Dbus method that dunst didn't implement. Please update and let me know if it now works as expected.

I updated the same file in my Dunst repo (Remember? I asked to host a specific version because it was perfect for me at that stage) but I find it not working. Could just be because I have older versions of other files, though.

I just tested your repo and it seems to work here. I put stuff into the dropbox folder, then go to the dropbox homepage, delelete the files with the webinterface and then get a notification via dunst, that the files have been deleted remotly.

Yep, it's working!


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#145 2012-06-25 09:53:30

Šaran
Member
From: Bosnia
Registered: 2011-09-03
Posts: 407

Re: dunst - a dmenu-ish notification daemon

Šaran wrote:

I think I've found few bugs in light branch:
1. indicate_hidden doesn't work. No matter how many notifications there are, no number gets shown.
2. If I send, for example, 4 different notifications via notify-send, I need to press key bind 4 times to close them, but each time only the last notification is visible. eg.

notify-send one
notify-send two
notify-send three
notify-send four

In this case, pressing ctrl+space will not show three, two or one, but only four.

I just realised this was caused by wrong geometry, so I'd like to make a feature request.
It would be great if dunst had one line geometry - "0x1-290+0" should produce this.
Thanks.

Offline

#146 2012-06-26 15:00:20

hoeffl
Member
Registered: 2011-09-26
Posts: 10

Re: dunst - a dmenu-ish notification daemon

knopwob wrote:
hoeffl wrote:

Why are notifications from Dropbox not shown in dunst?

I just pushed a fix for that. Dropbox was relying on a Dbus method that dunst didn't implement. Please update and let me know if it now works as expected.

Works like a charm smile Very good! I like it!
By the way, is it possible, to display the text centered while dunst uses the whole screen horizontally (geometry = "x3+0+0")? Would be great!

Offline

#147 2012-07-01 07:04:54

knopwob
Member
From: Hannover, Germany
Registered: 2010-01-30
Posts: 237
Website

Re: dunst - a dmenu-ish notification daemon

Hey ho, it's new feature time again.

  1. There's a new option "alignment = {left, center, right}" to define (you guessed it) the alignment of the message text.

  2. New option: "show_age_threshold = 60" to define after how many seconds the age of the notification should be displayed next to it (useful for sticky notifications, the history and as a improvised stop watch e.g: "notify-send -t 0 pizza" will show "pizza (13m 37s old) after show_age_threshold seconds)

  3. new option: "sticky_history = yes" to define wether a notification popped up from history should be sticky or timeout normally

  4. dunst now merges duplicate notifications and adds an indicator of how many duplicates there are: "(4) hey there are four of me"

  5. some bugfixes

Also this:

Šaran wrote:

so I'd like to make a feature request.
It would be great if dunst had one line geometry - "0x1-290+0" should produce this.
Thanks.





hoeffl wrote:

By the way, is it possible, to display the text centered while dunst uses the whole screen horizontally (geometry = "x3+0+0")? Would be great!

[global]
    ....
    alignment = center

in your dunstrc should do the trick.



Those new features are currently not in the light branch, since both branches have diverged quite a lot and it isn't as straight forward as I have thought to keep the light branch up to date with the master branch. I think I have to come up with a better way to make those "i don't want no xft and I want my config.h" guys of you happy wink

As always, if you encounter any issues, please let me know either here or preferably on the issue tracker.

On a side note: Since dunst is going to land in the debian repositories soon, I do 'normal' releases now. So if any one is interested in a slightly more stable dunst package, let me know and I'll create one.
Dunst-git should always be in a working state, but since you're the first ones to use new code, you're also the first to encounter any issues, but that shouldn't be any news to arch users.

Last edited by knopwob (2012-07-01 07:08:20)

Offline

#148 2012-07-01 07:39:26

mnzaki
Member
Registered: 2012-06-08
Posts: 13

Re: dunst - a dmenu-ish notification daemon

Thanks for the great work!

Some notes:

The age does not show if the message has been truncated due to length, which
reminds me, any hope for multiline support instead of truncating messages for
fixed width geometries?

The count is off by one (IMO). It shows "(1)" when you get 1 extra duplicate,
but I think it should show "(2)" as in "You got two of these"

Also there's a typo in dunstrc comments: *sow*_age_threshold

Offline

#149 2012-07-01 08:01:51

knopwob
Member
From: Hannover, Germany
Registered: 2010-01-30
Posts: 237
Website

Re: dunst - a dmenu-ish notification daemon

mnzaki wrote:

Thanks for the great work!

Some notes:

The age does not show if the message has been truncated due to length, which
reminds me, any hope for multiline support instead of truncating messages for
fixed width geometries?

I don't see an obvious way to fit this into how things are currently implemented without becoming a complete hacky mess. So this depends on wether I can come up with a clean way to implement this and for that I can't give a definitive yes or no. Sorry for the lack of an answer.

mnzaki wrote:

The count is off by one (IMO). It shows "(1)" when you get 1 extra duplicate,
but I think it should show "(2)" as in "You got two of these"

yeah, my example in the post above was is one off (or the implementation, depending of your side of view). The number is ment to show how many duplicates are hidden.

mnzaki wrote:

Also there's a typo in dunstrc comments: *sow*_age_threshold

fixed thanks.

Offline

#150 2012-07-01 08:08:21

skanky
Member
From: WAIS
Registered: 2009-10-23
Posts: 1,845

Re: dunst - a dmenu-ish notification daemon

knopwob wrote:
mnzaki wrote:

Thanks for the great work!

Some notes:

The age does not show if the message has been truncated due to length, which
reminds me, any hope for multiline support instead of truncating messages for
fixed width geometries?

I don't see an obvious way to fit this into how things are currently implemented without becoming a complete hacky mess. So this depends on wether I can come up with a clean way to implement this and for that I can't give a definitive yes or no. Sorry for the lack of an answer.

Could you give the option to truncate by cutting text out of the middle of the message?

Eg:- "Now Playi...my grandmother killed a goat.ogg"


"...one cannot be angry when one looks at a penguin."  - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle

Offline

Board footer

Powered by FluxBB