clipboard history: images

This commit is contained in:
end-4
2025-05-28 00:09:38 +02:00
parent f04d5f6202
commit 442ddc1a7b
6 changed files with 123 additions and 12 deletions
@@ -275,7 +275,7 @@ Item { // Wrapper
clip: true
topMargin: 10
bottomMargin: 10
spacing: 0
spacing: 2
KeyNavigation.up: searchBar
onFocusChanged: {
@@ -305,11 +305,13 @@ Item { // Wrapper
const searchString = root.searchingText.slice(ConfigOptions.search.prefix.clipboard.length);
return Cliphist.fuzzyQuery(searchString).map(entry => {
return {
cliphistRawString: entry,
name: entry.replace(/^\s*\S+\s+/, ""),
clickActionName: qsTr("Copy"),
clickActionName: "",
type: `#${entry.match(/^\s*(\S+)/)?.[1] || ""}`,
execute: () => {
Hyprland.dispatch(`exec echo '${StringUtils.shellSingleQuoteEscape(entry)}' | cliphist decode | wl-copy`);
Cliphist.refresh()
}
};
}).filter(Boolean);