You are not logged in.

#76 2011-11-19 08:50:53

Ogion
Member
From: Germany
Registered: 2007-12-11
Posts: 367

Re: dunst - a dmenu-ish notification daemon

Yea, both have that commit up top. Fortunately i still have the output of makepkg in buffer, so here goes:
(EDIT: Sorry, accidentally posted the wrong makkepkg output, my recompile with some config.def.h change (other font), this is the right one)

ogion@Gont ~builds/dunst-git % makepkg
==> Bestimme letzte git Revision ...
  -> Gefundene Version: 20111118
==> Erstelle Paket: dunst-git 20111118-1 (Fr 18. Nov 20:35:47 CET 2011)
==> Prüfe Laufzeit-Abhängigkeiten...
==> Prüfe Buildtime-Abhängigkeiten...
==> Empfange Quellen...
==> Entpacke Quellen...
==> Beginne build()...
==> Connecting to GIT server....
Cloning into 'dunst'...
remote: Counting objects: 281, done.
remote: Compressing objects: 100% (154/154), done.
remote: Total 281 (delta 184), reused 218 (delta 121)
Receiving objects: 100% (281/281), 55.06 KiB | 77 KiB/s, done.
Resolving deltas: 100% (184/184), done.
==> GIT checkout done or server timeout
==> Starting make...
pod2man README.pod > dunst.1
dunst build options:
CFLAGS   = -march=i686 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -g -ansi -pedantic -Wall -Os -I/usr/include/X11 -I/usr/lib/dbus-1.0/include -I/usr/include/dbus-1.0 -D_BSD_SOURCE -DVERSION="" -DXINERAMA
LDFLAGS  = -Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu -s -L/usr/lib/X11 -lX11 -ldbus-1 -lpthread -lrt -lXinerama
CC       = cc
creating config.h from config.def.h
CC -c draw.c
CC -c dunst.c
CC -o dunst
==> Betrete fakeroot-Umgebung ...
==> Beginne package()...
dunst build options:
CFLAGS   = -march=i686 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -g -ansi -pedantic -Wall -Os -I/usr/X11R6/include -I/usr/lib/dbus-1.0/include -I/usr/include/dbus-1.0 -D_BSD_SOURCE -DVERSION="" -DXINERAMA
LDFLAGS  = -Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu -s -L/usr/X11R6/lib -lX11 -ldbus-1 -lpthread -lrt -lXinerama
CC       = cc
installing executables to /home/ogion/builds/dunst-git/pkg/usr/bin
installing manual pages to /home/ogion/builds/dunst-git/pkg/usr/share/man/man1
==> Säubere Installation...
  -> Bereinige andere Dateien...
  -> Komprimiere Man-Pages und Info-Seiten...
  -> Entferne unnötige Symbole aus Binär-Dateien und Bibliotheken...
==> Erstelle Paket ...
  -> Erstelle .PKGINFO-Datei...
  -> Komprimiere Paket ...
==> Verlasse fakeroot-Umgebung.
==> Beendete make: dunst-git 20111118-1 (Fr 18. Nov 20:35:58 CET 2011)

@OT: What do you mean? Yes, the forum replaces :P with the tongue smilie, unless you hit the “Never show smilies as icons for this post” bcheckbox (below the editing box when you do a full Post reply and not just a quick post), as i just did. Why are you asking me though? Because of the "*naiv*" ? (I simply typed that)

I'll probably be offline all day, i'll look at it again in the evening.

Ogion

EDIT2: Just noticed, now i know what you mean with "replaces the tongue smilie with "tongue". That probably just happened because i highlighted your text with the mouse, and pasted it into my post, when doing that instead of some  picture (the smilie) then attribute text gets copied.

Last edited by Ogion (2011-11-19 08:54:51)


(my-dotfiles)
"People willing to trade their freedom for temporary security deserve neither and will lose both." - Benjamin Franklin
"Enlightenment is man's leaving his self-caused immaturity." - Immanuel Kant

