animations: new curve

This commit is contained in:
end-4
2025-05-03 18:12:06 +02:00
parent 4a44d78389
commit 3284e41545
35 changed files with 442 additions and 236 deletions
@@ -217,8 +217,9 @@ Item { // Wrapper
Behavior on implicitWidth {
NumberAnimation {
duration: Appearance.animation.elementDecelFast.duration
easing.type: Appearance.animation.elementDecelFast.type
duration: Appearance.animation.elementMoveFast.duration
easing.type: Appearance.animation.elementMoveFast.type
easing.bezierCurve: Appearance.animation.elementMoveFast.bezierCurve
}
}
@@ -318,7 +319,23 @@ Item { // Wrapper
});
}
}
// Run command
// Insert math result before command if search starts with a number
const startsWithNumber = /^\d/.test(root.searchingText);
if (startsWithNumber) {
result.push({
name: root.mathResult,
clickActionName: "Copy",
type: qsTr("Math result"),
fontType: "monospace",
materialSymbol: 'calculate',
execute: () => {
Hyprland.dispatch(`exec wl-copy '${root.mathResult}'`)
}
});
}
// Command
result.push({
name: searchingText,
clickActionName: "Run",
@@ -329,17 +346,21 @@ Item { // Wrapper
executor.executeCommand(searchingText.startsWith('sudo') ? `${ConfigOptions.apps.terminal} fish -C '${root.searchingText}'` : root.searchingText);
}
});
// Qalc math result
result.push({
name: root.mathResult,
clickActionName: "Copy",
type: qsTr("Math result"),
fontType: "monospace",
materialSymbol: 'calculate',
execute: () => {
Hyprland.dispatch(`exec wl-copy '${root.mathResult}'`)
}
});
// If not already added, add math result after command
if (!startsWithNumber) {
result.push({
name: root.mathResult,
clickActionName: "Copy",
type: qsTr("Math result"),
fontType: "monospace",
materialSymbol: 'calculate',
execute: () => {
Hyprland.dispatch(`exec wl-copy '${root.mathResult}'`)
}
});
}
// Web search
result.push({
name: root.searchingText,