summary refs log tree commit diff
path: root/.config/rc/init.d/mako
blob: 40e8ec3ae759ef4ea8195f92c2ce39f971d6baf3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/sbin/openrc-run
DBUS_SESSION_BUS_ADDRESS="unix:path=${XDG_RUNTIME_DIR}/bus"

description="Lightweight Wayland notification daemon"

command="/usr/bin/mako"
supervisor=supervise-daemon
error_logger="logger -t '${RC_SVCNAME}' -p daemon.error"

depend() {
	need dbus
	provide notification-daemon
}

start_pre() {
	if [ -z "$WAYLAND_DISPLAY" ]; then
		eerror "\$WAYLAND_DISPLAY unset, can't proceed."
		return 1
	fi
}

extra_started_commands="reload"
description_reload="Reload mako configuration using makoctl"
reload() {
	makoctl reload
	eend $? "Reloaded mako configuration"
}