Offline

#77 2011-11-19 09:00:55

Ogion
Member
From: Germany
Registered: 2007-12-11
Posts: 367

Re: dunst - a dmenu-ish notification daemon

(Sorry for the double post)
I just makepkg'd again, and now it works properly, ignoring other mouse events but left or rightclick. smile

Ogion


(my-dotfiles)
"People willing to trade their freedom for temporary security deserve neither and will lose both." - Benjamin Franklin
"Enlightenment is man's leaving his self-caused immaturity." - Immanuel Kant

Offline

#78 2011-11-26 16:17:34

c0r73x
Member
From: Sweden
Registered: 2011-05-06
Posts: 14

Re: dunst - a dmenu-ish notification daemon

Hi, I added pango support to dunst.

however it does not show diffrent colors then "normal" and atm there is no cleanup for pango. Anyhow here is the patch file if someone wants it smile

Only in dunst_pango: config.h
diff -crB dunst/config.mk dunst_pango/config.mk
*** dunst/config.mk	2011-11-26 16:59:13.436554381 +0100
--- dunst_pango/config.mk	2011-11-26 14:21:25.254556606 +0100
***************
*** 10,17 ****
  XINERAMAFLAGS = -DXINERAMA
  
  # includes and libs
! INCS = -I${X11INC} -I/usr/lib/dbus-1.0/include -I/usr/include/dbus-1.0
! LIBS = -L${X11LIB} -lX11 -ldbus-1 -lpthread -lrt ${XINERAMALIBS}
  
  # flags
  CPPFLAGS = -D_BSD_SOURCE -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS}
--- 10,17 ----
  XINERAMAFLAGS = -DXINERAMA
  
  # includes and libs
! INCS = -I${X11INC} -I/usr/lib/dbus-1.0/include -I/usr/include/dbus-1.0 `pkg-config --cflags xft pango pangoxft`
! LIBS = -L${X11LIB} -lX11 -ldbus-1 -lpthread -lrt ${XINERAMALIBS} `pkg-config --libs xft pango pangoxft`
  
  # flags
  CPPFLAGS = -D_BSD_SOURCE -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS}
diff -crB dunst/draw.c dunst_pango/draw.c
*** dunst/draw.c	2011-11-26 16:59:13.436554381 +0100
--- dunst_pango/draw.c	2011-11-26 16:53:45.524929635 +0100
***************
*** 11,17 ****
  #define MIN(a, b)  ((a) < (b) ? (a) : (b))
  #define DEFAULTFN  "fixed"
  
