You are not logged in.

#276 2012-12-19 01:14:22

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

Re: dunst - a dmenu-ish notification daemon

@Markus00000
There was a bug that stripped out "/n"  before doing the linebreaks. This should be fixed now in the git version.

Markus00000 wrote:

When I stop dunst and show the same notification with the Gnome notification daemon, the result is this which seems fine:

a\nb

c
d

I think it would make sense to respect newlines in the body part of notifications while it seems optional (or unnecessary?) to have them in the summary.

IMHO when the client puts a newline into the summary they have a reason for that. This should be a non issue anyway since I don't know any client that puts newlines into the summary other than stuff I've written myself. But I may change my opinion if you point me to a program that sends newlines in the summary where this causes problems.

Offline

#277 2012-12-19 08:11:43

Markus00000
Member
Registered: 2011-03-27
Posts: 281

Re: dunst - a dmenu-ish notification daemon

knopwob wrote:

IMHO when the client puts a newline into the summary they have a reason for that. This should be a non issue anyway since I don't know any client that puts newlines into the summary other than stuff I've written myself. But I may change my opinion if you point me to a program that sends newlines in the summary where this causes problems.

I don't know any clients that put newlines into the summary either, except stuff I've written myself. That's why I said it seemed optional. As you say, if someone puts newlines in the summary, there's probably a reason for it and I don't see a reason for dunst to actively strip them.

My point was geared more towards fixing newlines in the body (which you already did in git, thanks a lot) than towards questioning the necessity of respecting newlines in the summary. That wasn't perfectly clear, I think.

Offline

#278 2012-12-19 17:12:13

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

Re: dunst - a dmenu-ish notification daemon

good news everyone

I've just pushed a bunch of new stuff to master. Next to a bunch of internal cleanup there are also some new features:

Since dbus automagically restarts dunst when it crashed it's hard to notice crashes. Which normally is a good thing but it may hide some bugs.
So I've added a new option

[global]
startup_notification = false

which creates a startup notification just so you notice when dunst (re-)starts. So if you want to help you can enable this option to help finding bugs.

Secondly the first step for a context menu is done. If there are urls in a displayed notification you can press a shortcut and dmenu should pop up with the urls, so you can select one which should then be opened in a browser. The corresponding new options are as follows:

[global]
# dmenu commandline
dmenu = /usr/bin/dmenu -p dunst:
# browser commandline
browser = /usr/bin/firefox -new-tab

[shortcuts]
context = ctrl+shift+period

There are still some issues with this though.

  • There is no feedback if the shortcut is pressed without any url present (or found)

  • dunst completely halts while dmenu is open

  • for some reason firefox always opens a new window even with the -new-tab parameter

  • the detection of urls might be a bit wonky. So if you encounter urls that don't get recocgnized or something that isn't a url but is recognized as such please let me know

If you encounter any issues please let me know. The prefered way is the github issue tracker since it's easier to keep track of the issues there and they don't get burried between other posts.

edit:

I forgot one feature. You can pause dunst either by sending a notification with DUNST_COMMAND_PAUSE and DUNST_COMMAND_RESUME or by sending SIGUSR1 to pause and SIGUSR2 to resume. While paused dunst still receives notifications via dbus only keeps them in qeueue and doesn't display anything until resumed.

You can use this for example to wrap it around a screenlocker

#!/bin/bash

fusermount -u $HOME/.private
killall -SIGUSR1 dunst

i3lock --nofork

killall -SIGUSR2 dunst
encfs $HOME/.private.enc $HOME/.private

Last edited by knopwob (2012-12-19 20:12:00)

Offline

#279 2012-12-20 15:33:00

Markus00000
Member
Registered: 2011-03-27
Posts: 281

Re: dunst - a dmenu-ish notification daemon

I've asked before but I didn't see an answer. Is it true that there is no way to add some whitespace (or a border in the background color) around notifications? Like padding in CSS terminology.

Would love to see this because legibility suffers if there's too little whitespace around the notification text. Setting the  line height to a big value is a workaround but not exactly a pretty one.

