This repository has been archived on 2026-07-13. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
nova-shell/shell/modules/PowerModule.qml

42 lines
933 B
QML

import QtQuick
import Quickshell
import Quickshell.Io
import "." as M
import "../services" as S
import "../applets" as C
M.BarModule {
id: root
tooltip: "Power menu"
Process {
id: runner
}
M.BarIcon {
icon: "\uF011"
anchors.verticalCenter: parent.verticalCenter
}
M.HoverPanel {
id: hoverPanel
showPanel: root._showPanel
screen: QsWindow.window?.screen ?? null
anchorItem: root
accentColor: root.accentColor
panelNamespace: "nova-power"
panelTitle: "Power"
contentWidth: 180
onDismissed: root.dismissPanel()
C.PowerApplet {
width: hoverPanel.contentWidth
accentColor: root.accentColor
onRunCommand: cmd => {
runner.command = cmd;
runner.running = true;
}
onDismiss: root.dismissPanel()
}
}
}