mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
feat(launcher): Add toggle for clip plugin preview
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -139,6 +139,7 @@
|
||||
},
|
||||
"appLauncher": {
|
||||
"enableClipboardHistory": false,
|
||||
"enableClipPreview": true,
|
||||
"position": "center",
|
||||
"pinnedExecs": [],
|
||||
"useApp2Unit": false,
|
||||
|
||||
@@ -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<string> pinnedExecs: []
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user