Edit: On a similar note, are there plans to add colored borders? This would help to make notifications stick out more.

Last edited by Markus00000 (2012-12-20 15:34:52)

Offline

#280 2012-12-20 16:29:30

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

Re: dunst - a dmenu-ish notification daemon

Markus00000 wrote:

I've asked before but I didn't see an answer. Is it true that there is no way to add some whitespace (or a border in the background color) around notifications? Like padding in CSS terminology.

Would love to see this because legibility suffers if there's too little whitespace around the notification text. Setting the  line height to a big value is a workaround but not exactly a pretty one.

currently the only way would be to increase the separator_height. But then the padding would be in another color. I've opened a feature request on github so I won't forget this.

Markus00000 wrote:

Edit: On a similar note, are there plans to add colored borders? This would help to make notifications stick out more.

Eventually yes

Offline

#281 2012-12-21 13:02:52

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

Re: dunst - a dmenu-ish notification daemon

knopwob wrote:
Markus00000 wrote:

I've asked before but I didn't see an answer. Is it true that there is no way to add some whitespace (or a border in the background color) around notifications? Like padding in CSS terminology.

Would love to see this because legibility suffers if there's too little whitespace around the notification text. Setting the  line height to a big value is a workaround but not exactly a pretty one.

currently the only way would be to increase the separator_height. But then the padding would be in another color. I've opened a feature request on github so I won't forget this.

I've added the option

[global]
padding = 5

which adds padding above and beneath a notification. I hope that's what you mean.

I've also added the ability to run scripts when a notification matches a certain rule.

An example would be a rule like

[espeak]
    summary = "*"
    script = dunst_espeak.sh

with a corresponding script dunst_espeak.sh:

#!/bin/bash

summary="$2"
body="$3"

echo "$summary $body" | espeak

the script is called with the following parameters:

script appname summary body icon urgency
# where urgency can be "LOW", "NORMAL" or "CRITICAL"

All those additions are in master, so please update and let me know if you encounter any issues.

Offline

#282 2012-12-21 13:29:04

Markus00000
Member
Registered: 2011-03-27
Posts: 281

Re: dunst - a dmenu-ish notification daemon

knopwob wrote:

I've added the option

[global]
padding = 5

which adds padding above and beneath a notification. I hope that's what you mean.

Thanks, that was quick! I installed the git version and setting the padding works perfectly.

To prevent you from having too much leisure time: Where there's an option to set the top/bottom padding, there should be an option to set the left/right padding as well. :-)

[global]
padding = 5 10

This could mean (like in CSS) 5px top/bottom padding, 10px left/right padding.

Offline

#283 2012-12-21 13:37:32

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

Re: dunst - a dmenu-ish notification daemon

Markus00000 wrote:

To prevent you from having too much leisure time: Where there's an option to set the top/bottom padding, there should be an option to set the left/right padding as well. :-)

[global]
padding = 5 10

This could mean (like in CSS) 5px top/bottom padding, 10px left/right padding.

I knew this would come tongue

I can already tell you that the vertical padding needs a new variable in dunstrc since the config parser doesn't support multiple values for one variable. But that's just a minor detail.

Another question concerning the frame around the whole window. Should it be one constant color or should the color depend on the color of the notification it touches (which would be the same as the separator color)?

I tend to a constant color since it's easier to implement and I suspect that a multicolored frame would look weird. Any input on that?

Offline

#284 2012-12-21 13:45:38

Markus00000
Member
Registered: 2011-03-27
Posts: 281

Re: dunst - a dmenu-ish notification daemon

Two variables are fine.

I think I'd also make the frame one color. Just in order to make it not look too crazy, colorful and divided.

As you said that would be easier to implement, I'd do it that way. If anyone ever brings up good reasons to change it, you can still change it.

Offline

#285 2012-12-21 15:13:58

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

Re: dunst - a dmenu-ish notification daemon

I've added a couple new options which should be sel fexplainatory

[global]
    horizontal_padding = 10

[frame]
    width = 3
    color = "#888888"

I think I've tested most combinations of padding, framing text alignment etc.
But there might still be some bugs with this. Let me know what you think.

