launcher overhaul

This commit is contained in:
Zacharias-Brohn
2026-02-17 17:12:34 +01:00
parent dbb930f39a
commit 9cf054a1c6
6 changed files with 7 additions and 119 deletions
+1 -1
View File
@@ -82,7 +82,7 @@ Variants {
HyprlandFocusGrab {
id: focusGrab
active: visibilities.launcher || visibilities.sidebar || visibilities.dashboard || visibilities.osd
active: visibilities.launcher
windows: [bar]
onCleared: {
visibilities.launcher = false;
+1 -1
View File
@@ -12,7 +12,7 @@ Singleton {
FileView {
id: fileView
path: Quickshell.env("HOME") + "/.local/state/z-bar/wallpaper_path.json"
path: `${Paths.state}/wallpaper_path.json`
watchChanges: true
onFileChanged: reload()
-101
View File
@@ -1,101 +0,0 @@
import Quickshell
import QtQuick
import QtQuick.Controls
import qs.Helpers
import qs.Config
import qs.Paths
TextField {
id: root
color: "white"
horizontalAlignment: Text.AlignLeft
echoMode: TextInput.Normal
placeholderText: qsTr("Search applications...")
background: null
renderType: TextInput.NativeRendering
font.family: "Rubik"
cursorDelegate: Rectangle {
id: cursor
property bool disableBlink
implicitWidth: 2
color: "white"
radius: 2
Connections {
target: root
function onCursorPositionChanged(): void {
if ( root.activeFocus && root.cursorVisible ) {
cursor.opacity = 1;
cursor.disableBlink = true;
enableBlink.restart();
}
}
}
Timer {
id: enableBlink
interval: 100
onTriggered: cursor.disableBlink = false
}
Timer {
running: root.activeFocus && root.cursorVisible && !cursor.disableBlink
repeat: true
triggeredOnStart: true
interval: 500
onTriggered: parent.opacity = parent.opacity === 1 ? 0 : 1
}
Binding {
when: !root.activeFocus || !root.cursorVisible
cursor.opacity: 0
}
Behavior on opacity {
Anim {
duration: 200
}
}
}
Keys.onPressed: {
if ( event.key === Qt.Key_Down ) {
if ( appListLoader.active ) {
appListLoader.item.decrementCurrentIndex();
} else {
wallpaperPickerLoader.item.decrementCurrentIndex();
}
event.accepted = true;
} else if ( event.key === Qt.Key_Up ) {
if ( appListLoader.active ) {
appListLoader.item.incrementCurrentIndex();
} else {
wallpaperPickerLoader.item.incrementCurrentIndex();
}
event.accepted = true;
} else if ( event.key === Qt.Key_Return || event.key === Qt.Key_Enter ) {
if ( appListLoader.active ) {
Search.launch(appListLoader.item.currentItem.modelData);
launcherWindow.visible = false;
} else if ( wallpaperPickerLoader.active ) {
SearchWallpapers.setWallpaper(wallpaperPickerLoader.item.currentItem.modelData.path)
if ( Config.general.wallust ) {
Wallust.generateColors(WallpaperPath.currentWallpaperPath);
}
closeAnim.start();
}
event.accepted = true;
} else if ( event.key === Qt.Key_Escape ) {
if ( wallpaperPickerLoader.active )
SearchWallpapers.stopPreview();
closeAnim.start();
event.accepted = true;
}
}
}
+3 -14
View File
@@ -65,12 +65,6 @@ WlSessionLockSurface {
to: 1
duration: Appearance.anim.durations.large
}
Modules.Anim {
target: background
property: "opacity"
to: 0
duration: Appearance.anim.durations.large
}
SequentialAnimation {
PauseAnimation {
duration: Appearance.anim.durations.small
@@ -94,12 +88,6 @@ WlSessionLockSurface {
running: true
Modules.Anim {
target: background
property: "opacity"
to: 1
duration: Appearance.anim.durations.large
}
SequentialAnimation {
ParallelAnimation {
Modules.Anim {
@@ -154,11 +142,12 @@ WlSessionLockSurface {
CachingImage {
id: background
anchors.fill: parent
asynchronous: false
asynchronous: true
path: WallpaperPath.currentWallpaperPath
opacity: 1
Component.onCompleted: {
console.log(source);
console.log(path);
}
}
+1 -1
View File
@@ -13,7 +13,7 @@ main() {
done
if [[ "$LOCK" = "true" ]]; then
hyprctl dispatch global zshell-lock:lock
hyprctl dispatch global zshell:lock
else
qs -n -d -p "$QML_ROOT/shell.qml"
fi
+1 -1
View File
@@ -13,7 +13,7 @@ main() {
done
if [[ "$LOCK" = "true" ]]; then
hyprctl dispatch global zshell-lock:lock
hyprctl dispatch global zshell:lock
else
qs -n -d -p "$QML_ROOT/shell.qml"
fi