An ActivityWatch watcher for MPD.

Kristian Vos 2c94c83dec Updated README and allow more arguments to fix build issues il y a 1 an
aw_watcher_mpd 2c94c83dec Updated README and allow more arguments to fix build issues il y a 1 an
.gitignore f3560cc7cb Initial commit il y a 2 ans
Makefile f3560cc7cb Initial commit il y a 2 ans
README.md 2c94c83dec Updated README and allow more arguments to fix build issues il y a 1 an
aw-watcher-mpd.spec f3560cc7cb Initial commit il y a 2 ans
requirements.txt f3560cc7cb Initial commit il y a 2 ans

README.md

aw-watcher-mpd

An ActivityWatch watcher for MPD.

Based of off aw-watcher-spotify

Development

  1. Install pip packages from the requirements.txt.
    pip install -r requirements.txt
  2. Start ActivityWatch in testing mode.
    aw-qt --testing
  3. cd aw_watcher_mpd
  4. python main.py --testing

Building

Make sure you have pyinstaller installed before you start.
pip install -U pyinstaller

  1. make clean
  2. make package

dist/aw-watcher-mpd is your outputted folder

Installing (Linux)

To install aw-watcher-mpd, first build it, then follow the below steps to install and automatically start the watcher when ActivityWatch starts.

  1. cp -R dist/aw-watcher-mpd /opt
  2. Create /usr/bin/aw-watcher-mpd
    Contents:
#!/bin/bash

/opt/aw-watcher-mpd/aw-watcher-mpd "$@"
  1. chmod +x /usr/bin/aw-watcher-mpd
  2. Edit ~/.config/activitywatch/aw-qt/aw-qt.toml
    Uncomment the first two lines and add aw-watcher-mpd to autostart.
    Example:
[aw-qt]
autostart_modules = ["aw-server", "aw-watcher-afk", "aw-watcher-window", "aw-watcher-mpd"]

Configuring

To configure settings for aw-watcher mpd such as the MPD connection details and ActivityWatch poll time, first run the application once, and then edit ~/.config/activitywatch/aw-watcher-mpd/aw-watcher-mpd.toml.