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 action for macOS #5170

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

liby
Copy link
Contributor

@liby liby commented Jan 17, 2025

Changes

  • Added ghosttyBackgroundOpacityDidToggle notification for handling opacity toggle events

  • Implemented opacity toggle logic in SurfaceView_AppKit.swift

  • If background-opacity is 1 or greater, do nothing

Testing

  1. Set background-opacity < 1 in config

  2. Bind a key to toggle_background_opacity action

  3. Press the key to toggle between transparent and opaque states

  4. Verify that:

    • Window properly toggles between transparent and opaque states

    • Background color is correct in both states

    • Action does nothing when background-opacity is 1 or more

    • Action does nothing in fullscreen mode

demo.mp4

Resolves #5047

@liby liby force-pushed the feature/macos-toggle-background-opacity branch from 149ed06 to 354bd2f Compare January 17, 2025 21:16
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 toggle_background_opacity keybind action
1 participant