! static Bool loadfont(DC *dc, const char *fontstr);
  
  void
  drawrect(DC *dc, int x, int y, unsigned int w, unsigned int h, Bool fill, unsigned long color) {
--- 11,17 ----
  #define MIN(a, b)  ((a) < (b) ? (a) : (b))
  #define DEFAULTFN  "fixed"
  
! static int screen;
  
  void
  drawrect(DC *dc, int x, int y, unsigned int w, unsigned int h, Bool fill, unsigned long color) {
***************
*** 24,56 ****
  
  void
  drawtext(DC *dc, const char *text, unsigned long col[ColLast]) {
!     char buf[BUFSIZ];
!     size_t mn, n = strlen(text);
  
!     /* shorten text if necessary */
!     for(mn = MIN(n, sizeof buf); textnw(dc, text, mn) + dc->font.height/2 > dc->w; mn--)
!         if(mn == 0)
!             return;
!     memcpy(buf, text, mn);
!     if(mn < n)
!         for(n = MAX(mn-3, 0); n < mn; buf[n++] = '.');
! 
!     drawrect(dc, 0, 0, dc->w, dc->h, True, BG(dc, col));
!     drawtextn(dc, buf, mn, col);
  }
  
  void
  drawtextn(DC *dc, const char *text, size_t n, unsigned long col[ColLast]) {
!     int x = dc->x + dc->font.height/2;
!     int y = dc->y + dc->font.ascent+1;
! 
!     XSetForeground(dc->dpy, dc->gc, FG(dc, col));
!     if(dc->font.set)
!         XmbDrawString(dc->dpy, dc->canvas, dc->font.set, dc->gc, x, y, text, n);
!     else {
!         XSetFont(dc->dpy, dc->gc, dc->font.xfont->fid);
!         XDrawString(dc->dpy, dc->canvas, dc->gc, x, y, text, n);
!     }
  }
  
  void
--- 24,54 ----
  
  void
  drawtext(DC *dc, const char *text, unsigned long col[ColLast]) {
! 	char buf[256];
! 	int i, x, y, h, len, olen;
  
! 	XSetForeground(dc->dpy, dc->gc, BG(dc, col));
! 	XFillRectangle(dc->dpy, dc->canvas, dc->gc, dc->x, dc->y, dc->w, dc->h);
! 	if(!text)
!     	return;
! 	olen = strlen(text);
! 	h = dc->font.ascent + dc->font.descent;
! 	y = dc->y; /* + (dc.h / 2) - (h / 2) + dc.font.ascent; */
! 	x = dc->x + ((dc->font.ascent + dc->font.descent) / 2);
! 	/* shorten text if necessary */
! 	for(len = MIN(olen, sizeof buf); len && textnw(dc, text, len) > dc->w - h; len--);
! 	if(!len)
! 		return;
! 	memcpy(buf, text, len);
! 	if(len < olen)
!     	for(i = len; i && i > len - 3; buf[--i] = '.');
! 	pango_layout_set_text(dc->plo, text, len);
! 	pango_xft_render_layout(dc->xftdrawable, dc->xftnorm+ColFG, dc->plo, x * PANGO_SCALE, y * PANGO_SCALE); 
  }
  
  void
  drawtextn(DC *dc, const char *text, size_t n, unsigned long col[ColLast]) {
! 	drawtext(dc,text,col);
  }
  
  void
***************
*** 70,79 ****
  
  void
  freedc(DC *dc) {
-     if(dc->font.set)
-         XFreeFontSet(dc->dpy, dc->font.set);
-     if(dc->font.xfont)
-         XFreeFont(dc->dpy, dc->font.xfont);
      if(dc->canvas)
          XFreePixmap(dc->dpy, dc->canvas);
      XFreeGC(dc->dpy, dc->gc);
--- 68,73 ----
***************
*** 82,94 ****
  }
  
  unsigned long
! getcolor(DC *dc, const char *colstr) {
!     Colormap cmap = DefaultColormap(dc->dpy, DefaultScreen(dc->dpy));
!     XColor color;
  
!     if(!XAllocNamedColor(dc->dpy, cmap, colstr, &color, &color))
          eprintf("cannot allocate color '%s'\n", colstr);
!     return color.pixel;
  }
  
  DC *
--- 76,88 ----
  }
  
  unsigned long
! getcolor(DC *dc, const char *colstr, XftColor *color) {
!     Colormap cmap = DefaultColormap(dc->dpy, screen);
! 	Visual *vis = DefaultVisual(dc->dpy, screen);
  
!     if(!XftColorAllocName(dc->dpy, vis, cmap, colstr, color))
          eprintf("cannot allocate color '%s'\n", colstr);
!     return color->pixel;
  }
  
  DC *
***************
*** 101,146 ****
          eprintf("cannot malloc %u bytes:", sizeof *dc);
      if(!(dc->dpy = XOpenDisplay(NULL)))
          eprintf("cannot open display\n");
! 
      dc->gc = XCreateGC(dc->dpy, DefaultRootWindow(dc->dpy), 0, NULL);
      XSetLineAttributes(dc->dpy, dc->gc, 1, LineSolid, CapButt, JoinMiter);
      return dc;
  }
  
  void
  initfont(DC *dc, const char *fontstr) {
!     if(!loadfont(dc, fontstr ? fontstr : DEFAULTFN)) {
!         if(fontstr != NULL)
!             fprintf(stderr, "cannot load font '%s'\n", fontstr);
!         if(fontstr == NULL || !loadfont(dc, DEFAULTFN))
!             eprintf("cannot load font '%s'\n", DEFAULTFN);
!     }
!     dc->font.height = dc->font.ascent + dc->font.descent;
! }
  
