diff --git a/Assets/Translations/en.json b/Assets/Translations/en.json index 55ff382c..2b14de6b 100644 --- a/Assets/Translations/en.json +++ b/Assets/Translations/en.json @@ -1341,6 +1341,10 @@ "description": "Access previously copied items from the launcher.", "label": "Enable clipboard history" }, + "clip-preview": { + "description": "Show a preview of the clipboard content when using the >clip command.", + "label": "Enable clip preview" + }, "custom-launch-prefix": { "description": "Prefix commands with a custom launcher (e.g., 'runapp' for systemd integration).", "label": "Custom launch prefix" diff --git a/Assets/settings-default.json b/Assets/settings-default.json index 5bd6841b..1336f6db 100644 --- a/Assets/settings-default.json +++ b/Assets/settings-default.json @@ -139,6 +139,7 @@ }, "appLauncher": { "enableClipboardHistory": false, + "enableClipPreview": true, "position": "center", "pinnedExecs": [], "useApp2Unit": false, diff --git a/Commons/Settings.qml b/Commons/Settings.qml index 568d069c..a344cbe0 100644 --- a/Commons/Settings.qml +++ b/Commons/Settings.qml @@ -295,6 +295,7 @@ Singleton { // applauncher property JsonObject appLauncher: JsonObject { property bool enableClipboardHistory: false + property bool enableClipPreview: true // Position: center, top_left, top_right, bottom_left, bottom_right, bottom_center, top_center property string position: "center" property list pinnedExecs: [] diff --git a/Modules/Panels/Launcher/Launcher.qml b/Modules/Panels/Launcher/Launcher.qml index 3de1c721..cf6f08b9 100644 --- a/Modules/Panels/Launcher/Launcher.qml +++ b/Modules/Panels/Launcher/Launcher.qml @@ -13,7 +13,7 @@ import qs.Widgets SmartPanel { id: root - readonly property bool previewActive: searchText.startsWith(">clip") + readonly property bool previewActive: searchText.startsWith(">clip") && Settings.data.appLauncher.enableClipPreview // Panel configuration readonly property int listPanelWidth: Math.round(600 * Style.uiScaleRatio) diff --git a/Modules/Panels/Settings/Tabs/LauncherTab.qml b/Modules/Panels/Settings/Tabs/LauncherTab.qml index 976d4b50..2edbbf62 100644 --- a/Modules/Panels/Settings/Tabs/LauncherTab.qml +++ b/Modules/Panels/Settings/Tabs/LauncherTab.qml @@ -65,6 +65,13 @@ ColumnLayout { onToggled: checked => Settings.data.appLauncher.enableClipboardHistory = checked } + NToggle { + label: I18n.tr("settings.launcher.settings.clip-preview.label") + description: I18n.tr("settings.launcher.settings.clip-preview.description") + checked: Settings.data.appLauncher.enableClipPreview + onToggled: checked => Settings.data.appLauncher.enableClipPreview = checked + } + NToggle { label: I18n.tr("settings.launcher.settings.sort-by-usage.label") description: I18n.tr("settings.launcher.settings.sort-by-usage.description")