Offline

#286 2012-12-21 19:11:07

Markus00000
Member
Registered: 2011-03-27
Posts: 281

Re: dunst - a dmenu-ish notification daemon

Horizontal padding and frame both work flawlessly.

Edit: Leading and trailing whitespace is also fixed.

Last edited by Markus00000 (2012-12-21 19:37:10)

Offline

#287 2012-12-21 20:49:39

zeltak
Member
From: New England
Registered: 2010-08-07
Posts: 165

Re: dunst - a dmenu-ish notification daemon

Hya Knopwob

First of all thx alot for all the recent updates, dunst just gets better and better smile

i have a question about the seperator color. i cant understand how to define a custom color for it:

i have this in my rc file:

# color can either be "foreground" to use the foreground color or
    # "auto" to generate a fitting color depending on the background color
    #color = "foreground"

i have also tried with a "#FFFFFF" value but no matter what i try i get a olive green color, what am i missing here? isnt it possible to define a custom color?

also a bit off topic i cant seem to get how to use the espeak script? i dont get this part:

the script is called with the following parameters:script appname summary body icon urgency
# where urgency can be "LOW", "NORMAL" or "CRITICAL"

i have the script ready and the config section but how do i trigger it for specific notifications?

thx alot again

Z

Offline

#288 2012-12-21 21:36:51

Markus00000
Member
Registered: 2011-03-27
Posts: 281

Re: dunst - a dmenu-ish notification daemon

Offline

#289 2012-12-22 16:26:36

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

Re: dunst - a dmenu-ish notification daemon

zeltak wrote:

i have a question about the seperator color. i cant understand how to define a custom color for it:

i have this in my rc file:

# color can either be "foreground" to use the foreground color or
    # "auto" to generate a fitting color depending on the background color
    #color = "foreground"

i have also tried with a "#FFFFFF" value but no matter what i try i get a olive green color, what am i missing here? isnt it possible to define a custom color?

It wasn't possible until a few minutes ago.
Now you can set separator_color to the following values:

  • auto: dunst tries to find a color fitting to the background

  • foreground: use the same color as the foreground

  • frame: use the same color as the frame.

  • anything else will be interpreted as a X color

On a site note about the config you pasted above: The variable is "separator_color" not "color" and the variable is commented out.

zeltak wrote:

also a bit off topic i cant seem to get how to use the espeak script? i dont get this part:

the script is called with the following parameters:script appname summary body icon urgency
# where urgency can be "LOW", "NORMAL" or "CRITICAL"

i have the script ready and the config section but how do i trigger it for specific notifications?

The script needs to be somewhere in $PATH or you have to specify the complete path to the script in your dunstrc. Also the script needs the executable rights.
Currently the espeak example script isn't installed anywhere. So you have to copy/create it yourself.

The script will automatically be run for any notification that matches the rule in which the script is set.

If you still have problems setting this up, please post the corresponding part of your dunstrc and elaborate on which notifications you want to trigger the script.

Offline

#290 2012-12-22 17:05:46

Markus00000
Member
Registered: 2011-03-27
Posts: 281

Re: dunst - a dmenu-ish notification daemon

Great update! Finally, dunst looks exactly how I like it. :-)

While I think the default color theme is pretty, have you considered making it a bit less "sweet" and less "special" (for lack of a better fitting word)?

There likely are color themes that a) work better with the average desktop environment color theme and b) better match the taste of the average Archer?

I know that it's very subjective and I'm not sure if those averages can be guessed at all, nevertheless I'd go with something like this: http://imgur.com/goiML

The colors work alright on white and black backgrounds. The default theme is a bit on the bright side and in my eyes it doesn't work too well on white backgrounds (like a browser most of the time).

Of course, the colors can easily be changed, yet I'd strive for a default theme that as many users as possible are OK with. Not sure if the above theme fulfills this requirement...

Well, the colors are:

[urgency_low]
    # IMPORTANT: colors have to be defined in quotation marks.
    # Otherwise the '#' and following  would be interpreted as a comment.
    background = "#666666"
    foreground = "#ffffff"
    timeout = 10

