import Quickshell import QtQuick // for Text import QtQuick.Controls import QtQuick.Layouts import Quickshell.Hyprland import Quickshell.Io import Quickshell.Widgets Item { implicitWidth: 30 implicitHeight: 30 ClippingWrapperRectangle { radius: 5 anchors.fill: parent Button { id: button text: "󰤨 " font.pointSize: 16 onClicked: { menu.visible = true grab.active = true } implicitHeight: parent.height } } property var window: null id: root PopupWindow { id: menu anchor.window: window anchor.rect.x: root.parent.x + root.parent.width - width anchor.rect.y: 50 implicitWidth: 250 implicitHeight: 150 visible: false color: "transparent" ClippingWrapperRectangle { radius: 5 implicitHeight: parent.height - 20 implicitWidth: parent.width ColumnLayout { spacing: 0 Button { Layout.topMargin: 5 x: (parent.width - width) / 2 implicitWidth: parent.width - 10 implicitHeight: parent.height / 5 - parent.spacing text: 'shutdown' } } } HyprlandFocusGrab { id: grab windows: [ menu ] onCleared: menu.visible = false } } }