Repository navigation
Conversation
#1) * feat: add iconCommand to the button widget Adds `iconCommand` to the button widget: a command run on the widget's interval (default 1 s) whose output names the icon to show. Co-authored-by: Ensemblr <howdy@ensemblr.dev> * feat: repeat an action while its key is held Adds `repeat` to an action: once the key is held past the 350 ms long press, the action fires every `repeat` ms until release, in place of `action_hold`. Co-authored-by: Ensemblr <howdy@ensemblr.dev> * feat: add a toggle widget Adds a `toggle` widget that shows one of its `widgets` and switches to the next on a tap. Co-authored-by: Ensemblr <howdy@ensemblr.dev> * feat: add gpu and vram modes to the top widget Adds `gpu` and `vram` modes to the `top` widget, read from the amdgpu card with the most VRAM. Co-authored-by: Ensemblr <howdy@ensemblr.dev> * feat: draw several top widget modes as columns Lets the `top` widget take several modes split on `;`, drawn as columns side by side. Co-authored-by: Ensemblr <howdy@ensemblr.dev> * feat: add a temp widget Adds a `temp` widget that draws one hwmon temperature sensor in the same bar as the `top` widget, filled towards the sensor's critical temperature. Co-authored-by: Ensemblr <howdy@ensemblr.dev> * docs: document iconCommand, repeat, toggle, temp and top modes Co-authored-by: Ensemblr <howdy@ensemblr.dev> * fix: register the PNG decoder on every platform Icons decoded only because the X11 libraries imported image/png on Linux. Without them, as on macOS, every PNG icon failed with "image: unknown format". Co-authored-by: Ensemblr <howdy@ensemblr.dev> * feat: keep running without a D-Bus session bus A missing session bus used to stop deckmaster at startup. It now logs the error once and keeps going, and a dbus action logs why it can't run. Co-authored-by: Ensemblr <howdy@ensemblr.dev> * refactor: move keyboard and D-Bus setup behind platform files platform_linux.go now creates the uinput keyboard, connects to D-Bus and names the paste shortcut, behind a small virtualKeyboard interface that takes evdev key codes. The window event types move to window.go, since they are not X11-specific. A key the keyboard refuses is now logged instead of dropped silently. Co-authored-by: Ensemblr <howdy@ensemblr.dev> * feat: look for fonts in a directory set at build time `-ldflags "-X main.fontDir=..."` points deckmaster at a font directory it searches before the system's, so a packaged binary can carry its Roboto path instead of relying on XDG_DATA_DIRS, which go-findfont ignores on macOS. Co-authored-by: Ensemblr <howdy@ensemblr.dev> * fix: find Stream Decks on Apple Silicon karalabe/hid bundles a 2019 hidapi that names macOS devices by their IOService path. On Apple Silicon IORegistryEntryGetPath fails on those long paths, so every deck enumerates with an empty path and muesli/streamdeck skips it. Carry muesli/streamdeck v0.4.0 in third_party/streamdeck and pick its HID library per platform: macOS gets bearsh/hid v1.4.1, which keeps karalabe/hid's API on hidapi 0.11 (devices named by registry entry ID), and every other platform keeps karalabe/hid as before. Co-authored-by: Ensemblr <howdy@ensemblr.dev> * feat: run on macOS - Key emulation posts CoreGraphics events. Decks keep their Linux key names and evdev numbers, translated to macOS virtual key codes, with Leftmeta/Rightmeta as Command. Media keys are posted as NX_SYSDEFINED system events, and a code with no Mac key (248, KEY_MICMUTE) is logged and skipped. - `paste` presses cmd-v. - Posting events needs Accessibility permission; startup checks for it and logs where to grant it, and every dropped key is logged. - Window tracking is a stub, so the recentWindow widget stays empty. - dbus actions log that macOS has no session bus. Co-authored-by: Ensemblr <howdy@ensemblr.dev> * feat: draw gpu and vram bars empty without an amdgpu card On a machine without an amdgpu card, a Mac among them, the gpu and vram columns of the top widget now draw an empty bar with a dash and log the missing card once, instead of leaving the whole key undrawn and logging on every update. Co-authored-by: Ensemblr <howdy@ensemblr.dev> * test: add a deck that exercises every widget and action Co-authored-by: Ensemblr <howdy@ensemblr.dev> * feat: package deckmaster as a Nix flake - packages.<system>.deckmaster and .default for x86_64-linux, aarch64-linux and aarch64-darwin, built with buildGoModule from this source, starting from nixpkgs' expression. The binary carries Roboto's store path through main.fontDir rather than a wrapper, so bin/deckmaster stays the Mach-O binary macOS grants Accessibility to. - overlays.default provides pkgs.deckmaster. - devShells.default with Go, gopls, golangci-lint and alejandra, whose GOFLAGS let `go run` and `go test` find Roboto too. - formatter is alejandra, and checks build the package on each system. Co-authored-by: Ensemblr <howdy@ensemblr.dev> * chore: migrate .golangci.yml to golangci-lint v2 The dev shell ships golangci-lint 2, which refuses the v1 format. Generated with `golangci-lint migrate`. Co-authored-by: Ensemblr <howdy@ensemblr.dev> * docs: document macOS support and the Nix flake Co-authored-by: Ensemblr <howdy@ensemblr.dev> * chore: add Ensemblr setup and run scripts Co-authored-by: Ensemblr <howdy@ensemblr.dev> --------- Co-authored-by: Ensemblr <howdy@ensemblr.dev>
* fix: survive transient Stream Deck write failures on macOS macOS rejects the odd HID transfer to a Stream Deck MK.2 with kIOReturnError (0xE00002BC): about once a minute with BigMac's deck, with or without other transfers in flight, and the next attempt goes through. deckmaster treated every failed write as fatal, so it drew the deck for a minute and exited. hidapi 0.11 hid the code behind "hid_error is not implemented yet". - Bump bearsh/hid to v1.6.0 (hidapi 0.14), whose macOS errors name the IOReturn code. - Send every write, feature report, reset, reopen and close in third_party/streamdeck under one lock, so an image's pages go out back to back. Overlapping transfers made macOS reject them far more often. - Retry a failed transfer, an image from page 0, then reopen the device and retry again. A device that cannot be reopened stays closed and returns ErrDisconnected. - deckmaster logs a key that still fails and draws it again on the next update. It exits on ErrDisconnected and when the key reader stops, so launchd and systemd restart it; the old reader path reopened in a busy loop and panicked on a nil handle once the deck was unplugged. - Run long presses and repeats on the event loop instead of their own goroutines. - Fix data races on the sleep state, Clear drawing one key past the end, and the device list printing the first deck's key count. Co-authored-by: Ensemblr <howdy@ensemblr.dev> * test: add deckstress, a Stream Deck stress tool It drives a deck with concurrent image writes, brightness changes, fades and firmware queries through the public API only, so it builds against any version of the streamdeck package. Switches narrow the load down to one writer, images only, smaller images or a pause between images. Co-authored-by: Ensemblr <howdy@ensemblr.dev> --------- Co-authored-by: Ensemblr <howdy@ensemblr.dev>
Co-authored-by: Ensemblr <howdy@ensemblr.dev>
Author
|
Opened here by mistake, meant for my fork. Sorry for the noise. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
uinput v1.6.1 hands the UI_DEV_SETUP ioctl a pointer to the
bytes.Bufferheader instead of its bytes. The kernel readsff_effects_maxfrom heap garbage and UI_DEV_CREATE fails with EINVAL (cannot allocate more than FF_MAX_EFFECTS effects), so deckmaster can't create its virtual keyboard and the media and volume keys do nothing.v1.6.2 is the one upstream commit that goes back to writing
buf.Bytes(). The CreateKeyboard API is unchanged.vendorHashinpackage.nixis updated, andnix buildproduces a binary that reports uinput v1.6.2.