From f9efa56caeeb5289d6b2314e50041a1b7055a3c8 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Tue, 5 Aug 2025 17:25:30 +0800 Subject: feat: add launcher support and image clipboard history utility - Integrated a new Launcher component into the shell.qml for improved application launching. - Implemented an IPC handler to toggle the launcher visibility. - Added a new script (cliphist-img.sh) to manage image history from the clipboard. - Removed the outdated fuzzysort.js utility to streamline the codebase. - Refactored the Levenshtein distance algorithm for better performance and clarity. --- launcher/components/SelectionState.qml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 launcher/components/SelectionState.qml (limited to 'launcher/components/SelectionState.qml') diff --git a/launcher/components/SelectionState.qml b/launcher/components/SelectionState.qml new file mode 100644 index 0000000..00d2420 --- /dev/null +++ b/launcher/components/SelectionState.qml @@ -0,0 +1,27 @@ +pragma Singleton +import Quickshell +import QtQuick + +Singleton { + property Item selected: null + property string input: "" + property int cursorPosition: 0 + property var priorities: [] + property var widgets: [] + + // order them based on widgets(which came from order from config) + onPrioritiesChanged: { + // priorities = priorities.filter(item => item.priority === true); // bind loop + // dunno y ts works w/o triggering a binding loop but okay.. + for (let i = 0; i < priorities.length; i++) + if (priorities[i].priority !== true) + priorities.splice(i, 1); + + priorities.sort((a, b) => widgets.indexOf(a) - widgets.indexOf(b)); + priorities.forEach((item, index) => {}); + } + + function clear() { + selected = null; + } +} -- cgit v1.2.3