! Bool
! loadfont(DC *dc, const char *fontstr) {
!     char *def, **missing, **names;
!     int i, n = 1;
!     XFontStruct **xfonts;
! 
!     if(!*fontstr)
!         return False;
!     if((dc->font.set = XCreateFontSet(dc->dpy, fontstr, &missing, &n, &def)))
!         n = XFontsOfFontSet(dc->font.set, &xfonts, &names);
!     else if((dc->font.xfont = XLoadQueryFont(dc->dpy, fontstr)))
!         xfonts = &dc->font.xfont;
!     else
!         n = 0;
  
!     for(i = 0; i < n; i++) {
!         dc->font.ascent  = MAX(dc->font.ascent,  xfonts[i]->ascent);
!         dc->font.descent = MAX(dc->font.descent, xfonts[i]->descent);
!         dc->font.width   = MAX(dc->font.width,   xfonts[i]->max_bounds.width);
!     }
!     if(missing)
!         XFreeStringList(missing);
!     return (dc->font.set || dc->font.xfont);
  }
  
  void
--- 95,130 ----
          eprintf("cannot malloc %u bytes:", sizeof *dc);
      if(!(dc->dpy = XOpenDisplay(NULL)))
          eprintf("cannot open display\n");
! 	
      dc->gc = XCreateGC(dc->dpy, DefaultRootWindow(dc->dpy), 0, NULL);
      XSetLineAttributes(dc->dpy, dc->gc, 1, LineSolid, CapButt, JoinMiter);
+ 
+ 	screen = DefaultScreen(dc->dpy);
      return dc;
  }
  
  void
  initfont(DC *dc, const char *fontstr) {
! 	PangoFontMetrics *metrics;
  
! 	dc->pgc = pango_xft_get_context(dc->dpy, screen);
! 	dc->pfd = pango_font_description_from_string(fontstr);
  
! 	metrics = pango_context_get_metrics(dc->pgc, dc->pfd, pango_language_from_string(setlocale(LC_CTYPE, "")));
! 
! 	dc->font.ascent  = pango_font_metrics_get_ascent(metrics) / PANGO_SCALE;
! 	dc->font.descent = pango_font_metrics_get_descent(metrics) / PANGO_SCALE;
! 
! 	pango_font_metrics_unref(metrics);
! 
! 	dc->plo = pango_layout_new(dc->pgc);
! 	pango_layout_set_font_description(dc->plo, dc->pfd);
! 	dc->font.height = dc->font.ascent + dc->font.descent;
! }
! 
! Bool loadfont(DC *dc, const char *fontstr) {
! 	initfont(dc,fontstr);
! 	return True;
  }
  
  void
***************
*** 157,173 ****
      dc->h = h;
      dc->canvas = XCreatePixmap(dc->dpy, DefaultRootWindow(dc->dpy), w, h,
                                 DefaultDepth(dc->dpy, DefaultScreen(dc->dpy)));
  }
  
  int
  textnw(DC *dc, const char *text, size_t len) {
!     if(dc->font.set) {
!         XRectangle r;
! 
!         XmbTextExtents(dc->font.set, text, len, NULL, &r);
!         return r.width;
!     }
!     return XTextWidth(dc->font.xfont, text, len);
  }
  
  int
--- 141,158 ----
      dc->h = h;
      dc->canvas = XCreatePixmap(dc->dpy, DefaultRootWindow(dc->dpy), w, h,
                                 DefaultDepth(dc->dpy, DefaultScreen(dc->dpy)));
