v0.2.0 80c61e3

config.go RawHistoryFolder

1package domain
2
3import "time"
4
5// MinBarInterval is the minimum supported bar refresh interval.
6const MinBarInterval = time.Second
7
8// DefaultWordSeparators matches tmux's practical shell-oriented word boundaries.
9const DefaultWordSeparators = " -_@"
10
11// ThemeMode selects how vev derives its color scheme.
12type ThemeMode int
13
14const (
15	// ThemeAuto follows the attached client's reported color scheme.
16	ThemeAuto ThemeMode = iota
17	// ThemeDark forces vev's built-in dark palette.
18	ThemeDark
19	// ThemeLight forces vev's built-in light palette.
20	ThemeLight
21)
22
23// ConfigEntry preserves one parsed config key/value in file order.
24type ConfigEntry struct {
25	Key   string
26	Value string
27}
28
29// SnapshotConfig contains user-configurable snapshot restore settings.
30type SnapshotConfig struct {
31	RestoreProcesses    []string
32	RestoreProcessesSet bool
33}
34
35// defaultSnapshotRestoreProcesses is the default allowlist for process restore.
36var defaultSnapshotRestoreProcesses = []string{
37	"vi", "vim", "nvim", "emacs", "man", "less", "more", "tail", "top", "htop", "btop",
38	"claude", "codex", "pi", "opencode",
39}
40
41// DefaultSnapshotRestoreProcesses returns a copy of the default process restore allowlist.
42func DefaultSnapshotRestoreProcesses() []string {
43	return append([]string(nil), defaultSnapshotRestoreProcesses...)
44}
45
46// BarConfig contains user-configurable bar right-anchor settings.
47type BarConfig struct {
48	TopRight    string
49	BottomRight string
50	Interval    time.Duration
51}
52
53// CopyConfig contains copy-mode text selection settings.
54type CopyConfig struct {
55	WordSeparators string
56}
57
58// PaletteConfig contains palette placement settings. A false AnchorSet uses the
59// adaptive automatic placement.
60type PaletteConfig struct {
61	Anchor    Anchor
62	AnchorSet bool
63}
64
65// FloatingConfig contains launch and sizing settings for per-tab floating panes.
66type FloatingConfig struct {
67	Command string
68	Width   int
69	Height  int
70}
71
72// NavConfig contains directional navigation overflow settings.
73type NavConfig struct {
74	OverflowTabs     bool
75	OverflowSessions bool
76}
77
78// TabsConfig contains tab label display settings.
79type TabsConfig struct {
80	// TerminalTitle includes the focused pane's OSC terminal title in tab
81	// labels (top bar and session picker). The process name always shows.
82	TerminalTitle bool
83}
84
85// Config is the user-editable vev configuration after parsing. Unknown binding
86// keys are preserved here (in BindingEntries, in file order) so the usecase
87// layer can decide which actions it understands.
88type Config struct {
89	Theme          ThemeMode
90	ThemePalette   bool
91	ThemeAccent    ThemeAccent
92	Bar            BarConfig
93	BindingEntries []ConfigEntry
94	Codes          map[string]string
95	Snapshot       SnapshotConfig
96	Copy           CopyConfig
97	Palette        PaletteConfig
98	Floating       FloatingConfig
99	Nav            NavConfig
100	Tabs           TabsConfig
101}
102
103// Warning describes a non-fatal config problem. Parsers and reloaders should
104// warn and continue with defaults rather than aborting startup.
105type Warning struct {
106	Line int
107	Msg  string
108}
109
110// Defaults returns vev's default configuration.
111func Defaults() Config {
112	return Config{
113		Theme:        ThemeAuto,
114		ThemePalette: true,
115		ThemeAccent:  ThemeAccent{Mode: ThemeAccentAuto},
116		Bar: BarConfig{
117			Interval: 5 * time.Second,
118		},
119		BindingEntries: []ConfigEntry{},
120		Codes:          map[string]string{},
121		Snapshot: SnapshotConfig{
122			RestoreProcesses: DefaultSnapshotRestoreProcesses(),
123		},
124		Copy: CopyConfig{
125			WordSeparators: DefaultWordSeparators,
126		},
127		Palette: PaletteConfig{
128			Anchor:    AnchorCenter,
129			AnchorSet: true,
130		},
131		Floating: FloatingConfig{
132			Width:  80,
133			Height: 80,
134		},
135		Tabs: TabsConfig{
136			TerminalTitle: true,
137		},
138	}
139}

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 12

Tags 11

↑↓ moveenter openesc close