Launcher: force calculator to listview

ClipboardService: fix warning
IPCService: add launcher emoji ipc
This commit is contained in:
Ly-sec
2025-11-23 22:05:40 +01:00
parent 80bc4f9c55
commit ad96d2b05c
3 changed files with 21 additions and 6 deletions
+13 -6
View File
@@ -56,8 +56,8 @@ SmartPanel {
readonly property int badgeSize: Math.round(Style.baseWidgetSize * 1.6)
readonly property int entryHeight: Math.round(badgeSize + Style.marginM * 2)
readonly property bool isGridView: {
// Always use list view for clipboard to better display text content and previews
if (searchText.startsWith(">clip")) {
// Always use list view for clipboard and calculator to better display content
if (searchText.startsWith(">clip") || searchText.startsWith(">calc")) {
return false;
}
return Settings.data.appLauncher.viewMode === "grid";
@@ -876,13 +876,20 @@ SmartPanel {
// Handle scrolling to show selected item when it changes
Connections {
target: root
enabled: root.isGridView
function onSelectedIndexChanged() {
if (root.selectedIndex >= 0) {
Qt.callLater(() => {
// Only process if we're still in grid view and component exists
if (!root.isGridView || root.selectedIndex < 0 || !resultsGrid) {
return;
}
Qt.callLater(() => {
// Double-check we're still in grid view mode
if (root.isGridView && resultsGrid && resultsGrid.cancelFlick) {
resultsGrid.cancelFlick();
resultsGrid.positionViewAtIndex(root.selectedIndex, GridView.Contain);
});
}
}
});
// Update preview
if (clipboardPreviewLoader.item && root.selectedIndex >= 0) {
+7
View File
@@ -112,6 +112,13 @@ Item {
launcherPanel?.toggle();
});
}
function emoji() {
root.withTargetScreen(screen => {
var launcherPanel = PanelService.getPanel("launcherPanel", screen);
launcherPanel?.setSearchText(">emoji ");
launcherPanel?.toggle();
});
}
}
IpcHandler {
+1
View File
@@ -4,6 +4,7 @@ import QtQuick
import Quickshell
import Quickshell.Io
import qs.Commons
import qs.Services.UI
// Thin wrapper around the cliphist CLI
Singleton {