mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-04-20 11:54:23 +02:00
29 lines
No EOL
917 B
Text
29 lines
No EOL
917 B
Text
let {
|
|
$button = { type = "button" name="power-btn" label = "" on_click = "popup:toggle" }
|
|
|
|
$popup = {
|
|
type = "box"
|
|
orientation = "vertical"
|
|
widgets = [
|
|
{ type = "label" name = "header" label = "Power menu" }
|
|
{
|
|
type = "box"
|
|
widgets = [
|
|
{ type = "button" class="power-btn" label = "<span font-size='40pt'></span>" on_click = "!shutdown now" }
|
|
{ type = "button" class="power-btn" label = "<span font-size='40pt'></span>" on_click = "!reboot" }
|
|
]
|
|
}
|
|
{ type = "label" name = "uptime" label = "Uptime: {{30000:uptime -p | cut -d ' ' -f2-}}" }
|
|
]
|
|
}
|
|
|
|
$power_menu = {
|
|
type = "custom"
|
|
class = "power-menu"
|
|
|
|
bar = [ $button ]
|
|
popup = [ $popup ]
|
|
}
|
|
} in {
|
|
end = [ $power_menu { type = "clock" } ]
|
|
} |