+ 
+ 	dc->xftdrawable = XftDrawCreate(dc->dpy, dc->canvas, DefaultVisual(dc->dpy,screen), DefaultColormap(dc->dpy,screen));
+ 	if(!dc->xftdrawable)
+ 		eprintf("cannot create drawable\n");
  }
  
  int
  textnw(DC *dc, const char *text, size_t len) {
! 	PangoRectangle r;
! 	pango_layout_set_text(dc->plo, text, len);
! 	pango_layout_get_extents(dc->plo, &r, 0);
! 	return r.width / PANGO_SCALE;
  }
  
  int
diff -crB dunst/draw.h dunst_pango/draw.h
*** dunst/draw.h	2011-11-26 16:59:13.436554381 +0100
--- dunst_pango/draw.h	2011-11-26 16:47:20.009998325 +0100
***************
*** 6,11 ****
--- 5,14 ----
  #define FG(dc, col)  ((col)[(dc)->invert ? ColBG : ColFG])
  #define BG(dc, col)  ((col)[(dc)->invert ? ColFG : ColBG])
  
+ #include <pango/pango.h>
+ #include <pango/pangoxft.h>
+ #include <pango/pango-font.h>
+ 
  enum { ColBG, ColFG, ColBorder, ColLast };
  
  typedef struct {
***************
*** 14,26 ****
  	Display *dpy;
  	GC gc;
  	Pixmap canvas;
  	struct {
  		int ascent;
  		int descent;
  		int height;
- 		int width;
- 		XFontSet set;
- 		XFontStruct *xfont;
  	} font;
  } DC;  /* draw context */
  
--- 17,36 ----
  	Display *dpy;
  	GC gc;
  	Pixmap canvas;
+ 
+ 	XftColor xftlow[ColLast];
+ 	XftColor xftnorm[ColLast];
+ 	XftColor xftcrit[ColLast];
+ 	XftDraw *xftdrawable;
+ 
+ 	PangoContext *pgc;
+ 	PangoLayout *plo;
+ 	PangoFontDescription *pfd;
+ 
  	struct {
  		int ascent;
  		int descent;
  		int height;
  	} font;
  } DC;  /* draw context */
  
***************
*** 29,35 ****
  void drawtextn(DC *dc, const char *text, size_t n, unsigned long col[ColLast]);
  void eprintf(const char *fmt, ...);
  void freedc(DC *dc);
! unsigned long getcolor(DC *dc, const char *colstr);
  DC *initdc(void);
  void initfont(DC *dc, const char *fontstr);
  void mapdc(DC *dc, Window win, unsigned int w, unsigned int h);
--- 39,45 ----
  void drawtextn(DC *dc, const char *text, size_t n, unsigned long col[ColLast]);
  void eprintf(const char *fmt, ...);
  void freedc(DC *dc);
! unsigned long getcolor(DC *dc, const char *colstr, XftColor* color);
  DC *initdc(void);
  void initfont(DC *dc, const char *fontstr);
  void mapdc(DC *dc, Window win, unsigned int w, unsigned int h);
diff -crB dunst/dunst.c dunst_pango/dunst.c
*** dunst/dunst.c	2011-11-26 16:59:13.436554381 +0100
--- dunst_pango/dunst.c	2011-11-26 16:54:41.421070885 +0100
***************
*** 524,535 ****
      }
      root = RootWindow(dc->dpy, DefaultScreen(dc->dpy));
  
!     colors[0][ColBG] = getcolor(dc, lowbgcolor);
!     colors[0][ColFG] = getcolor(dc, lowfgcolor);
!     colors[1][ColBG] = getcolor(dc, normbgcolor);
!     colors[1][ColFG] = getcolor(dc, normfgcolor);
!     colors[2][ColBG] = getcolor(dc, critbgcolor);
!     colors[2][ColFG] = getcolor(dc, critfgcolor);
  
      utf8 = XInternAtom(dc->dpy, "UTF8_STRING", False);
  
