35 lines
757 B
QML
35 lines
757 B
QML
import QtQuick
|
|
import Quickshell
|
|
import Quickshell.Io
|
|
import "." as M
|
|
import "../services" as S
|
|
import "../applets" as C
|
|
import NovaStats as NS
|
|
|
|
M.BarModule {
|
|
id: root
|
|
active: NS.ModulesService.powerEnable
|
|
tooltip: "Power menu"
|
|
panelNamespace: "nova-power"
|
|
panelContentWidth: 180
|
|
panelComponent: Component {
|
|
C.PowerApplet {
|
|
width: parent.width
|
|
accentColor: root.accentColor
|
|
onRunCommand: cmd => {
|
|
runner.command = cmd;
|
|
runner.running = true;
|
|
}
|
|
onDismiss: root.dismissPanel()
|
|
}
|
|
}
|
|
|
|
Process {
|
|
id: runner
|
|
}
|
|
|
|
M.BarIcon {
|
|
icon: "\uF011"
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
}
|
|
}
|