nosignal-shell/modules/launcher/Launcher.qml
2 * r + 2 * t 651378d496 launcher: add content
Also use surfaceContainer as background
2025-05-02 14:57:59 +10:00

63 lines
1.4 KiB
QML

import "root:/widgets"
import "root:/config"
import Quickshell
import Quickshell.Wayland
Scope {
id: root
property bool bindInterrupted
property bool launcherVisible
LazyLoader {
id: loader
loading: true
StyledWindow {
id: win
name: "launcher"
keyboardFocus: root.launcherVisible ? WlrKeyboardFocus.Exclusive : WlrKeyboardFocus.None
visible: wrapper.shouldBeVisible
width: content.width + bg.rounding * 2
height: content.implicitHeight
anchors.bottom: true
Background {
id: bg
realWrapperHeight: wrapper.height
}
Wrapper {
id: wrapper
launcherVisible: root.launcherVisible
Content {
id: content
}
}
}
}
CustomShortcut {
name: "launcher"
description: "Toggle launcher"
onPressed: root.bindInterrupted = false
onReleased: {
if (!root.bindInterrupted)
root.launcherVisible = !root.launcherVisible;
root.bindInterrupted = false;
}
}
CustomShortcut {
name: "launcherInterrupt"
description: "Interrupt launcher keybind"
onPressed: root.bindInterrupted = true
}
}