ghostty icon indicating copy to clipboard operation
ghostty copied to clipboard

Add `toggle_background_opacity` action for macOS

Open liby opened this issue 1 year ago • 0 comments

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

https://github.com/user-attachments/assets/04f114e0-4035-4b8c-860f-71ef696f2258

Resolves #5047

liby avatar Jan 17 '25 03:01 liby