Compare commits

..

1 Commits

Author SHA1 Message Date
cf44c4df27 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.
2026-07-22 19:23:20 -04:00
2 changed files with 1 additions and 10 deletions

View File

@@ -19,11 +19,8 @@ Bind the picker on `Super+Shift+V`.
## Implementation Notes
- The module is named `clipboard`, not `cliphist`: cliphist is the tool it is built on, but the option a host enables names the capability.
- 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`.
- 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.
- That module installs only `cliphist` on PATH and reaches `wl-clipboard` by store path, so `wl-copy`/`wl-paste` are added to `home.packages` here.
The spec asks for the module "with wl-clipboard", and a keyboard-driven session wants the two commands for piping to and from the clipboard.
- 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.

View File

@@ -29,12 +29,6 @@ in
config = lib.mkIf cfg.enable {
home-manager.users.${user} = {
# wl-copy and wl-paste on PATH, so the shell can pipe into and out of the
# clipboard.
# The watchers and picker above reach wl-clipboard by store path, so this
# is for interactive use alone.
home.packages = [ pkgs.wl-clipboard ];
# Two watchers record text and images to history, bound to the graphical
# session so uwsm starts and stops them with it.
services.cliphist.enable = true;