Something went wrong. Try again.
my over complex system configurations
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162import QtQuickimport Quickshellimport Quickshell.Waylandimport Quickshell.Widgetsimport qs.data
PanelWindow { id: root
property string namespace: "modal" default property alias content: wrapper.data
// the Surface this is the window of: dismissing the modal closes it property string surface: ""
signal dismissed()
Connections { target: root function onDismissed(): void { if (root.surface !== "") Surfaces.close(root.surface); } }
color: "transparent" anchors { top: true; bottom: true; left: true; right: true } exclusionMode: ExclusionMode.Ignore WlrLayershell.layer: WlrLayer.Overlay WlrLayershell.namespace: namespace WlrLayershell.keyboardFocus: WlrKeyboardFocus.Exclusive
Rectangle { anchors.fill: parent color: Theme.colors.scrim opacity: holder.opacity
MouseArea { anchors.fill: parent; onClicked: root.dismissed() } }
FocusScope { id: holder anchors.centerIn: parent implicitWidth: wrapper.implicitWidth implicitHeight: wrapper.implicitHeight width: implicitWidth height: implicitHeight focus: true Keys.onEscapePressed: root.dismissed()
opacity: 0 scale: 0.96 Component.onCompleted: { opacity = 1; scale = 1; } Behavior on opacity { Anim {} } Behavior on scale { Anim {} }
WrapperMouseArea { id: wrapper anchors.fill: parent } }}