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.

wm.dhall 9.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  1. let Genode = env:DHALL_GENODE
  2. let Prelude = Genode.Prelude
  3. let XML = Prelude.XML
  4. let Init = Genode.Init
  5. let Child = Init.Child
  6. let Resources = Init.Resources
  7. let ServiceRoute = Init.ServiceRoute
  8. let Policy = Init.Config.Policy
  9. let DefaultPolicy = Init.Config.DefaultPolicy
  10. let LabelSelector = Init.LabelSelector
  11. let label =
  12. λ(label : Text) →
  13. { local = label, route = label } : Child.Attributes.Label
  14. in Init::{
  15. , children = toMap
  16. { nitpicker =
  17. Child.flat
  18. Child.Attributes::{
  19. , binary = "nitpicker"
  20. , config = Init.Config::{
  21. , attributes = toMap { focus = "rom" }
  22. , content =
  23. [ XML.text
  24. ''
  25. <domain name="pointer" layer="1" content="client" label="no" origin="pointer" />
  26. <domain name="default" layer="2" hover="always" />
  27. <domain name="decorator" layer="2" content="client" label="no" hover="always" />
  28. <domain name="desktop" layer="2" content="client" label="no" hover="always" />
  29. <domain name="background" layer="3" content="client" label="no" hover="always" />
  30. <global-key name="KEY_SCREEN" label="wm -> decorator" />
  31. ''
  32. ]
  33. , policies =
  34. [ Policy::{
  35. , label = LabelSelector.prefix "pointer"
  36. , attributes = toMap { domain = "pointer" }
  37. }
  38. , Policy::{
  39. , label = LabelSelector.suffix "-> decorator"
  40. , attributes = toMap { domain = "decorator" }
  41. }
  42. , Policy::{
  43. , label = LabelSelector.prefix "wm"
  44. , attributes = toMap { domain = "desktop" }
  45. }
  46. , Policy::{
  47. , label = LabelSelector.label "backdrop"
  48. , attributes = toMap { domain = "backdrop" }
  49. }
  50. ]
  51. , defaultPolicy = Some DefaultPolicy::{
  52. , attributes = toMap { domain = "default" }
  53. }
  54. }
  55. , provides = [ "Gui", "Capture", "Event" ]
  56. , resources = Resources::{ caps = 256, ram = Genode.units.MiB 64 }
  57. , routes =
  58. [ ServiceRoute.parent "Framebuffer"
  59. , ServiceRoute.parent "Input"
  60. ]
  61. }
  62. , pointer =
  63. Child.flat
  64. Child.Attributes::{
  65. , binary = "pointer"
  66. , routes = [ ServiceRoute.child "Gui" "nitpicker" ]
  67. }
  68. , wm =
  69. Child.flat
  70. Child.Attributes::{
  71. , binary = "wm"
  72. , config = Init.Config::{
  73. , policies =
  74. [ Policy::{
  75. , attributes = toMap { role = "decorator" }
  76. , label = LabelSelector.prefix "decorator"
  77. }
  78. , Policy::{
  79. , attributes = toMap { role = "layouter" }
  80. , label = LabelSelector.prefix "layouter"
  81. }
  82. ]
  83. , defaultPolicy = Some DefaultPolicy::{=}
  84. }
  85. , provides = [ "Gui", "Report", "ROM" ]
  86. , reportRoms = [ label "focus", label "resize_request" ]
  87. , romReports =
  88. [ label "focus_request"
  89. , label "pointer"
  90. , label "shape"
  91. , label "window_list"
  92. ]
  93. , resources = Init.Resources::{
  94. , caps = 256
  95. , ram = Genode.units.MiB 8
  96. }
  97. , routes =
  98. [ ServiceRoute.childLabel
  99. "Gui"
  100. "nitpicker"
  101. (Some "")
  102. (Some "focus")
  103. , ServiceRoute.child "Gui" "nitpicker"
  104. , ServiceRoute.parentLabel
  105. "Report"
  106. (Some "clipboard")
  107. (Some "clipboard")
  108. , ServiceRoute.parentLabel
  109. "Report"
  110. (Some "shape")
  111. (Some "shape")
  112. ]
  113. }
  114. , layouter =
  115. Child.flat
  116. Child.Attributes::{
  117. , binary = "window_layouter"
  118. , config = Init.Config::{
  119. , attributes = toMap { rules = "rom" }
  120. , content =
  121. [ XML.text
  122. ''
  123. <report rules="yes"/>
  124. <rules>
  125. <screen name="screen_1"/>
  126. <screen name="screen_2"/>
  127. <screen name="screen_3"/>
  128. <screen name="screen_4"/>
  129. <screen name="screen_5"/>
  130. <screen name="screen_6"/>
  131. <screen name="screen_7"/>
  132. <screen name="screen_8"/>
  133. <screen name="screen_9"/>
  134. <screen name="screen_0"/>
  135. <assign label_prefix="" target="screen_1" xpos="any" ypos="any"/>
  136. </rules>
  137. <press key="KEY_SCREEN">
  138. <press key="KEY_TAB" action="next_window">
  139. <release key="KEY_TAB">
  140. <release key="KEY_SCREEN" action="raise_window"/>
  141. </release>
  142. <release key="KEY_SCREEN" action="raise_window"/>
  143. </press>
  144. <press key="KEY_LEFTSHIFT">
  145. <press key="KEY_TAB" action="prev_window">
  146. <release key="KEY_TAB">
  147. <release key="KEY_SCREEN" action="raise_window"/>
  148. </release>
  149. </press>
  150. </press>
  151. <press key="KEY_ENTER" action="toggle_fullscreen"/>
  152. <press key="KEY_1" action="screen" target="screen_1"/>
  153. <press key="KEY_2" action="screen" target="screen_2"/>
  154. <press key="KEY_3" action="screen" target="screen_3"/>
  155. <press key="KEY_4" action="screen" target="screen_4"/>
  156. <press key="KEY_5" action="screen" target="screen_5"/>
  157. <press key="KEY_6" action="screen" target="screen_6"/>
  158. <press key="KEY_7" action="screen" target="screen_7"/>
  159. <press key="KEY_8" action="screen" target="screen_8"/>
  160. <press key="KEY_9" action="screen" target="screen_9"/>
  161. <press key="KEY_0" action="screen" target="screen_0"/>
  162. </press>
  163. ''
  164. ]
  165. }
  166. , provides = [ "Gui", "Report", "ROM" ]
  167. , romReports =
  168. [ label "focus"
  169. , label "resize_request"
  170. , label "rules"
  171. , label "window_layout"
  172. ]
  173. , reportRoms =
  174. [ label "decorator_margins"
  175. , label "focus_request"
  176. , label "hover"
  177. , label "rules"
  178. , label "shape"
  179. , label "window_list"
  180. ]
  181. , resources = Init.Resources::{
  182. , caps = 256
  183. , ram = Genode.units.MiB 8
  184. }
  185. , routes = [ ServiceRoute.child "Gui" "wm" ]
  186. }
  187. , decorator =
  188. Child.flat
  189. Child.Attributes::{
  190. , binary = "decorator"
  191. , config = Init.Config::{
  192. , content =
  193. [ XML.element
  194. { name = "controls"
  195. , attributes = XML.emptyAttributes
  196. , content =
  197. [ XML.leaf
  198. { name = "maximizer"
  199. , attributes = XML.emptyAttributes
  200. }
  201. , XML.leaf
  202. { name = "title", attributes = XML.emptyAttributes }
  203. ]
  204. }
  205. ]
  206. , defaultPolicy = Some DefaultPolicy::{=}
  207. }
  208. , provides = [ "Gui", "Report", "ROM" ]
  209. , reportRoms = [ label "window_layout", label "pointer" ]
  210. , romReports = [ label "decorator_margins", label "hover" ]
  211. , resources = Init.Resources::{
  212. , caps = 128
  213. , ram = Genode.units.MiB 12
  214. }
  215. , routes = [ ServiceRoute.child "Gui" "wm" ]
  216. }
  217. }
  218. , routes = [ ServiceRoute.parent "Timer" ]
  219. , services =
  220. [ ServiceRoute.child "Gui" "wm"
  221. , ServiceRoute.child "Report" "wm"
  222. , ServiceRoute.child "ROM" "wm"
  223. , ServiceRoute.child "Event" "Nitpicker"
  224. , ServiceRoute.child "Capture" "Nitpicker"
  225. ]
  226. }