Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add instructions to reload the .dunstrc file without restarting. #1278

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

bobkron
Copy link

@bobkron bobkron commented Feb 10, 2024

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.

Added instructions to reload .dunstrc file without restarting.
@bynect
Copy link
Member

bynect commented Feb 19, 2024

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

@bobkron
Copy link
Author

bobkron commented Feb 20, 2024

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

Correct code to reload dunstrc.
@Narrat
Copy link

Narrat commented Feb 20, 2024

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.

@bynect
Copy link
Member

bynect commented Feb 29, 2024

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?

@zappolowski
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants