forked from Shinonome/dots-hyprland
waffles: ctrl alt del menu
This commit is contained in:
@@ -9,6 +9,8 @@ import qs.services
|
||||
import qs.modules.common
|
||||
import qs.modules.common.functions
|
||||
import qs.modules.waffle.looks
|
||||
import qs.modules.waffle.startMenu.startPage
|
||||
import qs.modules.waffle.startMenu.searchPage
|
||||
|
||||
WBarAttachedPanelContent {
|
||||
id: root
|
||||
|
||||
@@ -70,6 +70,19 @@ Scope {
|
||||
}
|
||||
}
|
||||
|
||||
function toggleClipboard() {
|
||||
if (LauncherSearch.query.startsWith(Config.options.search.prefix.clipboard) || !GlobalStates.searchOpen) {
|
||||
GlobalStates.searchOpen = !GlobalStates.searchOpen;
|
||||
}
|
||||
LauncherSearch.ensurePrefix(Config.options.search.prefix.clipboard);
|
||||
}
|
||||
function toggleEmojis() {
|
||||
if (LauncherSearch.query.startsWith(Config.options.search.prefix.emojis) || !GlobalStates.searchOpen) {
|
||||
GlobalStates.searchOpen = !GlobalStates.searchOpen;
|
||||
}
|
||||
LauncherSearch.ensurePrefix(Config.options.search.prefix.emojis);
|
||||
}
|
||||
|
||||
IpcHandler {
|
||||
target: "search"
|
||||
|
||||
@@ -119,4 +132,22 @@ Scope {
|
||||
GlobalStates.superReleaseMightTrigger = false;
|
||||
}
|
||||
}
|
||||
|
||||
GlobalShortcut {
|
||||
name: "overviewClipboardToggle"
|
||||
description: "Toggle clipboard query on overview widget"
|
||||
|
||||
onPressed: {
|
||||
root.toggleClipboard();
|
||||
}
|
||||
}
|
||||
|
||||
GlobalShortcut {
|
||||
name: "overviewEmojiToggle"
|
||||
description: "Toggle emoji query on overview widget"
|
||||
|
||||
onPressed: {
|
||||
root.toggleEmojis();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-1
@@ -5,6 +5,7 @@ import qs.modules.common
|
||||
import qs.modules.waffle.looks
|
||||
import qs.modules.common.functions
|
||||
import qs.modules.common.models
|
||||
import qs.modules.waffle.startMenu
|
||||
import Quickshell
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Controls
|
||||
@@ -119,7 +120,7 @@ RowLayout {
|
||||
onModelChanged: {
|
||||
root.focusFirstItem();
|
||||
}
|
||||
delegate: WSearchResultButton {
|
||||
delegate: SearchResultButton {
|
||||
required property int index
|
||||
required property var modelData
|
||||
entry: modelData
|
||||
+1
@@ -8,6 +8,7 @@ import qs.services
|
||||
import qs.modules.common
|
||||
import qs.modules.common.functions
|
||||
import qs.modules.waffle.looks
|
||||
import qs.modules.waffle.startMenu
|
||||
|
||||
RowLayout {
|
||||
id: root
|
||||
+10
-7
@@ -90,7 +90,7 @@ Rectangle {
|
||||
NumberAnimation {
|
||||
target: categoryFolderPopup
|
||||
property: "x"
|
||||
from: categoryFolderPopup.originPoint.x - categoryOpenButtonLoader.width * 3 / 2
|
||||
from: categoryFolderPopup.originPoint.x - categoryOpenButtonLoader.width * 5 / 2
|
||||
to: categoryFolderPopup.windowCenterPoint.x - categoryFolderPopup.width / 2
|
||||
duration: 300
|
||||
easing.type: Easing.BezierSpline
|
||||
@@ -99,7 +99,7 @@ Rectangle {
|
||||
NumberAnimation {
|
||||
target: categoryFolderPopup
|
||||
property: "y"
|
||||
from: categoryFolderPopup.originPoint.y - categoryOpenButtonLoader.height / 2
|
||||
from: categoryFolderPopup.originPoint.y - categoryOpenButtonLoader.height * 3 / 2
|
||||
to: categoryFolderPopup.windowCenterPoint.y - categoryFolderPopup.height / 2
|
||||
duration: 300
|
||||
easing.type: Easing.BezierSpline
|
||||
@@ -120,7 +120,7 @@ Rectangle {
|
||||
NumberAnimation {
|
||||
target: categoryFolderPopup
|
||||
property: "x"
|
||||
to: categoryFolderPopup.originPoint.x - categoryOpenButtonLoader.width * 3 / 2
|
||||
to: categoryFolderPopup.originPoint.x - categoryOpenButtonLoader.width * 5 / 2
|
||||
duration: 200
|
||||
easing.type: Easing.BezierSpline
|
||||
easing.bezierCurve: Looks.transition.easing.bezierCurve.easeOut
|
||||
@@ -128,7 +128,7 @@ Rectangle {
|
||||
NumberAnimation {
|
||||
target: categoryFolderPopup
|
||||
property: "y"
|
||||
to: categoryFolderPopup.originPoint.y - categoryOpenButtonLoader.height / 2
|
||||
to: categoryFolderPopup.originPoint.y - categoryOpenButtonLoader.height * 3 / 2
|
||||
duration: 200
|
||||
easing.type: Easing.BezierSpline
|
||||
easing.bezierCurve: Looks.transition.easing.bezierCurve.easeOut
|
||||
@@ -147,10 +147,13 @@ Rectangle {
|
||||
background: null
|
||||
|
||||
Loader {
|
||||
id: folderContentLoader
|
||||
active: categoryFolderPopup.visible
|
||||
sourceComponent: CategoryFolderContent {
|
||||
title: root.aggregatedCategory.name
|
||||
desktopEntries: root.desktopEntries
|
||||
sourceComponent: WRectangularShadowThis {
|
||||
CategoryFolderContent {
|
||||
title: root.aggregatedCategory.name
|
||||
desktopEntries: root.desktopEntries
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+2
@@ -44,6 +44,8 @@ BodyRectangle {
|
||||
|
||||
component AllApps: PageSection {
|
||||
title: Translation.tr("All")
|
||||
// TODO: Do we wanna also implement list view and grid view?
|
||||
// (instead of only category view)
|
||||
AllAppsGrid {
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
Reference in New Issue
Block a user