Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add screen-mode command line argument #4103

Merged
merged 1 commit into from
Jan 2, 2025

Conversation

alewis001
Copy link
Contributor

Introduce a new "screen-mode" command line argument (-sm normal|half|full / --screen-mode normal|half|full) that allows a user to specify which screen mode (normal, half or full) Lazygit should use when it runs.

This argument will take precedence over a default Window Size specified in user config.

  • PR Description

  • 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

@alewis001 alewis001 force-pushed the cmd-line-view-mode branch 3 times, most recently from a16b800 to 095e17e Compare December 6, 2024 17:51
@jesseduffield
Copy link
Owner

Could I ask what the rationale is behind this? If it's because right now we default to showing e.g. lazygit --filter <path> in full-screen rather than half-screen mode, we should just fix that default behaviour.

@jesseduffield
Copy link
Owner

jesseduffield commented Jan 2, 2025

Actually, funnily enough we need to make use of this for demos anyway: it was the lack of this arg that forced us to set the default to fullscreen in the first place. Not true, you can actually set it in the config.

@jesseduffield
Copy link
Owner

It's a shame we have the config being called WindowSize but elsewhere we call it screen mode. The reality is that screen-mode is better so I'm happy to use that here. I also doubt anybody is even using the config option.

@jesseduffield jesseduffield added the enhancement New feature or request label Jan 2, 2025
Introduce a new "screen-mode" command line argument that allows a user
to specify which screen mode (normal, half or full) Lazygit should use
when it runs.

This argument will take precedence over a default Window Size specified
in user config.
@jesseduffield jesseduffield merged commit 536ef82 into jesseduffield:master Jan 2, 2025
15 checks passed
@jesseduffield
Copy link
Owner

Nice work @alewis001

@alewis001
Copy link
Contributor Author

Oh wow, great, thank you @jesseduffield. I was expecting to have to do more on it, I didn't know what but thought I'd need to do something :) Thank you for merging.

@alewis001 alewis001 deleted the cmd-line-view-mode branch January 2, 2025 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants