v0.33.1 9577fee

schema.go RawHistoryFolder

1package config
2
3import "github.com/bnema/dumber/internal/domain/entity"
4
5// Type aliases for config value types now defined in domain/entity.
6// These aliases keep all existing config-package callers working without
7// any changes to their import paths.
8
9// AppearanceConfig holds UI/rendering preferences.
10type AppearanceConfig = entity.AppearanceConfig
11
12// ColorPalette contains semantic color tokens for light/dark themes.
13type ColorPalette = entity.ColorPalette
14
15// ActionBinding defines a keybinding with optional description.
16type ActionBinding = entity.ActionBinding
17
18// PrefixModeConfig defines the tmux-style one-shot prefix.
19type PrefixModeConfig = entity.PrefixModeConfig
20
21// KeymapPreset selects how workspace modes are activated.
22type KeymapPreset = entity.KeymapPreset
23
24const (
25	KeymapZellij = entity.KeymapZellij
26	KeymapTmux   = entity.KeymapTmux
27)
28
29// PaneModeConfig defines modal behavior for pane management.
30type PaneModeConfig = entity.PaneModeConfig
31
32// TabModeConfig defines modal behavior for tab management (Zellij-style).
33type TabModeConfig = entity.TabModeConfig
34
35// ResizeModeConfig defines modal behavior for resizing panes (Zellij-style).
36type ResizeModeConfig = entity.ResizeModeConfig
37
38// VimModeConfig defines modal behavior for Vim-style scrolling.
39type VimModeConfig = entity.VimModeConfig
40
41// SessionModeConfig defines modal behavior for session management.
42type SessionModeConfig = entity.SessionModeConfig
43
44// SessionConfig holds session persistence settings.
45type SessionConfig = entity.SessionConfig
46
47// GlobalShortcutsConfig defines global shortcuts (always active, not modal).
48type GlobalShortcutsConfig = entity.GlobalShortcutsConfig
49
50// FloatingPaneProfile defines a shortcut profile that opens a URL in the floating pane.
51type FloatingPaneProfile = entity.FloatingPaneProfile
52
53// FloatingPaneConfig defines persistent floating pane behavior.
54type FloatingPaneConfig = entity.FloatingPaneConfig
55
56// WorkspaceStylingConfig defines visual styling for workspace panes.
57type WorkspaceStylingConfig = entity.WorkspaceStylingConfig
58
59// ExternalLinkBehavior defines how externally opened URLs are placed in the workspace.
60type ExternalLinkBehavior = entity.ExternalLinkBehavior
61
62const (
63	ExternalLinkBehaviorWindowed = entity.ExternalLinkBehaviorWindowed
64	ExternalLinkBehaviorTabbed   = entity.ExternalLinkBehaviorTabbed
65	ExternalLinkBehaviorSplit    = entity.ExternalLinkBehaviorSplit
66	ExternalLinkBehaviorStacked  = entity.ExternalLinkBehaviorStacked
67)
68
69// ExternalLinkPlacement defines the direction used when splitting for an external URL.
70type ExternalLinkPlacement = entity.ExternalLinkPlacement
71
72const (
73	ExternalLinkPlacementRight  = entity.ExternalLinkPlacementRight
74	ExternalLinkPlacementLeft   = entity.ExternalLinkPlacementLeft
75	ExternalLinkPlacementTop    = entity.ExternalLinkPlacementTop
76	ExternalLinkPlacementBottom = entity.ExternalLinkPlacementBottom
77)
78
79// ExternalLinksConfig controls how externally opened URLs are placed in the workspace.
80type ExternalLinksConfig = entity.ExternalLinksConfig
81
82// PopupBehavior defines how popup windows should be opened.
83type PopupBehavior = entity.PopupBehavior
84
85const (
86	// PopupBehaviorSplit opens popups in a split pane (default)
87	PopupBehaviorSplit = entity.PopupBehaviorSplit
88	// PopupBehaviorStacked opens popups in a stacked pane
89	PopupBehaviorStacked = entity.PopupBehaviorStacked
90	// PopupBehaviorTabbed opens popups as a new tab
91	PopupBehaviorTabbed = entity.PopupBehaviorTabbed
92	// PopupBehaviorWindowed opens popups in a new workspace window
93	PopupBehaviorWindowed = entity.PopupBehaviorWindowed
94)
95
96// OmniboxInitialBehavior defines how omnibox history is ordered on open.
97type OmniboxInitialBehavior = entity.OmniboxInitialBehavior
98
99const (
100	// OmniboxInitialBehaviorRecent shows recent visits first.
101	OmniboxInitialBehaviorRecent = entity.OmniboxInitialBehaviorRecent
102	// OmniboxInitialBehaviorMostVisited shows most visited sites first.
103	OmniboxInitialBehaviorMostVisited = entity.OmniboxInitialBehaviorMostVisited
104	// OmniboxInitialBehaviorNone shows no initial history.
105	OmniboxInitialBehaviorNone = entity.OmniboxInitialBehaviorNone
106)
107
108// BrowsingContextConfig defines handling for browsing contexts (popups, tabs, new windows).
109type BrowsingContextConfig = entity.BrowsingContextConfig
110
111// Deprecated: PopupBehaviorConfig is a compatibility alias for BrowsingContextConfig.
112type PopupBehaviorConfig = entity.BrowsingContextConfig
113
114// WorkspaceConfig captures layout, pane, and tab behavior preferences.
115type WorkspaceConfig = entity.WorkspaceConfig
116
117// UpdateConfig holds automatic update settings.
118type UpdateConfig = entity.UpdateConfig
119
120// Config represents the complete configuration for dumber.
121type Config struct {
122	Database        DatabaseConfig            `mapstructure:"database" yaml:"database" toml:"database"`
123	History         HistoryConfig             `mapstructure:"history" yaml:"history" toml:"history"`
124	SearchShortcuts map[string]SearchShortcut `mapstructure:"search_shortcuts" yaml:"search_shortcuts" toml:"search_shortcuts"`
125	// DefaultSearchEngine is the URL template for the default search engine (must contain %s placeholder)
126	DefaultSearchEngine string           `mapstructure:"default_search_engine" yaml:"default_search_engine" toml:"default_search_engine"`
127	Dmenu               DmenuConfig      `mapstructure:"dmenu" yaml:"dmenu" toml:"dmenu"`
128	Logging             LoggingConfig    `mapstructure:"logging" yaml:"logging" toml:"logging"`
129	Appearance          AppearanceConfig `mapstructure:"appearance" yaml:"appearance" toml:"appearance"`
130	Debug               DebugConfig      `mapstructure:"debug" yaml:"debug" toml:"debug"`
131	// DefaultWebpageZoom sets the default zoom level for pages without saved zoom settings (1.0 = 100%, 1.2 = 120%)
132	DefaultWebpageZoom float64 `mapstructure:"default_webpage_zoom" yaml:"default_webpage_zoom" toml:"default_webpage_zoom"`
133	// DefaultUIScale sets the default UI scale for GTK widgets (1.0 = 100%, 2.0 = 200%)
134	DefaultUIScale float64 `mapstructure:"default_ui_scale" yaml:"default_ui_scale" toml:"default_ui_scale"`
135	// SidebarWidth sets the preferred width (px) for the history sidebar.
136	// Clamped to [280, 380] at runtime. 0 means use default (320).
137	SidebarWidth int `mapstructure:"sidebar_width" yaml:"sidebar_width" toml:"sidebar_width"`
138	// Workspace defines workspace, pane, and tab handling behavior.
139	Workspace WorkspaceConfig `mapstructure:"workspace" yaml:"workspace" toml:"workspace"`
140	// Session controls session persistence and restoration.
141	Session SessionConfig `mapstructure:"session" yaml:"session" toml:"session"`
142	// ContentFiltering controls ad blocking and content filtering
143	ContentFiltering ContentFilteringConfig `mapstructure:"content_filtering" yaml:"content_filtering" toml:"content_filtering"`
144	// Clipboard controls clipboard-related behavior
145	Clipboard ClipboardConfig `mapstructure:"clipboard" yaml:"clipboard" toml:"clipboard"`
146	// Omnibox controls the omnibox behavior (initial history display)
147	Omnibox OmniboxConfig `mapstructure:"omnibox" yaml:"omnibox" toml:"omnibox"`
148	// Media controls video playback and hardware acceleration
149	Media MediaConfig `mapstructure:"media" yaml:"media" toml:"media"`
150	// Update controls automatic update checking and downloading.
151	Update UpdateConfig `mapstructure:"update" yaml:"update" toml:"update"`
152	// Downloads configures file download behavior.
153	Downloads DownloadsConfig `mapstructure:"downloads" yaml:"downloads" toml:"downloads"`
154	// Engine holds engine selection and unified engine options.
155	Engine EngineConfig `mapstructure:"engine" toml:"engine" yaml:"engine"`
156}
157
158// CookiePolicy controls cookie acceptance behavior.
159type CookiePolicy string
160
161const (
162	// CookiePolicyAlways accepts all cookies.
163	CookiePolicyAlways CookiePolicy = "always"
164	// CookiePolicyNoThirdParty blocks third-party cookies.
165	CookiePolicyNoThirdParty CookiePolicy = "no_third_party"
166	// CookiePolicyNever blocks all cookies.
167	CookiePolicyNever CookiePolicy = "never"
168)
169
170// GSKRendererMode controls the GTK Scene Kit renderer selection.
171type GSKRendererMode string
172
173const (
174	GSKRendererAuto   GSKRendererMode = "auto"
175	GSKRendererOpenGL GSKRendererMode = "opengl"
176	GSKRendererVulkan GSKRendererMode = "vulkan"
177	GSKRendererCairo  GSKRendererMode = "cairo"
178)
179
180// HardwareDecodingMode controls video hardware acceleration.
181type HardwareDecodingMode string
182
183const (
184	// HardwareDecodingAuto lets GStreamer choose (hw preferred, sw fallback)
185	HardwareDecodingAuto HardwareDecodingMode = "auto"
186	// HardwareDecodingForce requires hardware decoding (fails if unavailable)
187	HardwareDecodingForce HardwareDecodingMode = "force"
188	// HardwareDecodingDisable uses software decoding only
189	HardwareDecodingDisable HardwareDecodingMode = "disable"
190)
191
192// GLRenderingMode controls OpenGL API selection for video rendering.
193type GLRenderingMode string
194
195const (
196	// GLRenderingModeAuto lets GStreamer choose the best GL API
197	GLRenderingModeAuto GLRenderingMode = "auto"
198	// GLRenderingModeGLES2 forces GLES2 (better for some mobile/embedded GPUs)
199	GLRenderingModeGLES2 GLRenderingMode = "gles2"
200	// GLRenderingModeGL3 forces OpenGL 3.x desktop
201	GLRenderingModeGL3 GLRenderingMode = "gl3"
202	// GLRenderingModeNone disables GL-based rendering
203	GLRenderingModeNone GLRenderingMode = "none"
204)
205
206// PerformanceProfile selects preset performance tuning settings.
207type PerformanceProfile string
208
209const (
210	// ProfileDefault uses WebKit defaults (no tuning applied).
211	ProfileDefault PerformanceProfile = "default"
212	// ProfileLite reduces resource usage for low-RAM systems.
213	ProfileLite PerformanceProfile = "lite"
214	// ProfileBalanced is a conservative compatibility preset between lite and max.
215	ProfileBalanced PerformanceProfile = "balanced"
216	// ProfileMax maximizes responsiveness for heavy pages (GitHub PRs, etc).
217	ProfileMax PerformanceProfile = "max"
218	// ProfileCustom allows full control over individual performance settings.
219	ProfileCustom PerformanceProfile = "custom"
220)
221
222// ThemeDefault is the default theme setting (follows system).
223const ThemeDefault = "default"
224
225const (
226	// ThemePreferDark explicitly selects dark theme.
227	ThemePreferDark = "prefer-dark"
228	// ThemePreferLight explicitly selects light theme.
229	ThemePreferLight = "prefer-light"
230)
231
232// MediaConfig holds video playback and hardware acceleration preferences.
233type MediaConfig struct {
234	// HardwareDecodingMode controls hardware vs software video decoding
235	// Values: "auto" (default), "force", "disable"
236	HardwareDecodingMode HardwareDecodingMode `mapstructure:"hardware_decoding" yaml:"hardware_decoding" toml:"hardware_decoding"`
237	// PreferAV1 prioritizes AV1 codec (most efficient) when available
238	PreferAV1 bool `mapstructure:"prefer_av1" yaml:"prefer_av1" toml:"prefer_av1"`
239	// ShowDiagnosticsOnStartup shows media capability warnings at startup
240	ShowDiagnosticsOnStartup bool `mapstructure:"show_diagnostics" yaml:"show_diagnostics" toml:"show_diagnostics"`
241	// ForceVSync forces vertical sync for video playback (may help with tearing).
242	//
243	// Deprecated: moved to [engine.webkit]. Kept for read compatibility during migration.
244	ForceVSync bool `mapstructure:"force_vsync" yaml:"force_vsync" toml:"-"`
245	// GLRenderingMode controls OpenGL API selection for video rendering.
246	// Values: "auto" (default), "gles2", "gl3", "none"
247	//
248	// Deprecated: moved to [engine.webkit]. Kept for read compatibility during migration.
249	GLRenderingMode GLRenderingMode `mapstructure:"gl_rendering_mode" yaml:"gl_rendering_mode" toml:"-"`
250	// GStreamerDebugLevel sets GStreamer debug verbosity (0=off, 1-5=increasing verbosity).
251	//
252	// Deprecated: moved to [engine.webkit]. Kept for read compatibility during migration.
253	GStreamerDebugLevel int `mapstructure:"gstreamer_debug_level" yaml:"gstreamer_debug_level" toml:"-"`
254}
255
256// DatabaseConfig holds database-related configuration.
257type DatabaseConfig struct {
258	Path string `mapstructure:"path" yaml:"path" toml:"path"`
259}
260
261// HistoryConfig holds history-related configuration.
262type HistoryConfig struct {
263	MaxEntries          int `mapstructure:"max_entries" yaml:"max_entries" toml:"max_entries"`
264	RetentionPeriodDays int `mapstructure:"retention_period_days" yaml:"retention_period_days" toml:"retention_period_days"`
265	CleanupIntervalDays int `mapstructure:"cleanup_interval_days" yaml:"cleanup_interval_days" toml:"cleanup_interval_days"`
266}
267
268// PerformanceConfig holds internal performance tuning options.
269// These are not exposed in dumb://config UI but can be set in config file.
270type PerformanceConfig struct {
271	// Profile selects a preset performance configuration.
272	// Values: "default" (no tuning), "lite" (low RAM), "balanced" (compatibility), "max" (heavy pages), "custom" (manual control)
273	// When profile is not "custom", individual tuning fields below are ignored and computed from the profile.
274	// Default: "default"
275	Profile PerformanceProfile `mapstructure:"profile" yaml:"profile" toml:"profile"`
276
277	// ZoomCacheSize is the number of domain zoom levels to cache in memory.
278	// Higher values reduce database queries but use more memory.
279	// Default: 256 domains (~20KB memory)
280	ZoomCacheSize int `mapstructure:"zoom_cache_size" yaml:"zoom_cache_size" toml:"zoom_cache_size"`
281
282	// WebViewPoolPrewarmCount is the number of WebViews to pre-create at startup.
283	// Higher values speed up initial tab creation but use more memory.
284	// Default: 4 (custom mode), computed from profile otherwise
285	WebViewPoolPrewarmCount int `mapstructure:"webview_pool_prewarm_count" yaml:"webview_pool_prewarm_count" toml:"webview_pool_prewarm_count"` //nolint:lll // struct tags must stay on one line
286
287	// --- Skia rendering threads (env vars) ---
288	// NOTE: Fields below only apply when Profile is "custom".
289	// SkiaCPUPaintingThreads sets WEBKIT_SKIA_CPU_PAINTING_THREADS.
290	// Default: 0 (unset, uses WebKit default)
291	SkiaCPUPaintingThreads int `mapstructure:"skia_cpu_painting_threads" yaml:"skia_cpu_painting_threads" toml:"skia_cpu_painting_threads"` //nolint:lll // struct tags must stay on one line
292
293	// SkiaGPUPaintingThreads sets WEBKIT_SKIA_GPU_PAINTING_THREADS.
294	// Default: -1 (unset). Value 0 disables GPU tile painting.
295	SkiaGPUPaintingThreads int `mapstructure:"skia_gpu_painting_threads" yaml:"skia_gpu_painting_threads" toml:"skia_gpu_painting_threads"` //nolint:lll // struct tags must stay on one line
296
297	// SkiaEnableCPURendering forces CPU rendering via WEBKIT_SKIA_ENABLE_CPU_RENDERING=1.
298	// Default: false
299	SkiaEnableCPURendering bool `mapstructure:"skia_enable_cpu_rendering" yaml:"skia_enable_cpu_rendering" toml:"skia_enable_cpu_rendering"` //nolint:lll // struct tags must stay on one line
300
301	// --- Web process memory pressure ---
302	// WebProcessMemoryLimitMB sets memory limit in MB for web processes.
303	// Default: 0 (unset, uses WebKit default: system RAM capped at 3GB)
304	WebProcessMemoryLimitMB int `mapstructure:"web_process_memory_limit_mb" yaml:"web_process_memory_limit_mb" toml:"web_process_memory_limit_mb"` //nolint:lll // struct tags must stay on one line
305
306	// WebProcessMemoryPollIntervalSec sets poll interval for memory checks.
307	// Default: 0 (unset, uses WebKit default: 30 seconds)
308	WebProcessMemoryPollIntervalSec float64 `mapstructure:"web_process_memory_poll_interval_sec" yaml:"web_process_memory_poll_interval_sec" toml:"web_process_memory_poll_interval_sec"` //nolint:lll // struct tags must stay on one line
309
310	// WebProcessMemoryConservativeThreshold sets threshold for conservative memory release.
311	// Valid: (0, 1). Default: 0 (unset, uses WebKit default: 0.33)
312	WebProcessMemoryConservativeThreshold float64 `mapstructure:"web_process_memory_conservative_threshold" yaml:"web_process_memory_conservative_threshold" toml:"web_process_memory_conservative_threshold"` //nolint:lll // struct tags must stay on one line
313
314	// WebProcessMemoryStrictThreshold sets threshold for strict memory release.
315	// Valid: (0, 1). Default: 0 (unset, uses WebKit default: 0.5)
316	WebProcessMemoryStrictThreshold float64 `mapstructure:"web_process_memory_strict_threshold" yaml:"web_process_memory_strict_threshold" toml:"web_process_memory_strict_threshold"` //nolint:lll // struct tags must stay on one line
317
318	// --- Network process memory pressure ---
319	// NetworkProcessMemoryLimitMB sets memory limit in MB for network process.
320	// Default: 0 (unset)
321	NetworkProcessMemoryLimitMB int `mapstructure:"network_process_memory_limit_mb" yaml:"network_process_memory_limit_mb" toml:"network_process_memory_limit_mb"` //nolint:lll // struct tags must stay on one line
322
323	// NetworkProcessMemoryPollIntervalSec sets poll interval for memory checks.
324	// Default: 0 (unset)
325	NetworkProcessMemoryPollIntervalSec float64 `mapstructure:"network_process_memory_poll_interval_sec" yaml:"network_process_memory_poll_interval_sec" toml:"network_process_memory_poll_interval_sec"` //nolint:lll // struct tags must stay on one line
326
327	// NetworkProcessMemoryConservativeThreshold sets threshold for conservative memory release.
328	// Valid: (0, 1). Default: 0 (unset)
329	NetworkProcessMemoryConservativeThreshold float64 `mapstructure:"network_process_memory_conservative_threshold" yaml:"network_process_memory_conservative_threshold" toml:"network_process_memory_conservative_threshold"` //nolint:lll // struct tags must stay on one line
330
331	// NetworkProcessMemoryStrictThreshold sets threshold for strict memory release.
332	// Valid: (0, 1). Default: 0 (unset)
333	NetworkProcessMemoryStrictThreshold float64 `mapstructure:"network_process_memory_strict_threshold" yaml:"network_process_memory_strict_threshold" toml:"network_process_memory_strict_threshold"` //nolint:lll // struct tags must stay on one line
334}
335
336// SearchShortcut represents a search shortcut configuration.
337type SearchShortcut struct {
338	URL         string `mapstructure:"url" toml:"url" yaml:"url" json:"url"`
339	Description string `mapstructure:"description" toml:"description" yaml:"description" json:"description"`
340}
341
342// ShortcutURLs returns a simple map of shortcut keys to URL templates.
343// This is useful for passing to url.BuildSearchURL.
344func (c *Config) ShortcutURLs() map[string]string {
345	result := make(map[string]string, len(c.SearchShortcuts))
346	for key, shortcut := range c.SearchShortcuts {
347		result[key] = shortcut.URL
348	}
349	return result
350}
351
352// DmenuConfig holds dmenu/rofi integration configuration.
353type DmenuConfig struct {
354	MaxHistoryDays   int    `mapstructure:"max_history_days" yaml:"max_history_days" toml:"max_history_days"`
355	ShowVisitCount   bool   `mapstructure:"show_visit_count" yaml:"show_visit_count" toml:"show_visit_count"`
356	ShowLastVisited  bool   `mapstructure:"show_last_visited" yaml:"show_last_visited" toml:"show_last_visited"`
357	HistoryPrefix    string `mapstructure:"history_prefix" yaml:"history_prefix" toml:"history_prefix"`
358	ShortcutPrefix   string `mapstructure:"shortcut_prefix" yaml:"shortcut_prefix" toml:"shortcut_prefix"`
359	URLPrefix        string `mapstructure:"url_prefix" yaml:"url_prefix" toml:"url_prefix"`
360	DateFormat       string `mapstructure:"date_format" yaml:"date_format" toml:"date_format"`
361	SortByVisitCount bool   `mapstructure:"sort_by_visit_count" yaml:"sort_by_visit_count" toml:"sort_by_visit_count"`
362}
363
364// LoggingConfig holds logging configuration.
365type LoggingConfig struct {
366	Level    string `mapstructure:"level" yaml:"level" toml:"level"`
367	Format   string `mapstructure:"format" yaml:"format" toml:"format"`
368	MaxAge   int    `mapstructure:"max_age" yaml:"max_age" toml:"max_age"`
369	MaxFiles int    `mapstructure:"max_files" yaml:"max_files" toml:"max_files"`
370
371	// File output configuration
372	LogDir        string `mapstructure:"log_dir" yaml:"log_dir" toml:"log_dir"`
373	EnableFileLog bool   `mapstructure:"enable_file_log" yaml:"enable_file_log" toml:"enable_file_log"`
374
375	// Capture browser console to logs
376	CaptureConsole bool `mapstructure:"capture_console" yaml:"capture_console" toml:"capture_console" json:"capture_console"`
377
378	// Capture GTK4/WebKitGTK6 messages to session logs
379	CaptureGTKLogs bool `mapstructure:"capture_gtk_logs" yaml:"capture_gtk_logs" toml:"capture_gtk_logs" json:"capture_gtk_logs"`
380}
381
382// ContentFilteringConfig holds content filtering and ad blocking preferences
383type ContentFilteringConfig struct {
384	// Enabled controls whether ad blocking is active (default: true)
385	Enabled bool `mapstructure:"enabled" yaml:"enabled" toml:"enabled"`
386	// AutoUpdate controls whether filters are automatically updated (default: true)
387	AutoUpdate bool `mapstructure:"auto_update" yaml:"auto_update" toml:"auto_update"`
388	// Note: Filters are downloaded from bnema/ublock-webkit-filters GitHub releases
389	// Note: Whitelist is managed via database (content_whitelist table)
390}
391
392// ClipboardConfig holds clipboard-related behavior preferences
393type ClipboardConfig struct {
394	// AutoCopyOnSelection automatically copies selected text to clipboard (zellij-style).
395	// When enabled, selecting text in a webview immediately copies it to clipboard.
396	// Does not apply to text selection in input fields or textareas.
397	// Default: true
398	AutoCopyOnSelection bool `mapstructure:"auto_copy_on_selection" yaml:"auto_copy_on_selection" toml:"auto_copy_on_selection" json:"autoCopyOnSelection"` //nolint:lll // struct tags must stay on one line
399}
400
401// OmniboxConfig holds omnibox behavior preferences
402type OmniboxConfig struct {
403	// Style selects the omnibox visual treatment: "multiplexer", "command", or "minimal".
404	Style string `mapstructure:"style" yaml:"style" toml:"style"`
405	// InitialBehavior controls what to show when omnibox opens with empty input
406	// Values: "recent" (recent visits), "most_visited" (most visited sites), "none" (nothing)
407	InitialBehavior OmniboxInitialBehavior `mapstructure:"initial_behavior" yaml:"initial_behavior" toml:"initial_behavior"`
408	// MaxHistoryDays controls how many days of history the omnibox considers for
409	// typed searches and for the empty-input initial list (recent or most_visited).
410	// 0 means all stored history.
411	// Default: 30.
412	MaxHistoryDays int `mapstructure:"max_history_days" yaml:"max_history_days" toml:"max_history_days"`
413	// AutoOpenOnNewPane opens the omnibox automatically when a new pane is created.
414	// Default: false
415	AutoOpenOnNewPane bool `mapstructure:"auto_open_on_new_pane" yaml:"auto_open_on_new_pane" toml:"auto_open_on_new_pane"`
416}
417
418// DebugConfig holds debug and troubleshooting options
419type DebugConfig struct {
420	// Enable browser developer tools (F12, Inspect Element in context menu)
421	EnableDevTools bool `mapstructure:"enable_devtools" yaml:"enable_devtools" toml:"enable_devtools"`
422}
423
424// DownloadsConfig holds file download preferences.
425type DownloadsConfig struct {
426	// Path is the directory where downloads are saved.
427	// Empty string means use XDG_DOWNLOAD_DIR or ~/Downloads.
428	Path string `mapstructure:"path" yaml:"path" toml:"path"`
429}

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 8

Tags 42

↑↓ moveenter openesc close