package oxbow

  1. Overview
  2. Docs
Dynamic window manager for the river Wayland compositor

Install

dune-project
 Dependency

Authors

Maintainers

Sources

v0.1.0.tar.gz
md5=a637acaa0e19046cd65fff733874eb97
sha512=76230cbecd7510de7a05b5d1f335915ef7b6c4aa557d8dbfd23591606618d2cfa25082d17b93f2f4b53a118d1cbf6a80e4ad51cf0f099b4921fb83d6df0c9801

doc/src/oxbow.state/types.ml.html

Source file types.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
module Key = struct
  type t =
    | Keysym of Xkbcommon.Keysym.t
    | Pointer of Oxbow_core.Pointer_button.t
end

module Config = struct
  module Border = struct
    type t =
      { mutable width : int32
      ; mutable focused : Oxbow_core.Color.t
      ; mutable unfocused : Oxbow_core.Color.t
      ; mutable urgent : Oxbow_core.Color.t
      ; mutable swallowing : Oxbow_core.Color.t
      ; mutable captured : Oxbow_core.Color.t
      }
  end

  module Data = struct
    type t =
      { mutable layout : Oxbow_core.Layout.t
      ; tiling : Oxbow_layout.Params.Tiling.t
      ; scrolling : Oxbow_layout.Params.Scrolling.t
      ; floating : Oxbow_layout.Params.Floating.t
      ; gaps : Oxbow_layout.Params.Gaps.t
      }
  end

  module Rules = struct
    type t =
      { mutable window : Oxbow_core.Window_rule.t list
      ; mutable input : Oxbow_core.Input_rule.t list
      }
  end

  module Spawn = struct
    type t =
      { mutable position : Oxbow_core.Spawn_position.t
      ; mutable focus : bool
      }
  end

  type t =
    { default_tag_config : Data.t
    ; mutable default_overview_gaps : int
    ; borders : Border.t
    ; mutable cursor_theme : (string * int32) option
    ; mutable modes : Oxbow_core.Mode.t list
    ; mutable modkey : Wire.Modifiers.t
    ; rules : Rules.t
    ; spawn : Spawn.t
    ; mutable focus_follows_pointer : Oxbow_core.Focus_follows_policy.t
    ; mutable warp_on_focus : bool
    ; mutable drag_retile : bool
    ; mutable repeat_rate : int
    ; mutable repeat_delay : int
    }
end

module rec Input_device : sig
  module Lifecycle : sig
    type t =
      | New
      | Active
      | Removed
  end

  module Role : sig
    type t =
      | Keyboard of { mutable keyboard : Wire.Obj.Xkb.Config.Keyboard.t option }
      | Pointer of { mutable class_ : Oxbow_core.Input.Class.t }
      | Touch
      | Tablet
  end

  type t =
    { obj : Wire.Obj.Input.Management.Device.t
    ; name : string
    ; role : Role.t
    ; mutable lifecycle : Lifecycle.t
    ; mutable libinput : Wire.Obj.Input.Config.Device.t option
    }
end =
  Input_device

and Output : sig
  module Lifecycle : sig
    type t =
      | Active
      | Removed
  end

  module Tags : sig
    type t =
      { mutable selected : Oxbow_core.Tag.Set.t
      ; mutable previous : Oxbow_core.Tag.Set.t
      }
  end

  module Overview : sig
    type t =
      { mutable offset : int
      ; mutable enabled : bool
      ; mutable gaps : int
      ; mutable head : Window.t option
      }
  end

  type t =
    { obj : Wire.Obj.Window_management.Output.t
    ; layer_shell : Wire.Obj.Layer_shell.Output.t
    ; mutable lifecycle : Lifecycle.t
    ; mutable is_captured : bool
    ; mutable name : string option
    ; mutable labels : string list
    ; mutable geom : int32 Oxbow_core.Rect.t
    ; mutable usable : int Oxbow_core.Rect.t
    ; tags : Tags.t
    ; overview : Overview.t
    ; tag_data : Config.Data.t Oxbow_core.Tag.Table.t
    ; (* Focus stack; most recently focused first *)
      mutable focus_stack : Window.t list
    ; (* All windows on this output. Ordered in tiling order when filtered by
         selected_tags *)
      mutable wm_stack : Window.t list
    }
end =
  Output

