diff options
author | Christian Hesse <mail@eworm.de> | 2015-10-12 15:15:24 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2015-10-12 15:15:24 +0200 |
commit | 0a5677f9a10b31fa1a39861704c0fff4b6a15d66 (patch) | |
tree | 564523e153a6c5a8e9ff72a4810d51fef2f7c54a | |
parent | 5d91516de1d302fd8d589896b0635e828a201a06 (diff) | |
download | mpd-notification-0a5677f9a10b31fa1a39861704c0fff4b6a15d66.tar.gz mpd-notification-0a5677f9a10b31fa1a39861704c0fff4b6a15d66.tar.zst |
use systemd user unit to (auto-)start
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | README.md | 8 | ||||
-rw-r--r-- | mpd-notification.desktop | 8 | ||||
-rw-r--r-- | systemd/mpd-notification.service | 9 |
4 files changed, 14 insertions, 13 deletions
@@ -36,7 +36,7 @@ install: install-bin install-doc install-bin: mpd-notification $(INSTALL) -D -m0755 mpd-notification $(DESTDIR)/usr/bin/mpd-notification - $(INSTALL) -D -m0644 mpd-notification.desktop $(DESTDIR)/etc/xdg/autostart/mpd-notification.desktop + $(INSTALL) -D -m0644 systemd/mpd-notification.service $(DESTDIR)/usr/lib/systemd/user/mpd-notification.service install-doc: README.html $(INSTALL) -D -m0644 README.md $(DESTDIR)/usr/share/doc/mpd-notification/README.md @@ -45,14 +45,14 @@ followed by: This will place an executable at `/usr/bin/mpd-notification`, documentation can be found in `/usr/share/doc/mpd-notification/`. -Additionally a desktop file is installed to `/etc/xdg/autostart/`, this -automatically starts the program when logged in to a desktop environment. +Additionally a systemd unit file is installed to `/usr/lib/systemd/user/`. Usage ----- -Just run `mpd-notification` after installation or re-login to desktop -environment for autostart. +Just run `mpd-notification` to run it once. A systemd user service can be +started and/or enabled with `systemctl --user start mpd-notification` +or `systemctl --user enable mpd-notification`. `mpd-notification` accepts some arguments: diff --git a/mpd-notification.desktop b/mpd-notification.desktop deleted file mode 100644 index 1dec877..0000000 --- a/mpd-notification.desktop +++ /dev/null @@ -1,8 +0,0 @@ -[Desktop Entry] -Name=MPD Notification -Icon=sound -Exec=/usr/bin/mpd-notification -Terminal=false -Type=Application -StartupNotify=false -Categories=Utility diff --git a/systemd/mpd-notification.service b/systemd/mpd-notification.service new file mode 100644 index 0000000..e0dae1b --- /dev/null +++ b/systemd/mpd-notification.service @@ -0,0 +1,9 @@ +[Unit] +Description=MPD Notification + +[Service] +Type=simple +ExecStart=/usr/bin/mpd-notification + +[Install] +WantedBy=default.target |