feat(desktop): add clipboard history (task 0027)
Add a clipboard module to the desktop group, enabled through the aggregator. Home-manager's services.cliphist runs the text and image watchers as systemd user services bound to the graphical-session target, and a rofi-dmenu picker recalls history on Super+Shift+V.
This commit is contained in:
@@ -12,7 +12,18 @@ Bind the picker on `Super+Shift+V`.
|
||||
|
||||
## Acceptance criteria
|
||||
|
||||
- [ ] A cliphist module (with wl-clipboard) exists in the desktop group and is enabled by the aggregator.
|
||||
- [ ] Text and image copies are recorded to history.
|
||||
- [ ] The history is picked through rofi and bound on `Super+Shift+V`.
|
||||
- [ ] neogaia builds green under `nix flake check`.
|
||||
- [x] A cliphist module (with wl-clipboard) exists in the desktop group and is enabled by the aggregator.
|
||||
- [x] Text and image copies are recorded to history.
|
||||
- [x] The history is picked through rofi and bound on `Super+Shift+V`.
|
||||
- [x] neogaia builds green under `nix flake check`.
|
||||
|
||||
## Implementation Notes
|
||||
|
||||
- The two clipboard watchers are not hand-written: home-manager's `services.cliphist` module runs them as a pair of systemd user services, one for text and one for `--type image`, and installs both `cliphist` and `wl-clipboard`.
|
||||
`allowImages` defaults true, so enabling the service alone records both kinds.
|
||||
- The services bind to `graphical-session.target`, which uwsm starts, matching how mako and hypridle attach to the session on this host.
|
||||
No `systemdTargets` override is needed, since the module's default already resolves to that target.
|
||||
- The picker is a small shell script over the same themed rofi the launcher uses (`cliphist list | rofi -dmenu | cliphist decode | wl-copy`), so history looks like every other menu.
|
||||
Its keybind lives in this module rather than in `hyprland.nix`, contributed through `settings.bind`, keeping the command next to its binding and referenced by store path.
|
||||
- No Waybar `window-rewrite` icon mapping was added: the watchers are headless daemons and the picker is a rofi layer surface, so nothing new ever appears as a tiled window on the workspace indicator the convention governs.
|
||||
- Image entries render as a `[[ binary data … ]]` placeholder line in the rofi list rather than a thumbnail, but selecting one still decodes and re-copies the real image, so both kinds are retrievable.
|
||||
|
||||
Reference in New Issue
Block a user