Skip to content

Add a config option for which side panel is focused on startup - #5878

Open
alcroito wants to merge 2 commits into
jesseduffield:masterfrom
alcroito:initial-side-panel-config
Open

alcroito wants to merge 2 commits into
jesseduffield:masterfrom
alcroito:initial-side-panel-config

Conversation

@alcroito

@alcroito alcroito commented Jul 30, 2026 •

Copy link
Copy Markdown

PR Description

Adds a new option that allows the user to choose which side panel is
focused when lazygit starts or when switching repositories.

The new option takes the same values as the gui.sidePanels setting.
The default "files" value is kept when the option is not set.

Setting a hidden panel as the value is rejected at config validation
time.

Passing a path filter or a git subcommand still overrides the option.

Full disclosure, I wrote this using AI, but I tested that it works locally.

Closes: #5877

Please check if the PR fulfills these requirements

  • Cheatsheets are up-to-date (run go generate ./...)
  • Code has been formatted (see here)
  • Tests have been added/updated (see here for the integration test guide)
  • Text is internationalised (see here)
  • If a new UserConfig entry was added, make sure it can be hot-reloaded (see here)
  • Docs have been updated if necessary
  • You've read through your own file changes for silly mistakes etc

alcroito and others added 2 commits September 16, 2026 17:16
The status context is a plain types.Context rather than a list context,
so it can't be returned as an IListContext. Widening the return type
lets a later change resolve the initial context from any side panel
name. The only caller assigns it to a types.Context and does its own
IListContext assertion where it needs one.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Add a new option that allows the user to choose which side panel is
focused when lazygit starts or when switching repositories.

The new option takes the same values as the gui.sidePanels setting.
The default "files" value is kept when the option is not set.

Setting a hidden panel as the value is rejected at config validation
time.

Passing a path filter or a git subcommand still overrides the option.

Closes: jesseduffield#5877
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
@alcroito
alcroito force-pushed the initial-side-panel-config branch from a98ee2d to 009712b Compare September 16, 2026 15:20

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add option to configure the default focused startup panel

1 participant