--- 525,536 ----
      }
      root = RootWindow(dc->dpy, DefaultScreen(dc->dpy));
  
!     colors[0][ColBG] = getcolor(dc, lowbgcolor, dc->xftlow+ColBG);
!     colors[0][ColFG] = getcolor(dc, lowfgcolor, dc->xftlow+ColFG);
!     colors[1][ColBG] = getcolor(dc, normbgcolor, dc->xftnorm+ColBG);
!     colors[1][ColFG] = getcolor(dc, normfgcolor, dc->xftnorm+ColFG);
!     colors[2][ColBG] = getcolor(dc, critbgcolor, dc->xftcrit+ColBG);
!     colors[2][ColFG] = getcolor(dc, critfgcolor, dc->xftcrit+ColFG);
  
      utf8 = XInternAtom(dc->dpy, "UTF8_STRING", False);
  

Offline

#79 2011-12-28 22:01:09

ninian
Member
From: United Kingdom
Registered: 2008-02-24
Posts: 701
Website

Re: dunst - a dmenu-ish notification daemon

Unfortunately, dunst seems to segfault when I try and get the Goggles Music Manager (package gogglesmm) to notify me when a track changes. Here's what dmesg reports:

dunst[4633]: segfault at 777aa550 ip b775f313 sp bf91dca8 error 4 in libdbus-1.so.3.5.8[b7734000+48000]

Anyone else experience a problem like this?
sad

Offline

#80 2011-12-29 22:44:00

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

Re: dunst - a dmenu-ish notification daemon

ninian wrote:

Unfortunately, dunst seems to segfault when I try and get the Goggles Music Manager (package gogglesmm) to notify me when a track changes.
sad

I just commited a change that should fix this problem. Please let me know, if there are still problems after you've updated dunst.

Offline

#81 2011-12-29 23:58:37

ninian
Member
From: United Kingdom
Registered: 2008-02-24
Posts: 701
Website

Re: dunst - a dmenu-ish notification daemon

knopwob wrote:

I just commited a change that should fix this problem. Please let me know, if there are still problems after you've updated dunst.

Many thanks for fixing this so quickly; the updated version seems to work fine as far as I have tested it.
smile

Offline

#82 2011-12-30 00:10:07

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

Re: dunst - a dmenu-ish notification daemon

I just pushed another commit a few minutes ago, because I noticed that while fixing one issue, I broke another thing.
Now everything should be fine again. Please update once more, just to make sure, that you've also included the latest commits with your update. Otherwise pidgin will be broken, for example.

I'm sorry for the inconvinience smile

Offline

#83 2012-01-21 12:29:01

milso
Member
Registered: 2010-11-16
Posts: 112
Website

Re: dunst - a dmenu-ish notification daemon

Great project, I use dunst for irc highlights, mpd, and rtorrent.

Image

Offline

#84 2012-01-24 01:08:21

Army
Member
Registered: 2007-12-07
Posts: 1,784

Re: dunst - a dmenu-ish notification daemon

I don't get it, why I have this problem:

I have dunst in my .xinitrc

...
dunst &
exec dbus-launch dwm-start

but a notify-send "test" doesn't output anything. But dunst is running! After killing and then starting dunst manually in a terminal or with dmenu, suddenly it works. What am I doing wrong?!

Last edited by Army (2012-01-24 01:09:06)

Offline

#85 2012-01-24 02:20:11

milso
Member
Registered: 2010-11-16
Posts: 112
Website

Re: dunst - a dmenu-ish notification daemon

Army wrote:

I don't get it, why I have this problem:

I have dunst in my .xinitrc

...
dunst &
exec dbus-launch dwm-start

but a notify-send "test" doesn't output anything. But dunst is running! After killing and then starting dunst manually in a terminal or with dmenu, suddenly it works. What am I doing wrong?!

