95 Commits

Author SHA1 Message Date
Mitchell Hashimoto
b11734bd67 default the title to the ghostty emoji
This only happens if the shell hasn't reported a pwd AND title.
2023-08-04 11:11:15 -07:00
Mitchell Hashimoto
9a079bb5b9 background-blur-radius for macOS 2023-07-03 20:43:53 -07:00
Mitchell Hashimoto
338f89679d apprt: add C API for detecting background transparency per surface 2023-07-03 19:44:06 -07:00
Mitchell Hashimoto
84550f276a macos: make close the terminal button non-destructive
So that "return" works.
2023-07-02 12:38:16 -07:00
Thorsten Ball
8e464db049 Toggle fullscreen on super/ctrl+return, only macOS for now
This fixes or at least is the first step towards #171:

- it adds `cmd/super + return` as the default keybinding to toggle
  fullscreen for currently focused window.
- it adds a keybinding handler to the embedded apprt and then changes
  the macOS app to handle the keybinding by toggling currently focused
  window.
2023-07-02 20:23:49 +02:00
Thorsten Ball
6ff3f62e3a macOS: implement cmd+[0-9] to goto tab
This is my attempt at fixing #63. It works! But:

1. The `NotificationCenter` subscription is triggered once for every
   open tab. That's obviously wrong. But I'm not sure and could use some
   pointers where else to put the subscription. That leads me to...
2. I'm _not_ knowledgable in Swift/AppKit/SwiftUI, so I might have put
   the wrong/right things in the wrong/right places. For example: wasn't
   sure what's to be handled in Swift and what's to be handled by the
   core in Zig.

Would love some pointers :)
2023-07-01 09:08:02 -07:00
Mitchell Hashimoto
de5468e214 scale x, speed up scrolling 2023-06-29 11:47:28 -07:00
Mitchell Hashimoto
32031701b8 core: do high precision scrolling Y calculations 2023-06-29 11:42:43 -07:00
Mitchell Hashimoto
9a40dc4630 macos: build scroll mods value 2023-06-29 11:06:34 -07:00
Mitchell Hashimoto
20f46d5c08 define precision scrolling and momentum structs, C API 2023-06-29 10:38:15 -07:00
Mitchell Hashimoto
e998e053b1 mac: fix split initial focus
When making a split, the window focus doesn't change so the new splits
were defaulting to "false" (not focused). Let's just assume when a
surface is created that it is in fact focused. This generally fixes the
issue.

If we ever programmatically create splits in background windows this
will probably fail so we should find a way on View init to detect if the
window has focus.
2023-05-27 14:37:00 -07:00
Mitchell Hashimoto
f36a35ecc9 core: quit flag is reset after tick 2023-03-27 10:10:06 -07:00
Mitchell Hashimoto
4d41b3ff54 Merge pull request #134 from mitchellh/gtk-confirm
gtk, macos: show confirmation dialog on surface close with active child process
2023-03-26 10:59:09 -07:00
Mitchell Hashimoto
a1831ecacb macos: show close confirmation if running process exists 2023-03-26 10:40:38 -07:00
Mitchell Hashimoto
86c4a8ed7d apprt/embedded: support new process alive callback on close 2023-03-25 16:41:18 -07:00
Mitchell Hashimoto
decaee61b2 apprt/embedded: support unmapped keys 2023-03-25 15:44:17 -07:00
Mitchell Hashimoto
f092cce69e macos: translate ASCII keys 2023-03-25 15:26:04 -07:00
Mitchell Hashimoto
b26e51d222 macos: implement config reloading callback 2023-03-19 09:50:54 -07:00
Mitchell Hashimoto
8d3f40fa41 apprt/embedded: reload config support 2023-03-19 09:50:54 -07:00
Mitchell Hashimoto
c01e8337bd macos: reliable window focus tracking for surface 2023-03-15 21:29:20 -07:00
Mitchell Hashimoto
363a03a30d macos: explicitly free surface resource on split/tab close
We don't wait for Swift to garbage collect. We just free the expensive
stuff (our surface) immediately.
2023-03-15 21:11:52 -07:00
Mitchell Hashimoto
04b1625a68 ghostty.h: fix type usage before declaration 2023-03-15 15:55:52 -07:00
Mitchell Hashimoto
3976da8149 macos: navigate splits directionally 2023-03-11 17:55:31 -08:00
Mitchell Hashimoto
04c38ef3b0 macos: change focus callback to use an enum so we can get other dirs 2023-03-11 17:44:00 -08:00
Mitchell Hashimoto
18cf0dc9fc macos: put next/prev split focus into menu 2023-03-11 17:25:39 -08:00
Mitchell Hashimoto
4a5d92056f macos: hook up previous/next split focus 2023-03-11 17:02:01 -08:00
Mitchell Hashimoto
b582691185 macos: hook up all the bindings so we're ready to handle focus event 2023-03-11 16:22:04 -08:00
Mitchell Hashimoto
a356c62105 macos: properly lose focus on previous split when new split 2023-03-10 15:31:48 -08:00
Mitchell Hashimoto
f85c1c256c macos: menu bar to split 2023-03-10 15:24:45 -08:00
Mitchell Hashimoto
0aadd19282 macos: close surface works 2023-03-10 14:44:33 -08:00
Mitchell Hashimoto
a265e7ce20 macos: take over menu bar, separate close and close window 2023-03-10 14:27:55 -08:00
Mitchell Hashimoto
dc6e5e1437 macos: fix bug where like... 5 terminals were being launched in the
background
2023-03-09 11:40:47 -08:00
Mitchell Hashimoto
bfbd7f1c1b macos: terminal split views handle nested close properly 2023-03-09 11:07:12 -08:00
Mitchell Hashimoto
31378bcaa5 macos: redo all the split views 2023-03-08 22:14:29 -08:00
Mitchell Hashimoto
0388dc35bb macos: set proper window title for focused split 2023-03-08 15:26:58 -08:00
Mitchell Hashimoto
c0315e72f1 macos: nil bottomright when we close it 2023-03-08 15:08:42 -08:00
Mitchell Hashimoto
6c857877e8 apprt/embedded: close surface callback 2023-03-08 15:05:15 -08:00
Mitchell Hashimoto
fa9ee0815f apprt/embedded: newSplit callback 2023-03-08 14:56:50 -08:00
Mitchell Hashimoto
a754fe8c30 macos: little tweaks 2023-03-07 22:09:39 -08:00
Mitchell Hashimoto
508277f823 macos: fix focus on split change 2023-03-07 21:37:36 -08:00
Mitchell Hashimoto
e07a4e6892 macos: comment my split view 2023-03-07 17:04:12 -08:00
Mitchell Hashimoto
4bbb419cb0 macos: use my new split view 2023-03-07 16:51:26 -08:00
Mitchell Hashimoto
d00794de8e macos: working on custom split view 2023-03-07 16:22:00 -08:00
Mitchell Hashimoto
1faca5972f macos: change key window detection 2023-03-06 21:53:22 -08:00
Mitchell Hashimoto
1a3cd852f9 macos: massive reorg 2023-03-06 21:28:09 -08:00