|
| 1 | +# Streamdeckd |
| 2 | + |
| 3 | +### Installation |
| 4 | + |
| 5 | +As this uses the [Elgato Stream Deck Library](https://www.npmjs.com/package/elgato-stream-deck), you will need to follow |
| 6 | +the installation process for that, which includes taking steps to allow node to access the streamdeck via udev. these steps include: |
| 7 | + |
| 8 | +- create the file `/etc/udev/rules.d/50-elgato.rules` with the following config |
| 9 | +``` |
| 10 | +SUBSYSTEM=="input", GROUP="input", MODE="0666" |
| 11 | +SUBSYSTEM=="usb", ATTRS{idVendor}=="0fd9", ATTRS{idProduct}=="0060", MODE:="666", GROUP="plugdev" |
| 12 | +SUBSYSTEM=="usb", ATTRS{idVendor}=="0fd9", ATTRS{idProduct}=="0063", MODE:="666", GROUP="plugdev" |
| 13 | +SUBSYSTEM=="usb", ATTRS{idVendor}=="0fd9", ATTRS{idProduct}=="006c", MODE:="666", GROUP="plugdev" |
| 14 | +SUBSYSTEM=="usb", ATTRS{idVendor}=="0fd9", ATTRS{idProduct}=="006d", MODE:="666", GROUP="plugdev" |
| 15 | +``` |
| 16 | + |
| 17 | +- run `sudo udevadm control --reload-rules` to reload the udev rules |
| 18 | + |
| 19 | +Then xdotool will be required to simulate keypresses, to install this run: |
| 20 | + |
| 21 | +#### Arch |
| 22 | + |
| 23 | +`sudo pacman -S xdotool` |
| 24 | + |
| 25 | +#### Debian based |
| 26 | + |
| 27 | +`sudo apt install xdotool` |
| 28 | + |
| 29 | + |
| 30 | +### Configuration |
| 31 | + |
| 32 | +#### Manual configuration |
| 33 | + |
| 34 | +The configuration file streamdeckd uses is a JSON file found at `~/.streamdeck-config.json` |
| 35 | + |
| 36 | +An example config would be something like: |
| 37 | + |
| 38 | +```json |
| 39 | +{ |
| 40 | + "pages": [ |
| 41 | + [ |
| 42 | + { |
| 43 | + "switch_page": 1, |
| 44 | + "icon": "~/icon.png" |
| 45 | + } |
| 46 | + ] |
| 47 | + ] |
| 48 | +} |
| 49 | +``` |
| 50 | + |
| 51 | +The outer array is the list of pages, the inner array is the list of button on that page, with the buttons going in a right to left order. |
| 52 | + |
| 53 | +The actions you can have on a button are: |
| 54 | + |
| 55 | +- `command`: runs a native shell command, something like `notify-send "Hello World"` |
| 56 | +- `keybind`: simulates the indicated keybind via xdtotool |
| 57 | +- `url`: opens a url in your default browser via xdg |
| 58 | +- `brightness`: set the brightness of the streamdeck as a percentage |
| 59 | +- `switch_page`: change the active page on the streamdeck |
0 commit comments