Closed shmibs closed 3 months ago
How are these paths provided to dunst? Via configuration file or as command line argument? Could you please provide an example usage?
Using e.g. in the configuration:
[urgency_low]
default_icon = /tmp/' test '/it\'s_complicated
(and putting an icon there) I can get it to work. The same string also works when used on the command line:
dunstify --icon /tmp/' test '/it\'s_complicated Testing
(that filepath seems to contain only one '
character rather than an even number, so as described it ought to work?
and apologies, un. the same issue is present either through config or cli, e.g.
[urgency_low]
default_icon = "/tmp/test'/test'/cover-small.png"
dunstify --icon="/tmp/test'/test'/cover-small.png" test
the '
are silently stripped away, so if a filepath without them exists, /test/test/
, it will end up using that instead
edit: it seems really the issue here is using wordexp
at all, evaluating the same path twice to cause unexpected behaviour like this and potentially others as well
Can you give #1314 a try?
I've tested with
[urgency_low]
default_icon = $HOME/tmp/test\'/test\'/urgency_low.svg
[dunstify]
appname = dunstify
new_icon = "$HOME/tmp/test\'/test\'/dunstify.svg"
and then
$ dunstify Testing
$ notify-send --urgency low Testing
$ notify-send --icon "$HOME/tmp/test'/test'/path.svg" Testing
and it always showed the matching icon.
that seems working, yes ^^
Issue description
the commit adding
wordexp
instring_to_path
, https://github.com/dunst-project/dunst/commit/e9a27c057865cae91ea0c7a45602d1ff0a2b9155 , seems to have introduced an error parsing file paths with an even number of'
s. i've noticed because of an mpd status script which displays with icons contained in the music directory, hence lots of odd file names and directoriesit seems an odd number of
'
errors out withWRDE_SYNTAX
and returns the string without expansion... which in my case is a success, as the file path is unmodified. when an even number of'
is present though, they're stripped away, returning an invalid file path without themif there's some effective way to escape these with
\
i also haven't figured it outInstallation info