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 toggle_background_opacity keybind action #5047

Open
mitchellh opened this issue Jan 14, 2025 · 0 comments · May be fixed by #5170
Open

Add toggle_background_opacity keybind action #5047

mitchellh opened this issue Jan 14, 2025 · 0 comments · May be fixed by #5170

Comments

@mitchellh
Copy link
Contributor

Discussed in #4664

Originally posted by yanskun January 5, 2025
I like to use the terminal with a transparent background.
However, when sharing a screen for pair programming, etc., it seems that noise can be introduced depending on the other person, so I would like to be able to easily turn off transparency.

iTerm has a Toggle Transparency feature that allows you to switch between custom opacity and non-transparent by pressing cmd + u.
https://stackoverflow.com/questions/34159559/toggle-opacity-with-hotkey-in-terminal-iterm#:~:text=cmd%20%2B%20u%20toggles%20the%20transparency.

Does Ghostty have it?

Since Alacritty doesn't seem to have this feature, I prepared a shell script to change the config directly.

If Ghostty doesn't have this feature, I'll prepare a Shell Script.
However, if Ghostty has it, I'd like to use it.
(If I get excited, I'd like to implement it directly in Ghostty and submit a PR.)

Proposal

Add a new keybind action toggle_background_opacity. This does nothing if background-opacity is 1+.

If background-opacity is less than 1, then this will either set the window transparent or not depending on its current state.

When reloading the config, it is acceptable that background opacity is reapplied. This will make implementing this easier.

This should be implemented for macOS, X11, and Wayland.

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 a pull request may close this issue.

1 participant