client_events.go RawHistoryFolder

1package ports
2
3// ClientEvent carries wayland → core notifications.
4type ClientEvent interface{ clientEvent() }
5
6// WindowMapped carries wayland → core mapping.
7type WindowMapped struct {
8	ID    WindowID
9	AppID string
10	// Slot is the SlotEnv value of the client process, empty if none.
11	Slot string
12	// PID is the client process, 0 when unknown.
13	PID int
14	// Floating windows are dialogs (a parent) or fixed-size windows such
15	// as splash screens: core shows them over the columns at their own
16	// size, Width×Height logical (0 when unknown).
17	Floating      bool
18	Width, Height int
19	// Parent is the window a dialog belongs to (xdg_toplevel.set_parent or
20	// xdg-foreign), 0 when none. A dialog of a fullscreen window shows over
21	// it.
22	Parent WindowID
23	// Positioned windows are placed by core: it sends PlaceWindow with the
24	// client rect origin. Set only by the X11 host, false for xdg.
25	Positioned bool
26	// Remap is set when the toplevel mapped before and was unmapped (a tray
27	// app restored): window rules only place its first map.
28	Remap bool
29	// Modal is set for a dialog that blocks its parent (xdg_dialog_v1):
30	// focusing the parent focuses the dialog.
31	Modal bool
32	// Fullscreen is set when the client asked for fullscreen before mapping
33	// (X11 _NET_WM_STATE_FULLSCREEN): core maps it as a tile covering its
34	// screen, without the fullscreen grace of later requests.
35	Fullscreen bool
36	// HasAt asks for the screen containing the layout point (AtX, AtY) when
37	// no rule sets a monitor: the X11 host sets it for a window that maps at
38	// exactly one output's rect.
39	HasAt    bool
40	AtX, AtY int
41}
42
43// SlotEnv is the environment variable neferwl sets on processes it spawns
44// for a slot. The client's value maps its windows to the slot.
45const SlotEnv = "NEFERWL_SLOT"
46
47func (WindowMapped) clientEvent() {}
48
49// InputRegionChanged replaces the surface-local hit area for a mapped surface.
50// All means the full hit rectangle; otherwise Rects is the exact union.
51type InputRegionChanged struct {
52	ID    WindowID
53	All   bool
54	Rects []Rect
55}
56
57func (InputRegionChanged) clientEvent() {}
58
59// WindowUnmapped carries wayland → core removal.
60type WindowUnmapped struct{ ID WindowID }
61
62func (WindowUnmapped) clientEvent() {}
63
64// UnmanagedMapped carries wayland → core that an override-redirect X11 window
65// shows. The rect is its place in the layout (logical coordinates). NoInput
66// windows (tooltips, drag icons, notifications) never take the pointer.
67type UnmanagedMapped struct {
68	ID                  WindowID
69	X, Y, Width, Height int
70	NoInput             bool
71}
72
73func (UnmanagedMapped) clientEvent() {}
74
75// UnmanagedMoved carries wayland → core a move and/or resize of a mapped
76// unmanaged window.
77type UnmanagedMoved struct {
78	ID                  WindowID
79	X, Y, Width, Height int
80}
81
82func (UnmanagedMoved) clientEvent() {}
83
84// UnmanagedUnmapped carries wayland → core that an unmanaged window is gone.
85type UnmanagedUnmapped struct{ ID WindowID }
86
87func (UnmanagedUnmapped) clientEvent() {}
88
89// ShortcutsInhibit carries wayland → core that a window asks for (Active)
90// or stops asking for all keys, compositor binds included, while it has
91// keyboard focus (zwp_keyboard_shortcuts_inhibit_v1).
92type ShortcutsInhibit struct {
93	Window WindowID
94	Active bool
95}
96
97func (ShortcutsInhibit) clientEvent() {}
98
99// IdleInhibit carries wayland → core that a window keeps (Active) or
100// stops keeping the session from going idle (zwp_idle_inhibit_v1).
101type IdleInhibit struct {
102	Window WindowID
103	Active bool
104}
105
106func (IdleInhibit) clientEvent() {}
107
108// OutputPower carries wayland → core a client turning a display off or
109// back on (zwlr_output_power_v1).
110type OutputPower struct {
111	Output string
112	On     bool
113}
114
115func (OutputPower) clientEvent() {}
116
117// ResizeEdges are the window edges a pointer resize moves, as bit flags
118// (the xdg_toplevel resize_edge values).
119type ResizeEdges uint32
120
121const (
122	ResizeTop    ResizeEdges = 1
123	ResizeBottom ResizeEdges = 2
124	ResizeLeft   ResizeEdges = 4
125	ResizeRight  ResizeEdges = 8
126)
127
128// WindowMoveRequest carries wayland → core xdg_toplevel move and resize
129// requests answering the client's current press: core starts a pointer
130// drag of the window with the held button.
131type WindowMoveRequest struct {
132	ID     WindowID
133	Resize bool
134	Edges  ResizeEdges
135}
136
137func (WindowMoveRequest) clientEvent() {}
138
139// WindowFullscreenRequest carries wayland → core fullscreen requests.
140// External is set when another client (a taskbar, through foreign
141// toplevel) asks for it, not the window itself.
142type WindowFullscreenRequest struct {
143	ID         WindowID
144	Fullscreen bool
145	External   bool
146}
147
148func (WindowFullscreenRequest) clientEvent() {}
149
150// WindowActivate carries wayland → core a valid xdg-activation request:
151// show the window's workspace and focus it.
152type WindowActivate struct{ ID WindowID }
153
154func (WindowActivate) clientEvent() {}
155
156// WindowAppID carries wayland → core an app ID set after the window mapped.
157type WindowAppID struct {
158	ID    WindowID
159	AppID string
160}
161
162func (WindowAppID) clientEvent() {}
163
164// WindowParent carries the new parent of a mapped dialog (0: none), after
165// set_parent or an xdg-foreign import changed or ended the relationship.
166type WindowParent struct {
167	ID, Parent WindowID
168}
169
170func (WindowParent) clientEvent() {}
171
172// WindowModal carries a mapped dialog's new modal state (xdg_dialog_v1).
173type WindowModal struct {
174	ID    WindowID
175	Modal bool
176}
177
178func (WindowModal) clientEvent() {}
179
180// WindowResized carries wayland → core the new size of a floating window.
181type WindowResized struct {
182	ID            WindowID
183	Width, Height int
184}
185
186func (WindowResized) clientEvent() {}

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 23

Tags 10

↑↓ moveenter openesc close