Binding for toggling window float on top (macOS only)

This adds a keybinding and apprt action for #7237.
This commit is contained in:
Mitchell Hashimoto
2025-05-01 09:29:34 -07:00
parent a6fd499019
commit 6e11d947e7
10 changed files with 173 additions and 60 deletions

View File

@@ -42,6 +42,28 @@ extension Ghostty {
// MARK: Swift Types for C Types
extension Ghostty {
enum SetFloatWIndow {
case on
case off
case toggle
static func from(_ c: ghostty_action_float_window_e) -> Self? {
switch (c) {
case GHOSTTY_FLOAT_WINDOW_ON:
return .on
case GHOSTTY_FLOAT_WINDOW_OFF:
return .off
case GHOSTTY_FLOAT_WINDOW_TOGGLE:
return .toggle
default:
return nil
}
}
}
enum SetSecureInput {
case on
case off