Genode Packages collection https://git.sr.ht/~ehmry/genodepkgs/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

236 lines
9.1 KiB

let Genode = env:DHALL_GENODE
let Prelude = Genode.Prelude
let XML = Prelude.XML
let Init = Genode.Init
let Child = Init.Child
let Resources = Init.Resources
let ServiceRoute = Init.ServiceRoute
let Policy = Init.Config.Policy
let DefaultPolicy = Init.Config.DefaultPolicy
let LabelSelector = Init.LabelSelector
let label =
λ(label : Text)
→ { local = label, route = label } : Child.Attributes.Label
in Init::{
, children = toMap
{ nitpicker =
Child.flat
Child.Attributes::{
, binary = "nitpicker"
, config = Init.Config::{
, attributes = toMap { focus = "rom" }
, content =
[ XML.text
''
<domain name="pointer" layer="1" content="client" label="no" origin="pointer" />
<domain name="default" layer="2" hover="always" />
<domain name="decorator" layer="2" content="client" label="no" hover="always" />
<domain name="desktop" layer="2" content="client" label="no" hover="always" />
<domain name="background" layer="3" content="client" label="no" hover="always" />
<global-key name="KEY_SCREEN" label="wm -> decorator" />
''
]
, policies =
[ Policy::{
, label = LabelSelector.prefix "pointer"
, attributes = toMap { domain = "pointer" }
}
, Policy::{
, label = LabelSelector.suffix "-> decorator"
, attributes = toMap { domain = "decorator" }
}
, Policy::{
, label = LabelSelector.prefix "wm"
, attributes = toMap { domain = "desktop" }
}
, Policy::{
, label = LabelSelector.label "backdrop"
, attributes = toMap { domain = "backdrop" }
}
]
, defaultPolicy = Some DefaultPolicy::{
, attributes = toMap { domain = "default" }
}
}
, provides = [ "Nitpicker" ]
, resources = Resources::{ caps = 256, ram = Genode.units.MiB 64 }
, routes =
[ ServiceRoute.parent "Framebuffer"
, ServiceRoute.parent "Input"
]
}
, pointer =
Child.flat
Child.Attributes::{
, binary = "pointer"
, routes = [ ServiceRoute.child "Nitpicker" "nitpicker" ]
}
, wm =
Child.flat
Child.Attributes::{
, binary = "wm"
, config = Init.Config::{
, policies =
[ Policy::{
, attributes = toMap { role = "decorator" }
, label = LabelSelector.prefix "decorator"
}
, Policy::{
, attributes = toMap { role = "layouter" }
, label = LabelSelector.prefix "layouter"
}
]
, defaultPolicy = Some DefaultPolicy::{=}
}
, provides = [ "Nitpicker", "Report", "ROM" ]
, reportRoms = [ label "focus", label "resize_request" ]
, romReports =
[ label "focus_request"
, label "pointer"
, label "shape"
, label "window_list"
]
, resources = Init.Resources::{
, caps = 256
, ram = Genode.units.MiB 8
}
, routes =
[ ServiceRoute.childLabel
"Nitpicker"
"nitpicker"
(Some "")
(Some "focus")
, ServiceRoute.child "Nitpicker" "nitpicker"
, ServiceRoute.parentLabel
"Report"
(Some "clipboard")
(Some "clipboard")
, ServiceRoute.parentLabel
"Report"
(Some "shape")
(Some "shape")
]
}
, layouter =
Child.flat
Child.Attributes::{
, binary = "window_layouter"
, config = Init.Config::{
, attributes = toMap { rules = "rom" }
, content =
[ XML.text
''
<report rules="yes"/>
<rules>
<screen name="screen_1"/>
<screen name="screen_2"/>
<screen name="screen_3"/>
<screen name="screen_4"/>
<screen name="screen_5"/>
<screen name="screen_6"/>
<screen name="screen_7"/>
<screen name="screen_8"/>
<screen name="screen_9"/>
<screen name="screen_0"/>
<assign label_prefix="" target="screen_1" xpos="any" ypos="any"/>
</rules>
<press key="KEY_SCREEN">
<press key="KEY_TAB" action="next_window">
<release key="KEY_TAB">
<release key="KEY_SCREEN" action="raise_window"/>
</release>
<release key="KEY_SCREEN" action="raise_window"/>
</press>
<press key="KEY_LEFTSHIFT">
<press key="KEY_TAB" action="prev_window">
<release key="KEY_TAB">
<release key="KEY_SCREEN" action="raise_window"/>
</release>
</press>
</press>
<press key="KEY_ENTER" action="toggle_fullscreen"/>
<press key="KEY_1" action="screen" target="screen_1"/>
<press key="KEY_2" action="screen" target="screen_2"/>
<press key="KEY_3" action="screen" target="screen_3"/>
<press key="KEY_4" action="screen" target="screen_4"/>
<press key="KEY_5" action="screen" target="screen_5"/>
<press key="KEY_6" action="screen" target="screen_6"/>
<press key="KEY_7" action="screen" target="screen_7"/>
<press key="KEY_8" action="screen" target="screen_8"/>
<press key="KEY_9" action="screen" target="screen_9"/>
<press key="KEY_0" action="screen" target="screen_0"/>
</press>
''
]
}
, provides = [ "Nitpicker", "Report", "ROM" ]
, romReports =
[ label "focus"
, label "resize_request"
, label "rules"
, label "window_layout"
]
, reportRoms =
[ label "decorator_margins"
, label "focus_request"
, label "hover"
, label "rules"
, label "shape"
, label "window_list"
]
, resources = Init.Resources::{
, caps = 256
, ram = Genode.units.MiB 8
}
, routes = [ ServiceRoute.child "Nitpicker" "wm" ]
}
, decorator =
Child.flat
Child.Attributes::{
, binary = "decorator"
, config = Init.Config::{
, content =
[ XML.element
{ name = "controls"
, attributes = XML.emptyAttributes
, content =
[ XML.leaf
{ name = "maximizer"
, attributes = XML.emptyAttributes
}
, XML.leaf
{ name = "title", attributes = XML.emptyAttributes }
]
}
]
, defaultPolicy = Some DefaultPolicy::{=}
}
, provides = [ "Nitpicker", "Report", "ROM" ]
, reportRoms = [ label "window_layout", label "pointer" ]
, romReports = [ label "decorator_margins", label "hover" ]
, resources = Init.Resources::{
, caps = 128
, ram = Genode.units.MiB 12
}
, routes = [ ServiceRoute.child "Nitpicker" "wm" ]
}
}
, routes = [ ServiceRoute.parent "Timer" ]
, services =
[ ServiceRoute.child "Nitpicker" "wm"
, ServiceRoute.child "Report" "wm"
, ServiceRoute.child "ROM" "wm"
]
}