and Window : sig
  module Lifecycle : sig
    type t =
      | New
      | Active
      | Closing

    val to_string : t -> string
  end

  module Request : sig
    type t =
      | Move of { seat : Seat.t }
      | Move_to of
          { x : Oxbow_core.Extent.t
          ; y : Oxbow_core.Extent.t
          }
      | Resize of
          { seat : Seat.t
          ; edges : int32
          }
      | Resize_to of
          { w : Oxbow_core.Extent.t
          ; h : Oxbow_core.Extent.t
          }
      | Maximize
      | Unmaximize
      | Fake_fullscreen
      | Exit_fake_fullscreen
      | Fullscreen of { output : Output.t option }
      | Exit_fullscreen
      | Dimensions of
          { width : int32
          ; height : int32
          }
      | Set_tags of Oxbow_core.Tag.Arg.t
      | Set_sticky of Oxbow_core.Sticky.t
      | Send_to_output_name of
          { name : string
          ; policy : Oxbow_core.Tag.Policy.t
          }
      | Float
      | Tile
  end

  module Presentation : sig
    module Tile_or_float : sig
      type t =
        [ `Tiled
        | `Floating
        ]
    end

    module Fullscreen_prior : sig
      type t =
        [ Tile_or_float.t
        | `Maximized of Tile_or_float.t
        ]
    end

    type t =
      | Tiled
      | Floating
      | Maximized of { restore : Tile_or_float.t }
      | Fullscreen of { restore : Fullscreen_prior.t }
  end

  module Size_hints : sig
    type 'a t =
      { min_w : 'a
      ; max_w : 'a
      ; min_h : 'a
      ; max_h : 'a
      }
  end

  module Decoration_hint : sig
    type t =
      | Only_csd
      | Prefer_csd
      | Prefer_ssd
      | No_preference
  end

  module Scrolling_props : sig
    type t =
      { mutable consumes : bool
      ; mutable width : Oxbow_core.Width_fac.t
      }
  end

  module Scratchpad_props : sig
    type t =
      { mutable name : string option
      ; mutable stashed : bool
      }
  end

  module Defense : sig
    type t =
      | Idle
      | Bounce of int32 * int32
      | Hold of int32 * int32
  end

  module Swallow : sig
    module Relation : sig
      type t =
        | Swallowing of Window.t
        | Swallowed_by of Window.t
    end

    type t =
      { mutable role : Oxbow_core.Swallow_role.t
      ; mutable relation : Relation.t option
      }
  end

  module Committed : sig
    type borders =
      { edges : int32
      ; width : int32
      ; color : Oxbow_core.Color.t
      }

    type t =
      { mutable proposed : (int32 * int32) option
      ; mutable in_flight : (int32 * int32) list
      ; mutable fullscreen_on : int32 option
      ; mutable caps : int32 option
      ; mutable tiled_edges : int32 option
      ; mutable ssd : bool option
      ; mutable informed_maximized : bool option
      ; mutable informed_fullscreen : bool option
      ; mutable informed_resizing : bool option
      ; mutable borders : borders option
      ; mutable shown : bool option
      ; mutable position : (int32 * int32) option
      ; mutable clip_box : (int32 * int32 * int32 * int32) option
      ; mutable content_clip_box : (int32 * int32 * int32 * int32) option
      }
  end

  type t =
    { obj : Wire.Obj.Window_management.Window.t
    ; node : Wire.Obj.Window_management.Node.t
    ; mutable lifecycle : Lifecycle.t
    ; id : int
    ; mutable app_id : string option
    ; mutable title : string option
    ; mutable identifier : string option
    ; mutable unreliable_pid : int32 option
    ; mutable parent : t option
    ; mutable float_seed_pending : bool
    ; mutable close_pending : bool
    ; mutable decoration_hint : Decoration_hint.t option
    ; mutable presentation_hint : Wire.Presentation_mode.t option
    ; mutable defense : Defense.t
    ; mutable geom : int32 Oxbow_core.Rect.t
    ; mutable float_rel : int32 Oxbow_core.Rect.t option
    ; mutable clip : ([ `Scrolling | `Overview ] * int Oxbow_core.Rect.t) option
    ; mutable offscreen : bool
    ; mutable size_hints : int32 option Size_hints.t
    ; mutable tags : Oxbow_core.Tag.Set.t
    ; mutable output : Output.t option
    ; mutable output_before_evac : string option
    ; mutable sticky : Oxbow_core.Sticky.t
    ; swallow : Swallow.t
    ; mutable labels : string list
    ; mutable is_fixed : bool
    ; mutable is_urgent : bool
    ; mutable is_captured : bool
    ; mutable is_fake_fullscreen : bool
    ; scrolling : Scrolling_props.t
    ; scratchpad : Scratchpad_props.t
    ; committed : Committed.t
    ; mutable presentation : Presentation.t
    ; mutable requests : Request.t list
    }
end =
  Window

and Seat : sig
  module Lifecycle : sig
    type t =
      | New
      | Active
      | Closing
  end

  module Layer_focus : sig
    type t =
      | Non_exclusive
      | Exclusive
  end

  module Position : sig
    type t =
      { x : int32
      ; y : int32
      }
  end

  module Focus_state : sig
    type t =
      | Idle
      | Refresh of Window.t
      | Clear
  end

  module Op : sig
    type t =
      | Move of
          { window : Window.t
          ; from_tiled : bool
          ; start_x : int32
          ; start_y : int32
          ; mutable dx : int32
          ; mutable dy : int32
          ; mutable release : bool
          }
      | Resize of
          { window : Window.t
          ; start_x : int32
          ; start_y : int32
          ; start_w : int32
          ; start_h : int32
          ; edges : int32
          ; mutable dx : int32
          ; mutable dy : int32
          ; mutable release : bool
          }
  end

  module Xkb_binding : sig
    type t =
      { obj : Wire.Obj.Xkb.Bindings.Binding.t
      ; seat : Seat.t
      ; mode : Oxbow_core.Mode.t
      ; mutable enabled : bool
      ; command : Oxbow_ipc.Command.t
      ; mods : int32
      ; keysym : Xkbcommon.Keysym.t
      }
  end

  module Pointer_binding : sig
    type t =
      { obj : Wire.Obj.Window_management.Pointer_binding.t
      ; seat : Seat.t
      ; mode : Oxbow_core.Mode.t
      ; mutable enabled : bool
      ; command : Oxbow_ipc.Command.t
      ; mods : int32
      ; button : Oxbow_core.Pointer_button.t
      }
  end

  module Warp_request : sig
    type t =
      | No_request
      | Follow_config
      | Forced of bool
      | Point of (int32 * int32)

    val of_override : bool option -> t
  end

  type t =
    { obj : Wire.Obj.Window_management.Seat.t
    ; layer_shell : Wire.Obj.Layer_shell.Seat.t
    ; xkb_seat : Wire.Obj.Xkb.Bindings.Seat.t
    ; mutable overview_watch : int32
    ; mutable watch_sent : int32
    ; mutable lifecycle : Lifecycle.t
    ; mutable name : string option
    ; mutable output : Output.t option
    ; mutable focus_cleared : bool
    ; mutable position : Position.t
    ; mutable layer_focus : Layer_focus.t option
    ; mutable mode : Oxbow_core.Mode.t
    ; mutable xkb_bindings : Xkb_binding.t list
    ; mutable pointer_bindings : Pointer_binding.t list
    ; mutable pending_requests : Pending_request.t Queue.t
    ; mutable hovered : Window.t option
    ; mutable interacted : Window.t option
    ; mutable warp_request : Warp_request.t
    ; mutable focus_state : Focus_state.t
    ; mutable cursor_target : Window.t option
    ; mutable op : Op.t option
    }
end =
  Seat

and Wm : sig
  module Lifecycle : sig
    type t =
      | Running
      | Pending_exit of [ `Local | `Compositor ]
      | Exited
      | Close_requested

    val to_string : t -> string
  end

  module Ipc : sig
    module Subscriber : sig
      type t =
        { kinds : Oxbow_ipc.Record.t list
        ; output : string option
        ; mutable pending : ((Oxbow_ipc.Record.t * string) * string) list
        ; wake : Eio.Condition.t
        }
    end

    type t =
      { mutable subscribers : Subscriber.t list
      ; mutable last : ((Oxbow_ipc.Record.t * string) * Oxbow_ipc.Event.t) list
      }
  end

  type t =
    { river_wm_v1 : Wire.Obj.Window_management.t
    ; river_xkb_v1 : Wire.Obj.Xkb.Bindings.t
    ; river_lsh_v1 : Wire.Obj.Layer_shell.t
    ; river_input_v1 : Wire.Obj.Input.Management.t
    ; river_libinput_v1 : Wire.Obj.Input.Config.t
    ; river_xkb_config_v1 : Wire.Obj.Xkb.Config.t
    ; shutdown : Eio.Condition.t
    ; mutable lifecycle : Lifecycle.t
    ; mutable session_locked : bool
    ; mutable primary_seat : Seat.t option
    ; mutable outputs : Output.t list
    ; mutable windows : Window.t list
    ; mutable seats : Seat.t list
    ; mutable input_devices : Input_device.t list
    ; mutable xkb_stash : (int32 * Wire.Obj.Xkb.Config.Keyboard.t) list
    ; mutable keymap : Wire.Obj.Xkb.Config.Keymap.t option
    ; mutable desired_keymap_path : string option
    ; config : Config.t
    ; init_command : string option
    ; mutable init_handle : Init_script.t option
    ; ipc : Ipc.t
    }
end =
  Wm

module User_data = struct
  type ('a, 'role) Wire.S.user_data +=
    | Window of Window.t
    | Output of Output.t
    | Seat of Seat.t
end