Skip to content

Latest commit

 

History

History
38 lines (22 loc) · 2.17 KB

README.md

File metadata and controls

38 lines (22 loc) · 2.17 KB

GopherXLR

Caution

GopherXLR is still under development and a bit experimental. It should work and since it doesn't control the GoXLR itself should be entirely harmless to it.

A Go library and daemon to interact with the GoXLR-Utility application, for the TC-Helicon GoXLR or GoXLR Mini, through its HTTP API.

You can use tiny scripts written in Expr to automatically perform actions when the mixer state changes. Each script is passed the previous and current state and can decide if it wants to do something.

Example

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 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
PlayPause1 player name PlayPause("spotify") Toggle music play/pause
RunCommand2 command RunCommand("notify-send", "title", "body") Execute arbitrary command

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.

If you also systemctl --user enable it, it'll start automatically when you login.

The unit file has an After= on app-goxlr\[email protected], which is automatically created by the systemd-xdg-autostart-generator user generator. This should ensure it's not started too early, and not started at all if goxlr-daemon isn't set to autostart.

The unit file expects to find the binary in $HOME/.local/bin and the scripts in $HOME/.config/gopherxlr. You can adjust the paths in the unit file.

Footnotes

  1. PlayPause uses the D-Bus user session and as such only works on Linux

  2. RunCommand is constrained to run up to 1s, after which the context will be cancelled. This ensures we don't have hanging commands.