Files

85 lines
5.0 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Quickpanel
An overlay for [Dux Shell (DMS)](https://duxlabs.dev/docs/dms/plugin-development), requiring DMS 2.0 or newer.
Previously named Game Bar / ControlCenter. The plugin directory and ID are now `quickpanel`,
and IPC commands use `dms ipc call quickpanel …` (distinct from the shell's
built-in `control-center` target). On first enable, existing ControlCenter or Game Bar settings,
tokens, and widget layouts are copied automatically without overwriting existing
Quickpanel settings; the old settings entries are retained as backups. Update any bar widget
references from `gameBar` or `controlCenter` to `quickpanel` and any keybinds to the new IPC target.
The Git remote retains its existing repository URL until renamed on the server.
## Widgets
| Widget | Contents |
|---|---|
| **Audio** | Master output volume + mute, output device switching, microphone volume + mute, input device switching |
| **Apps** | Per-application volume sliders with individual mute, app icon and what is playing |
| **Media** | Now playing with album art, seek bar, previous/play/next, and a chip per MPRIS source to switch between players |
| **Capture** | Record the focused monitor, arm a replay buffer and save the last N seconds, or hand a screenshot to the quickCapture plugin (needs `gpu-screen-recorder`) |
| **Visualiser** | Bars driven by whatever is actually playing out of this machine (needs `cava`) |
| **Bluetooth** | Paired devices with battery, connect/disconnect, adapter and scan toggles |
| **Notes** | The shell's notepad scratch tab, editable in place; file-backed tabs are shown read-only |
| **Timer** | Countdown with presets and an optional label, plus a stopwatch tab with laps; ends with a sound and a notification even when the overlay is closed |
| **Performance** | CPU (usage, temperature), memory (used / total), network (rx/tx), disk (root usage, read/write) |
| **Home** | Home Assistant entities you pick: lights (toggle + brightness), numbers (slider over the entity's own min/max/step), switches/fans, media players (volume, mute, play/pause), covers, scenes and scripts, plus read-only sensors |
## Home Assistant
Settings → Plugins → Quickpanel:
1. **Home Assistant URL**, e.g. `http://homeassistant.local:8123`
2. **Long-lived access token** — HA profile page → *Security* → *Create token*.
It is stored in `plugin_settings.json`, which is world-readable by default
(`chmod 600` it if that matters to you).
3. **Refresh**, then tick the entities you want in the Home widget.
State is polled (default every 5 s) only while the Home widget is open. The token is handed to
`curl` through the process environment, so it never shows up in the process list.
If a refresh fails, `dms ipc call quickpanel homeStatus` shows what the plugin actually sent and got
back. A `401` means Home Assistant rejected the token; compare with
```bash
curl -H "Authorization: Bearer <token>" https://your-ha/api/
```
Note that editing `plugin_settings.json` by hand does not reach a running shell.
### IPC commands
| Command | Effect |
|---|---|
| `dms ipc call quickpanel toggle` | Toggle the overlay |
| `dms ipc call quickpanel open` | Open the overlay |
| `dms ipc call quickpanel close` | Close the overlay |
| `dms ipc call quickpanel widget audio\|apps\|media\|home\|system` | Show/hide one widget |
| `dms ipc call quickpanel homeToggle <entity_id>` | Toggle an entity (activates a scene/script/button) |
| `dms ipc call quickpanel homeRefresh` | Re-poll Home Assistant now |
| `dms ipc call quickpanel homeStatus` | Print URL, token length, HTTP status, entity/picked counts and last error |
| `dms ipc call quickpanel record` | Start/stop recording the focused monitor |
| `dms ipc call quickpanel replay` | Arm/disarm the replay buffer |
| `dms ipc call quickpanel saveReplay` | Write the last N seconds to disk |
| `dms ipc call quickpanel captureStatus` | Print recorder mode, monitor, elapsed time and last file |
| `dms ipc call quickpanel brightnessStatus` | Print the display→DDC map, pins and resolved brightness per screen |
| `dms ipc call quickpanel layoutStatus` | Print each screen's layout key and where every widget resolves |
| `dms ipc call quickpanel timer <seconds> [label]` | Start a countdown |
| `dms ipc call quickpanel timerStop` | Stop and reset the countdown |
| `dms ipc call quickpanel timerStatus` | Print countdown and stopwatch state |
| `dms ipc call quickpanel resetLayout` | Forget all saved widget positions |
## Settings
Settings → Plugins → Quickpanel (gear icon):
- **Background dimming** — how dark the desktop behind the overlay gets (0–95%).
- **Capture** — folder, frame rate, quality, replay buffer length and the recorded audio source
(a `gpu-screen-recorder` device name, e.g. `default_output`; `gpu-screen-recorder --list-audio-devices`).
- **Timer** — sound on/off, notification on/off and which sound file to play.
- **Home Assistant** — URL, access token, refresh interval, and the entity picker.
- **Reset widget positions** — back to the default arrangement on every monitor.
## License
MIT