Default to half-screen mode when opening with certain CLI args (#4141)

It should have been half-screen from the get-go. I think I just used
full-screen to make demos look nicer. Now that we have a CLI arg for the
screen mode we can make use of that in the demos.

Relates to https://github.com/jesseduffield/lazygit/issues/3042

- **PR Description**

- **Please check if the PR fulfills these requirements**

* [ ] Cheatsheets are up-to-date (run `go generate ./...`)
* [ ] Code has been formatted (see
[here](https://github.com/jesseduffield/lazygit/blob/master/CONTRIBUTING.md#code-formatting))
* [ ] Tests have been added/updated (see
[here](https://github.com/jesseduffield/lazygit/blob/master/pkg/integration/README.md)
for the integration test guide)
* [ ] Text is internationalised (see
[here](https://github.com/jesseduffield/lazygit/blob/master/CONTRIBUTING.md#internationalisation))
* [ ] If a new UserConfig entry was added, make sure it can be
hot-reloaded (see
[here](https://github.com/jesseduffield/lazygit/blob/master/docs/dev/Codebase_Guide.md#using-userconfig))
* [ ] Docs have been updated if necessary
* [ ] You've read through your own file changes for silly mistakes etc

<!--
Be sure to name your PR with an imperative e.g. 'Add worktrees view'
see https://github.com/jesseduffield/lazygit/releases/tag/v0.40.0 for
examples
-->
This commit is contained in:
Jesse Duffield 2025-01-02 16:44:25 +11:00 committed by GitHub
commit 16a158a025
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 5 additions and 5 deletions

View file

@ -583,7 +583,7 @@ func initialScreenMode(startArgs appTypes.StartArgs, config config.AppConfigurer
if startArgs.ScreenMode != "" { if startArgs.ScreenMode != "" {
return getWindowMaximisation(startArgs.ScreenMode) return getWindowMaximisation(startArgs.ScreenMode)
} else if startArgs.FilterPath != "" || startArgs.GitArg != appTypes.GitArgNone { } else if startArgs.FilterPath != "" || startArgs.GitArg != appTypes.GitArgNone {
return types.SCREEN_FULL return types.SCREEN_HALF
} else { } else {
return getWindowMaximisation(config.GetUserConfig().Gui.WindowSize) return getWindowMaximisation(config.GetUserConfig().Gui.WindowSize)
} }

View file

@ -7,7 +7,7 @@ import (
var Bisect = NewIntegrationTest(NewIntegrationTestArgs{ var Bisect = NewIntegrationTest(NewIntegrationTestArgs{
Description: "Interactive rebase", Description: "Interactive rebase",
ExtraCmdArgs: []string{"log"}, ExtraCmdArgs: []string{"log", "--screen-mode=full"},
Skip: false, Skip: false,
IsDemo: true, IsDemo: true,
SetupConfig: func(config *config.AppConfig) { SetupConfig: func(config *config.AppConfig) {

View file

@ -7,7 +7,7 @@ import (
var CommitGraph = NewIntegrationTest(NewIntegrationTestArgs{ var CommitGraph = NewIntegrationTest(NewIntegrationTestArgs{
Description: "Show commit graph", Description: "Show commit graph",
ExtraCmdArgs: []string{"log"}, ExtraCmdArgs: []string{"log", "--screen-mode=full"},
Skip: false, Skip: false,
IsDemo: true, IsDemo: true,
SetupConfig: func(config *config.AppConfig) { SetupConfig: func(config *config.AppConfig) {

View file

@ -7,7 +7,7 @@ import (
var InteractiveRebase = NewIntegrationTest(NewIntegrationTestArgs{ var InteractiveRebase = NewIntegrationTest(NewIntegrationTestArgs{
Description: "Interactive rebase", Description: "Interactive rebase",
ExtraCmdArgs: []string{"log"}, ExtraCmdArgs: []string{"log", "--screen-mode=full"},
Skip: false, Skip: false,
IsDemo: true, IsDemo: true,
SetupConfig: func(config *config.AppConfig) { SetupConfig: func(config *config.AppConfig) {

View file

@ -7,7 +7,7 @@ import (
var NukeWorkingTree = NewIntegrationTest(NewIntegrationTestArgs{ var NukeWorkingTree = NewIntegrationTest(NewIntegrationTestArgs{
Description: "Nuke the working tree", Description: "Nuke the working tree",
ExtraCmdArgs: []string{"status"}, ExtraCmdArgs: []string{"status", "--screen-mode=full"},
Skip: false, Skip: false,
IsDemo: true, IsDemo: true,
SetupConfig: func(config *config.AppConfig) { SetupConfig: func(config *config.AppConfig) {