[urgency_normal]
    background = "#294882"
    foreground = "#ffffff"
    timeout = 10

[urgency_critical]
    background = "#990000"
    foreground = "#ffffff"
    timeout = 0

Offline

#291 2012-12-22 18:33:31

progandy
Member
Registered: 2012-05-17
Posts: 2,146

Re: dunst - a dmenu-ish notification daemon

I have a similar color scheme with less contrast:
dunstexampleu2j1w.png

[global]
format = "╰%I╶┨%s┠╴%b %p╯"
[urgency_low]
    background = "#666666"
    foreground = "#AAAAAA"
[urgency_normal]
    background = "#222222"
    foreground = "#DDDDDD"
[urgency_critical]
    background = "#662222"
    foreground = "#EEEEEE"

Offline

#292 2012-12-27 17:38:00

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

Re: dunst - a dmenu-ish notification daemon

I agree that the current default colors aren't the prettiest.

I thought about changing them to match the default dmenu/dwm or maybe i3 colors, since those are probable the majority of the users, I guess. But I fear that the notifications might not pop out enough and will go mostly unrecognized.

At least that were my thoughts before I introduced the framing. I have to play around a bit and use it for a couple of days before I'm confident enough to change the defaults.

Offline

#293 2013-01-02 22:18:52

kaari
Member
Registered: 2011-08-12
Posts: 22

Re: dunst - a dmenu-ish notification daemon

I am using the latest dev version (v0.4.0-107-ga51f564) and I noticed that inline comments in dunstrc break the geometry.

geometry = "130x3-0+0"
displays a small box in the upper-right corner.

geometry = "130x3-0+0" # just a comment
expands it over the whole screen.


I can reproduce this in both the stable and dev versions using killall dunst and notify-send "hello".

Offline

#294 2013-01-10 21:59:00

zeltak
Member
From: New England
Registered: 2010-08-07
Posts: 165

Re: dunst - a dmenu-ish notification daemon

knopwob wrote:

It wasn't possible until a few minutes ago.
Now you can set separator_color to the following values:

  • auto: dunst tries to find a color fitting to the background

  • foreground: use the same color as the foreground

  • frame: use the same color as the frame.

  • anything else will be interpreted as a X color

hya again

i still no matter what i do get the seperator in any color beside ugly green smile i have tried all options but all only results in the green seprator, example:
    color = "foreground"

what am i missing here smile

P.s using latest git from today

Z

Offline

#295 2013-01-10 22:07:20

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

Re: dunst - a dmenu-ish notification daemon

@zeltak: can you please post your complete dunstrc?

Offline

#296 2013-01-11 02:25:30

zeltak
Member
From: New England
Registered: 2010-08-07
Posts: 165

Re: dunst - a dmenu-ish notification daemon

ofc here it is:

http://paste.xinu.at/f4OTt4/

thx

Z

Offline

#297 2013-01-11 17:07:29

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

Re: dunst - a dmenu-ish notification daemon

Ahh, you're using the configuration for the old separator style. Take a look at the default dunstrc.
There's no "[separator]" section anymore.

Offline

#298 2013-01-11 17:13:17

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

Re: dunst - a dmenu-ish notification daemon

I'm planning to release a new version in a few days. Does anyone have any problems/issues/bugs with the current git version? Not counting missing features, those have to wait till the next release wink

Offline

#299 2013-01-11 21:57:51

zeltak
Member
From: New England
Registered: 2010-08-07
Posts: 165

Re: dunst - a dmenu-ish notification daemon

woot dunst has transparnecy now? how did i miss that  smile

frakkin amazing..thx knopwob , dunst is def one of my all time floss apps smile

No bugs present on my sys using git, release away smile

Z

Last edited by zeltak (2013-01-13 15:07:13)

Offline

#300 2013-01-13 15:05:05

Rasi
Member
From: Germany
Registered: 2007-08-14
Posts: 1,841
Website

Re: dunst - a dmenu-ish notification daemon

request:  set border color by priority...


He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.

Douglas Adams

Offline

Board footer

Powered by FluxBB