Add Clipboard History as a launcher mode backed by cliphist

The launcher gains a clipboard mode with the same bar, position and size:
the latest five entries show at once and the rest scroll, search filters
in recency order, Enter copies, Shift+Delete removes an entry. >clipboard
switches in place without closing or animating; glassmxrph clipboard
toggles it directly. History stays with the user's cliphist watcher.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
mxandClaude Opus 5.5 committed 2026-10-15 15:16:14 +02:00
1 parent 44a5aedbb2
commit 5a10469efe
15 files changed
+392 -24

No files matched your search

+12 -1
View File
@@ -13,7 +13,18 @@ Singleton {
page: page.id,
available: page.available,
run: page.launcherAction ? () => ShellState[page.launcherAction]() : undefined
})).concat(extensions)
})).concat(builtins, extensions)
// `stay` commands keep the launcher open (they change its mode in place).
readonly property var builtins: [
{
id: "clipboard",
title: "Clipboard History",
description: "Search and copy from cliphist",
kind: "Command",
stay: true,
run: () => ShellState.openLauncher("clipboard")
}
]
// Extensions are registered by trusted QML code, never interpreted from search text.
function registerCommand(command) {
if (!command || !/^[a-z][a-z0-9-]*$/.test(command.id) || !command.title || typeof command.run !== "function" || commands.some(c => c.id === command.id))