adding init program
This commit is contained in:
82
README.md
82
README.md
@@ -22,6 +22,7 @@ No Elgato software required — communicates directly with the device over USB H
|
||||
- No Stream Deck app, no Node.js, no Electron
|
||||
|
||||
- **Modules** — define reusable, parameterised commands in `modules.yaml` with Go templates; secrets stay in env vars, config stays in dotfiles. First built-in example: Slack (status, presence, snooze). See [Modules](#modules).
|
||||
- **Interactive config builder** — TUI tool (`streamdeck-init`) that walks you through key setup: pick a slot, pick a module/function, customize params, choose an icon. No YAML editing required. See [Config builder](#config-builder).
|
||||
|
||||
**Planned:** text/label overlays on keys, multi-page layouts, AUR package — see [Roadmap](#roadmap)
|
||||
|
||||
@@ -797,6 +798,87 @@ Two helpers are available in `exec` templates:
|
||||
|
||||
---
|
||||
|
||||
### Config builder
|
||||
|
||||
Instead of editing YAML by hand, use the interactive TUI to configure keys:
|
||||
|
||||
```bash
|
||||
make build-init
|
||||
./streamdeck-init
|
||||
```
|
||||
|
||||
Or with a custom config path:
|
||||
|
||||
```bash
|
||||
./streamdeck-init -config ~/dotfiles/.config/streamdeck-go/config.yaml
|
||||
```
|
||||
|
||||
The tool shows your 8x4 key grid, walks you through each step, and appends the result to your config.yaml:
|
||||
|
||||
```
|
||||
Stream Deck XL — 8×4 grid
|
||||
|
||||
╭─────────╮╭─────────╮╭─────────╮╭─────────╮╭─────────╮╭─────────╮╭─────────╮╭─────────╮
|
||||
│Rootshell││ lights ││set_stat ││ WHH ││Dumpster ││ [5] ││ [6] ││ [7] │
|
||||
╰─────────╯╰─────────╯╰─────────╯╰─────────╯╰─────────╯╰─────────╯╰─────────╯╰─────────╯
|
||||
...
|
||||
|
||||
[n] = free dim = occupied
|
||||
|
||||
? Pick a key slot
|
||||
> 5 (free)
|
||||
6 (free)
|
||||
7 (free)
|
||||
...
|
||||
|
||||
? What should this key do?
|
||||
> Module function (Slack, etc.)
|
||||
Shell command
|
||||
|
||||
? Pick a module
|
||||
> slack
|
||||
|
||||
? Pick a function from slack
|
||||
> set_status
|
||||
clear_status
|
||||
set_presence
|
||||
go_offline
|
||||
snooze
|
||||
end_snooze
|
||||
|
||||
? emoji
|
||||
> :coffee:
|
||||
|
||||
? text
|
||||
> Coffee break
|
||||
|
||||
? expiry
|
||||
> 30m
|
||||
|
||||
? Pick an icon from ~/.config/streamdeck-go/icons
|
||||
> coffee.png
|
||||
|
||||
Summary:
|
||||
Key: 5
|
||||
Icon: coffee.png
|
||||
Module: slack
|
||||
Function: set_status
|
||||
Params:
|
||||
emoji: :coffee:
|
||||
text: Coffee break
|
||||
expiry: 30m
|
||||
|
||||
? Write this key to config? Yes
|
||||
✓ Key 5 added to config.
|
||||
|
||||
? Add another key? No
|
||||
✓ Done — the daemon will auto-reload your config.
|
||||
```
|
||||
|
||||
On a fresh install with no config files, the tool creates `config.yaml` and `modules.yaml` automatically.
|
||||
|
||||
---
|
||||
|
||||
### Supported icon formats
|
||||
|
||||
| Format | Notes |
|
||||
|
||||
Reference in New Issue
Block a user