1
0
Fork 0
mirror of https://github.com/Zedfrigg/ironbar.git synced 2025-07-02 03:01:04 +02:00

feat: new custom module

Allows basic modules to be created from a config object, including popup content.
This commit is contained in:
Jake Stanger 2022-10-16 22:16:48 +01:00
parent e23e691bc6
commit 3750124d8c
No known key found for this signature in database
GPG key ID: C51FC8F9CB0BEA61
10 changed files with 326 additions and 54 deletions

25
examples/custom.corn Normal file
View file

@ -0,0 +1,25 @@
let {
$power_menu = {
type = "custom"
class = "power-menu"
bar = [ { type = "button" name="power-btn" label = "" exec = "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>" exec = "!shutdown now" }
{ type = "button" class="power-btn" label = "<span font-size='40pt'></span>" exec = "!reboot" }
]
}
]
} ]
}
} in {
end = [ { type = "clock" } $power_menu ]
}