Skip to content

Commit

Permalink
Update README with available functions
Browse files Browse the repository at this point in the history
  • Loading branch information
daenney committed Mar 13, 2024
1 parent 62e62d3 commit 69232fc
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,17 @@ You can use tiny scripts written in [Expr][expr] to automatically perform action

The reason I wrote this tool is to be able to toggle playback in Spotify when I mute/unmute a certain channel on a mixer. The scripts in [examples](./examples) show how to use it. Make sure to replace the `MIXER_ID` and set the right value for `fader`.

## Functions

These are the functions you can call from your scripts:

| Function | Arguments | Example | Purpose |
| :--------- | :---------- | :--------------------- | :-------- |
| PlayPause[^1] | player name | `PlayPause("spotify")` | Toggle music play/pause |
| RunCommand | command | `RunCommand("notify-send", "title", "body")` | Execute arbitrary command |

[^1]: `PlayPause` uses the D-Bus user session and as such only works on Linux

## Running

A systemd unit file is included. You can install this in `$HOME/.config/systemd/user` or `/lib/systemd/user`. After a `daemon-reload` you can start it with `systemctl --user start gopherxlr.service`.
Expand Down

0 comments on commit 69232fc

Please sign in to comment.