I'm not sure if it would help your case but I have dunst running fine from my xinitrc as:

dunst -t 3 &

Offline

#86 2012-01-24 10:00:34

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

Re: dunst - a dmenu-ish notification daemon

Army wrote:

I don't get it, why I have this problem:

I have dunst in my .xinitrc

...
dunst &
exec dbus-launch dwm-start

but a notify-send "test" doesn't output anything. But dunst is running! After killing and then starting dunst manually in a terminal or with dmenu, suddenly it works. What am I doing wrong?!

I guess the problem is that dunst is started before the dbud-launch. I can atleast reproduce your problem, when I add the dbus-launch to my .xinitrc. you can try to put dunst in your start-dwm script, or remove the dbus-launch if it doesn't break anything else.

Offline

#87 2012-01-24 10:10:27

Army
Member
Registered: 2007-12-07
Posts: 1,784

Re: dunst - a dmenu-ish notification daemon

Damn, right, thanks!

Offline

#88 2012-05-13 13:44:16

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

Re: dunst - a dmenu-ish notification daemon

Is it possible to right align text?

Offline

#89 2012-05-13 15:36:41

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

Re: dunst - a dmenu-ish notification daemon

Wow, I just discovered this and it's the last thing I wanted to add to make my system perfect! Thanks for writing this awesome program, knopwob!

I do have a small feature request though: I have disabled client titles in DWM so I have an 'empty space' between my tag names and the statusbar. It would be nice if I could make dunst 'fit' in there, instead of that it 'overwrites' the bar. I have already set geometry x so that it doesn't cover the tag names, but could you somehow implement another geometry option for maximum length or something? On the first page I read you were gonna add a similar feature (breaking of lines as set maximum length got passed) so if you have already started working on this, then I would +1 that one!

Again, many thanks! big_smile


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

#90 2012-05-13 15:37:31

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

Re: dunst - a dmenu-ish notification daemon

Šaran wrote:

Is it possible to right align text?

Perhaps you want the -geometry -x option?


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

#91 2012-05-13 16:22:41

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

Re: dunst - a dmenu-ish notification daemon

@Šaran
No there isn't

@Unia
I'm glad you like it.


Dunst is currently in bugfix-only-mode because I switched to python for my coding.
But reimplementing dunst(+ some wanted features) in python is on my todolist.

Offline

#92 2012-05-13 16:52:20

ninian
Member
From: United Kingdom
Registered: 2008-02-24
Posts: 701
Website

Re: dunst - a dmenu-ish notification daemon

knopwob wrote:

Dunst is currently in bugfix-only-mode because I switched to python for my coding.
But reimplementing dunst(+ some wanted features) in python is on my todolist.

Aaaaaaargh! The lack of overhead with dunst is what I love most about it ... without the not-insignificant overhead of Python.
Or is it 1 April ...?!
wink

Offline

#93 2012-05-13 18:05:19

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

Re: dunst - a dmenu-ish notification daemon

ninian wrote:
knopwob wrote:

Dunst is currently in bugfix-only-mode because I switched to python for my coding.
But reimplementing dunst(+ some wanted features) in python is on my todolist.

Aaaaaaargh! The lack of overhead with dunst is what I love most about it ... without the not-insignificant overhead of Python.
Or is it 1 April ...?!
wink

If you satisfied with the current state, there's nothing stopping you to just keep using it ;-)

And what overhead of python do you mean? The memory overhead should be in the same dimention
as the overhead of running a bash instance for shellscripts (i guess). Or don't you like shellscripts either?

And the cpu overhead is also neglectable since dunst is sleeping most of the time anyway.

Offline

#94 2012-05-15 10:21:10

Doomcide
Member
Registered: 2011-08-22
Posts: 221

Re: dunst - a dmenu-ish notification daemon

ran into some troubles, while compiling on debian sid and freebsd 9.0:

