Replaces the AUR greenclip (declared absent) with the official clipmenu, started once from the session's xinitrc slot, its menu the launcher's dmenu command bound as an i3 drop-in, its history in the runtime directory. Go tools read and change clipmenu's own store under its lock.
3.7 KiB
3.7 KiB
clipmenu
The clipboard manager as a module (novox/hq ADR 0208, research 026/04).
- Installs
clipmenufrom the official repositories. It bringsclipnotify,xsel,xdotoolanddmenuas its own dependencies. - Claims the mesh's
node-clipboardseat and serves its verbshistoryandcopy. Requiresx11-displayon its own machine. - Declares
rofi-greenclipabsent (ADR 0180). This module replaces it. - Starts
clipmenudonce per session, from the session's start (thexinitrcslotnormal). It is not a user unit as well. Its packaged unit needs user-scoped units (mesh-host #72, not merged), and the session start alone is one starter. - Binds
$mod+periodtoclipmenu, as its own i3 drop-in (50-clipmenu.conf). clipmenu shows the history throughdmenu, the seat command ofnode-launcher, so it looks like every other menu. - Its settings are environment contributions (ADR 0203), read by the daemon, the menu and the tools
alike:
CM_SELECTIONS=clipboard: what was copied, not every highlighted word. The found greenclip did the same.CM_MAX_CLIPS=500: how many clips are kept.CM_HISTLENGTH=15: how many lines the menu shows.
Tools
| tool | does |
|---|---|
node-clipboard.history |
the history, newest first, each entry once with its id, first line, time, size and text (cut) |
node-clipboard.copy |
put text on the clipboard; it enters the history like any copy |
clipmenu_paste |
what the clipboard holds now |
clipmenu_clear |
forget the history; the daemon's locks stay |
clipmenu_delete |
forget one entry, by id or first line |
The history is read from clipmenu's own store, in the account's runtime directory, under clipmenu's
own lock, so a copy arriving meanwhile is neither lost nor half-written. copy hands the text to an
owner (xsel) under the account's service manager. As a child of the tools runtime, the clipboard
would empty whenever the runtime restarted.
What it improves on what was found
- No AUR package. greenclip came from the user repository. clipmenu is in the official one.
- Started once. greenclip was started by the window manager on both workstations, and on the desktop by an enabled user unit as well.
- No absolute home path in any configuration. greenclip's named one.
- The history does not outlive a reboot. greenclip kept it in
~/.cache, so every password ever copied stayed on disk. clipmenu keeps it in the runtime directory, which is memory. - One menu. The history appears in the launcher's own menu, through the seat's
dmenucommand, instead of a theme from a cloned theme repository.
What it leaves as found
~/.config/greenclip.tomland greenclip's history,~/.cache/greenclip.history.- On the desktop: greenclip's enabled user unit link
(
~/.config/systemd/user/default.target.wants/greenclip.service). It dangles once the package is gone.
Migration (ADR 0182)
- After the first push, delete
~/.config/greenclip.tomland~/.cache/greenclip.history. - On the desktop:
systemctl --user disable greenclip.service, before the push if you can. The package's removal takes the unit file with it. - Until the
i3module carries the main configuration, the foundexec --no-startup-id greenclip daemonand$mod+periodlines stay in~/.config/i3/config. i3 reports$mod+periodas bound twice. Thei3module's configuration carries neither.
Blockers
node-clipboard,x11-displayand thexinitrcslot are ADR 0208's. Until the controller knows them,mctlreads them as unknown.CM_*reach the session throughnode-env(ADR 0203), so the account's environment module must be assigned too. Without it clipmenu runs on its defaults: both selections, 1000 clips, 8 lines.