diff options
-rw-r--r-- | README.rst | 14 | ||||
-rw-r--r-- | com.ted.mpd_trigger.plist | 16 |
2 files changed, 28 insertions, 2 deletions
@@ -55,6 +55,16 @@ the following command: .. image:: https://raw.githubusercontent.com/Determinant/mpd_trigger/master/screenshot.png +If you have idea about how to run this program as a user daemon, try to copy +the accompanied file ``com.ted.mpd_trigger.plist`` (you may modify the file to +have correct parameters for mpd_trigger) to +``path_to_your_home/Library/LaunchAgents`` and then execute the following commands: + +:: + + cd path_to_your_home/Library/LaunchAgents + launchd load com.ted.mpd_trigger.plist + Finally, it is worth mentioning that patterns can be nested, for example a part of the pattern in last example ``{track?{track}:unkown track}`` makes use of such technique. Have fun! :) @@ -64,7 +74,7 @@ such technique. Have fun! :) Dependencies ------------ -- The canonical mpd library: libmpdclient (on which famous mpd clients such as - mpc and ncmpcppp also depends) +- The canonical mpd library: ``libmpdclient`` (on which famous mpd clients such as + mpc and ncmpcppp also depend) - Some basic POSIX syscalls (ubiquitous on current unix-like systems) - Nothing else. diff --git a/com.ted.mpd_trigger.plist b/com.ted.mpd_trigger.plist new file mode 100644 index 0000000..36b209e --- /dev/null +++ b/com.ted.mpd_trigger.plist @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>Label</key> + <string>com.ted.mpd_trigger</string> + <key>ProgramArguments</key> + <array> + <string>/Users/ymf/Downloads/mpd_trigger/mpd_trigger</string> + <string>-e</string> + <string>/usr/local/bin/terminal-notifier -title "{title}: {state} ({elapsed_pct}%)" -subtitle "{artist}" -message "{album} @ {track?{track}:unknown track}" -sender com.apple.iTunes</string> + </array> + <key>RunAtLoad</key> + <true/> +</dict> +</plist> |