pod2man README.pod > dunst.1
dunst build options:
CFLAGS   = -g -ansi -pedantic -Wall -Os -I/usr/X11R6/include -I/usr/lib/dbus-1.0/include -I/usr/include/dbus-1.0 -D_BSD_SOURCE -DVERSION="" -DXINERAMA
LDFLAGS  = -s -L/usr/X11R6/lib -lX11 -ldbus-1 -lpthread -lrt -lXinerama
CC       = cc
CC -c draw.c
CC -c dunst.c
In file included from dunst_dbus.h:1:0,
                 from dunst.c:77:
/usr/include/dbus-1.0/dbus/dbus.h:29:33: fatal error: dbus/dbus-arch-deps.h: No such file or directory
compilation terminated.
make: *** [dunst.o] Error 1

The solution is to add

-I/usr/lib/x86_64-linux-gnu/dbus-1.0/include

to the end of the line

INCS = -I${X11INC} -I/usr/lib/dbus-1.0/include -I/usr/include/dbus-1.0

in config.mk
Maybe this could be fixed or pointed out on the github site, so people know what to do, when they get the same error smile

Last edited by Doomcide (2012-05-15 10:34:37)

Offline

#95 2012-06-12 13:50:23

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

Re: dunst - a dmenu-ish notification daemon

Hi,

I've got some new (well, mostly old, not yet merged) features in the pipeline.

Before I merge them into the master branch, I wanted to know if you guys prefer to configure dunst at compiletime via config.h or a configuration file in your $HOME? Basically I want to know if I should merge my config-file-branch or not. At the moment these two options are mutually exclusive.

Oh and xft-support will be included. You have to thank Unia for that.

Offline

#96 2012-06-12 13:51:23

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

Re: dunst - a dmenu-ish notification daemon

knopwob wrote:

Hi,

I've got some new (well, mostly old, not yet merged) features in the pipeline.

Before I merge them into the master branch, I wanted to know if you guys prefer to configure dunst at compiletime via config.h or a configuration file in your $HOME? Basically I want to know if I should merge my config-file-branch or not. At the moment these two options are mutually exclusive.

I would prefer through config.h!

knopwob wrote:

Oh and xft-support will be included. You have to thank Unia for that.

Oh no, you did the hard parts!


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

#97 2012-06-12 15:03:13

bohoomil
Member
Registered: 2010-09-04
Posts: 2,376
Website

Re: dunst - a dmenu-ish notification daemon

knopwob wrote:

[...] if you guys prefer to configure dunst at compiletime via config.h or a configuration file in your $HOME?

Doesn't really matter.

knopwob wrote:

Oh and xft-support will be included.

I do hope it's an option only and I still will be able to use good old bitmap fonts? neutral


:: Registered Linux User No. 223384

:: github
:: infinality-bundle+fonts: good looking fonts made easy

Offline

#98 2012-06-12 15:05:09

mentat
Member
From: France
Registered: 2009-01-13
Posts: 138
Website

Re: dunst - a dmenu-ish notification daemon

Configuration file please

^_^

Offline

#99 2012-06-12 15:26:36

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

Re: dunst - a dmenu-ish notification daemon

bohoomil wrote:
knopwob wrote:

Oh and xft-support will be included.

I do hope it's an option only and I still will be able to use good old bitmap fonts? neutral

Perhaps it's best to maintain the two branches that you have now, Knopwob.


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

#100 2012-06-12 15:58:39

ninian
Member
From: United Kingdom
Registered: 2008-02-24
Posts: 701
Website

Re: dunst - a dmenu-ish notification daemon

knopwob wrote:

I wanted to know if you guys prefer to configure dunst at compiletime via config.h or a configuration file in your $HOME? ... Oh and xft-support will be included. You have to thank Unia for that.

Configuration file would be my preference; and that's great about the Xft support too.

Offline

Board footer

Powered by FluxBB