Skip to content

Live updating with systemd services

Juan Giordana edited this page Oct 4, 2026 · 2 revisions

If you just installed mako and are changing config file rapidly and manually running makoctl reload and some test notify-send command here is an example of how to automate that process.

Create ~/.config/mako/reload.sh script, that will also send you test notification:

#!/usr/bin/env sh

makoctl reload

# notify-send [OPTION…] <SUMMARY> [BODY]
notify-send \
  --app-name="Test notif app" \
  --icon=firefox -t 5000 \
  "Here is some summary"
  "Needed to <s>create</s> a script because `makoctl reload` wasn't working"
# to test a 'high' urgency notification add '--urgency=critical'

Create watcher service and don't forget to alter the path to the script in ExecStart param:

# ~/.config/systemd/user/mako-watcher.service
[Unit]
Description=mako notifications tester

[Service]
Type=oneshot
ExecStart=/path/to/.config/mako/reload.sh

[Install]
WantedBy=graphical-session.target

Create a .path service, that you will also need to start. Watcher won't work without it. Also edit /PathModified/ param to match your full path to mako directory.

# ~/.config/systemd/user/mako-watcher.path
[Path]
PathModified=%h/.config/mako/config

[Install]
WantedBy=graphical-session.target

Start those 2 user services:

systemctl --user start mako-watcher.service mako-watcher.path

Now whenever you edit any file in ~/.config/mako mako will reload its config and send you a test notification.

Clone this wiki locally

⌂ 换网址