dunst icon indicating copy to clipboard operation
dunst copied to clipboard

[Q] invoke dmenu revers order

Open biopsin opened this issue 1 year ago • 7 comments

2024-08-27-195254_3840x2160_scrot

Issue description

Hi, i need to revers the order dmenu outputs open notifications, the order in picture is "dmenu top" = "bottom notification" I would like to align it equal top to bottom?

Installation info

  • Version: 1.11
  • Install type: pkg
  • Window manager / Desktop environment: cwm
  • Distro: void
Minimal dunstrc
dmenu = /usr/local/bin/dmenu

#####dmenu bin
/usr/bin/dmenu -i -l 9 -x 1560 -w 720 -fn "Dejavu Sans:style=Book:pixelsize=16" \
	-nb "#FDF6E3" -nf "#555555" -sb "#657B83" -sf "#FFFFFF"

biopsin avatar Aug 27 '24 18:08 biopsin

could it be that dmenu automatically orders entry by alphabetical order?

bynect avatar Aug 28 '24 14:08 bynect

no the dmenu entries are ordered but in reverse order, however I will test with different priority tho. Maybe your right its alphabetical but bottom to top in dmenu. Yes dmenu_output is ordered alphabetical but thats fine as are the notifications (at least locally), so they both align, but one is in a revers order. The first dmenu_line should trigger first/top notification and so on as its intuitive at least to me to match a selected line with a spesific notification, if it makes sense?

biopsin avatar Aug 28 '24 16:08 biopsin

I'm looking at this. could it be that you are using a particular notification ordering? or are you using the default one (last arrived at the top)?

also what did you do to open that notification menu? exact command

bynect avatar Sep 03 '24 09:09 bynect

Yes default; last is top. Default binary location as in dunstrc but its a symlink to local/bin with extra dmenu config settings, nothing that would order on a custom level. I guess it would also make sense to order/group in a mixed action nonaction condition all action notifications are stacked first/above all nonaction notifications.

biopsin avatar Sep 04 '24 18:09 biopsin

what did you do to pop up that menu exactly?

bynect avatar Sep 08 '24 09:09 bynect

bind-key 4M-space - "dunstctl context" or is there something else you are thinking of?

biopsin avatar Sep 09 '24 08:09 biopsin

just wanted to be sure. I think the problem lies in this function here https://github.com/dunst-project/dunst/blob/d2faa87081329a31726082837d5197199be53f50/src/menu.c#L296

I will try to fix the order in some time

bynect avatar Sep 09 '24 14:09 bynect

Hello, I successfully reproduced this problem and it turns out it was just a linked list being reversed.

bynect avatar Nov 04 '24 12:11 bynect

@bynect Hi, thank you for looking into it, will test the patch later today both for vertical and horisontal dmenu context.

biopsin avatar Nov 04 '24 14:11 biopsin