dunst icon indicating copy to clipboard operation
dunst copied to clipboard

Add instructions to reload the .dunstrc file without restarting.

Open bobkron opened this issue 2 years ago • 5 comments

Since dunst does not have a reload feature, added instructions in the docs to reload .dunstrc after making changes, without needing to restart the window manager every time a change is made during configuration.

bobkron avatar Feb 10 '24 11:02 bobkron

I would say that killall dunst suffices, since the notification daemon is started automatically whenever a notification is sent

bynect avatar Feb 19 '24 23:02 bynect

Actually yes, that would suffice...will make the changes right away.

bobkron avatar Feb 20 '24 11:02 bobkron

Wouldn't it be enough to just describe what to do? There may be systems where killall is not available. And as there are a lot of different programs around for such a task (kill, killall, pkill, ...) it could be benefical to just explain in general what to do.

Narrat avatar Feb 20 '24 21:02 Narrat

Wouldn't it be enough to just describe what to do? There may be systems where killall is not available. And as there are a lot of different programs around for such a task (kill, killall, pkill, ...) it could be benefical to just explain in general what to do.

you have a point. maybe just saying if you kill dunst (eg killall dunst) it will be started automatically when a notification is sent is enough?

bynect avatar Feb 29 '24 09:02 bynect

Just my 2 cents here ...

since the notification daemon is started automatically whenever a notification is sent

This is correct, but dunst might not be the only notification daemon installed and without (re)starting it explicitly there's no guarantee that dunst is started on the next notification sent (it could be another daemon).

To add some other approach (the one I'm using), which relies on systemd user services and path triggers:

~/.config/systemd/user/dunst-watcher.path

[Path]
PathModified=%h/.config/dunst/
PathModified=%h/.config/dunst/dunstrc.d/

[Install]
WantedBy=graphical-session.target

~/.config/systemd/user/dunst-watcher.service

[Unit]
Description=Restarts dunst whenever the configuration is changed.

[Service]
ExecStart=/usr/bin/systemctl --user restart dunst.service
Type=oneshot
RemainAfterExit=false

[Install]
WantedBy=graphical-session.target

This restarts dunst whenever any configuration file is saved.

zappolowski avatar Mar 01 '24 10:03 zappolowski

This is now unneeded since you can reload dunst with dunstctl reload

bynect avatar Aug 26 '24 13:08 bynect