state.go RawHistoryFolder

1package ports
2
3// State carries core → state publisher a snapshot of what is on screen, for
4// scripts (bars, status lines). Workspace numbers count from 1.
5type State struct {
6	// Output is the focused output; "" before the first one.
7	Output  string
8	Outputs []OutputState
9	// Window is the focused window, nil when none.
10	Window  *WindowState
11	Windows []WindowState
12}
13
14// OutputState is one output: its workspace on screen and how many numbered
15// workspaces it has. Active is 0 while a hidden (named) workspace is shown.
16type OutputState struct {
17	Name      string
18	Active    int
19	Count     int
20	Workspace string // configured name of the workspace on screen, "" if unnamed
21	// WorkspaceID is the core ID of the workspace on screen (WorkspaceInfo.ID).
22	WorkspaceID uint64
23}
24
25// WindowState is one mapped window and where it is.
26type WindowState struct {
27	ID     WindowID
28	AppID  string
29	PID    int
30	Output string
31	// Workspace is the window's numbered workspace, 0 for a hidden one.
32	Workspace int
33	// WorkspaceID is the core ID of the window's workspace, numbered or not
34	// (WorkspaceInfo.ID); WorkspaceName is its configured name, "" for a
35	// dynamic one (WorkspaceInfo.Configured).
36	WorkspaceID   uint64
37	WorkspaceName string
38	// Visible means on the workspace on screen (it may be behind a
39	// fullscreen window).
40	Visible bool
41	// IdleInhibit is set while the window keeps the session from idling.
42	IdleInhibit bool `json:",omitempty"`
43	// Floating is set for native floats and stashed windows.
44	Floating bool
45	// StashIndex is the 1-based place of a stashed window in its stash of
46	// StashCount windows; both are 0 outside the stash.
47	StashIndex, StashCount int
48	// Hidden is set for a stashed window while its stash is hidden.
49	Hidden bool
50}

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 25

Tags 10

↑↓ moveenter openesc close