4795 Commits

Author SHA1 Message Date
Mitchell Hashimoto
47367bed19 Merge pull request #1279 from jcollie/rgb-names
add ability to specify RGB colors as names from the X11 rgb name list
2024-01-10 20:54:27 -08:00
Mitchell Hashimoto
c551e43374 mark rgb.txt as vendored 2024-01-10 20:46:12 -08:00
Mitchell Hashimoto
02c0ceab11 cli: list-colors uses new generated rgb 2024-01-10 20:43:22 -08:00
Mitchell Hashimoto
5216b4cfe9 build: remove generate_rgb_names 2024-01-10 20:40:21 -08:00
Mitchell Hashimoto
cf8763561d terminal: use comptime generated X11 lookup table from rgb.txt 2024-01-10 20:36:47 -08:00
Jeffrey C. Ollie
bc1544a3f0 add ability to specify RGB colors as names from the X11 rgb name list 2024-01-10 20:26:59 -08:00
Mitchell Hashimoto
c24d7d6de6 pkg/harfbuzz: get zig build test working on macOS 2024-01-10 20:26:41 -08:00
Mitchell Hashimoto
846487cd44 Merge pull request #1278 from gpanders/x11-gtk-mods
gtk: use modifier state from GTK key event on X11
2024-01-10 15:15:49 -08:00
Gregory Anders
d059c57440 gtk: use modifier state from GTK key event on X11
On X11 gdk_device_get_modifier_state does not correctly return the
modifier state, while the modifier state passed to the key callback
does. On Wayland, the situation is exactly reversed.

Therefore on X11 we use the mods provided by the key callback and on
Wayland we continue to get the modifier state from the device.

`App.modifier_state_from_xkb` is removed since we can lift the
conditional out of the function call (we would need to make a second,
redundant check for the presence of `x11_xkb` otherwise).
2024-01-10 16:26:53 -06:00
Mitchell Hashimoto
a63c7e8159 Merge pull request #1273 from mitchellh/macos-sdk
build: use Xcode to find macOS SDK
2024-01-10 13:53:16 -08:00
Mitchell Hashimoto
af3cdf0f84 Merge pull request #1276 from mitchellh/mrn/fix-cascade-glitch
macos: stop windows glitching when cascading
2024-01-10 09:37:49 -08:00
Mitchell Hashimoto
88c525d593 macos: minor style changes 2024-01-10 09:37:36 -08:00
Mitchell Hashimoto
5bca3a4044 pkg/apple-sdk: only exec to get xcode path once per build 2024-01-10 09:35:37 -08:00
Mitchell Hashimoto
41de9c6e97 pkg/apple-sdk: depend on macOS 14 SDK 2024-01-10 09:32:24 -08:00
Mitchell Hashimoto
507a55ba3f Merge pull request #1253 from jcollie/enquiry
implement enquiry/answerback
2024-01-10 09:29:10 -08:00
Thorsten Ball
3e811dad2c macos: stop windows glitching when cascading
Noticed that windows glitch when cascading: they show up in center of
screen, then quickly move to the correct position at last-cascade point.

This fixes the issue, by moving the `showWindow` call to _after_ the
setting of the last cascade point.

Now if you look at the code and think: "shouldn't this work without the
async-dispatch, like this?"

```swift
if (!window.styleMask.contains(.fullScreen)) {
    Self.lastCascadePoint = window.cascadeTopLeft(from: Self.lastCascadePoint)
}
c.showWindow(self)
```

Then, yes, I had the same thought, but it doesn't. And as discussed on
Discord, we probably don't know what's going on behind the scenes.

So this is the simplified code of the version we have to live with:
async dispatching the cascade and non-cascade versions both.
2024-01-10 18:28:19 +01:00
Mitchell Hashimoto
60b1b0a8de termio/exec: assign arena last so we capture allocations 2024-01-10 09:26:10 -08:00
Mitchell Hashimoto
ecb1674860 Merge pull request #1275 from gpanders/x11-super-mods
x11: fix modifier mask for Super key
2024-01-10 09:21:56 -08:00
Mitchell Hashimoto
4b6c2f86a7 termio/exec: remove a bunch of state that is duplicated on StreamHandler
A lot of the state that we put on Exec is just there to copy to
StreamHandler, but we already have it in DerivedConfig. I think this
whole copy copy copy is just legacy cruft since termio.Exec is one of
the older parts of the source code.

This rearchitects the Exec struct to act more like Surface and Renderer
where it stores its derived config. This lets us avoid a few extra
allocations and removes a LOT of struct member noise from termio.Exec.

For pointer lifetimes, the memory allocated is now owned by
DerivedConfig. When changeConfig is called, its the only time BOTH are
still alive, so we can safely swap pointers and deinit without having to
duplicate across threads. This is the same as renderer/surface.
2024-01-10 09:15:55 -08:00
Gregory Anders
36a5965eea x11: fix modifier mask for Super key
Mod4 is "Super" in X11, verified via the `xmodmap` command:

    xmodmap:  up to 4 keys per modifier, (keycodes in parentheses):

    shift       Shift_L (0x32),  Shift_R (0x3e)
    lock        Caps_Lock (0x42)
    control     Control_L (0x25),  Caps_Lock (0x42),  Control_R (0x69)
    mod1        Alt_L (0x85),  Alt_R (0x86),  Alt_L (0xcc),  Meta_L (0xcd)
    mod2        Num_Lock (0x4d)
    mod3        ISO_Level5_Shift (0xcb)
    mod4        Super_L (0x40),  Super_R (0x6c),  Super_L (0xce),  Hyper_L (0xcf)
    mod5        ISO_Level3_Shift (0x5c)
2024-01-10 10:15:39 -06:00
Mitchell Hashimoto
7e1f1d360f pkg/apple-sdk add comment 2024-01-09 22:32:39 -08:00
Mitchell Hashimoto
12db2bc962 nix: update package hash 2024-01-09 22:25:47 -08:00
Mitchell Hashimoto
22648d60e7 pkg/apple-sdk: detect apple sdk based on target 2024-01-09 22:24:34 -08:00
Mitchell Hashimoto
e279a72ee1 Merge pull request #1272 from mitchellh/mrn/clipboard-dialog-default-focus
macos: allow submitting clipboard confirmation with return
2024-01-09 22:24:12 -08:00
Mitchell Hashimoto
829776bebd pkg/apple-sdk: always require a module 2024-01-09 22:11:03 -08:00
Thorsten Ball
b7a715ec86 macos: allow submitting clipboard confirmation with return
Before this change I couldn't submit the dialog with return. Or
cmd+return.

From what I understand the problem was that the `TextEditor` always
steals the default focus. I tried a bunch of workarounds I found to set
the default focus on the button, but none of them worked.

Then I thought: do we even need a full-on Text*Editor*? So I switched
`TextEditor` to `Text` with a `ScrollView`: things look the same, text
is selectable and scrollable, but I can hit return to submit the dialog.
2024-01-10 06:58:56 +01:00
Mitchell Hashimoto
fde52e9eca pkg/macos: only link apple paths on darwin target 2024-01-09 21:58:56 -08:00
Mitchell Hashimoto
c0722b3652 build: use Xcode for the macOS SDK 2024-01-09 21:53:01 -08:00
Mitchell Hashimoto
ec6d470985 build: only build embedded lib when targeting macos specifically 2024-01-09 21:36:10 -08:00
Mitchell Hashimoto
fc30fdfb2b renderer: do not free new configuration on change
Fixes #1271
2024-01-09 21:05:27 -08:00
Mitchell Hashimoto
3a4cd3f8e4 Merge pull request #1270 from mitchellh/select-all
macos: add Edit => Select All menu item
2024-01-09 20:55:07 -08:00
Mitchell Hashimoto
afb1fea48b macos: add Edit => Select All menu item
Fixes #1268
2024-01-09 20:54:23 -08:00
Mitchell Hashimoto
e27b0b45cb Merge pull request #1269 from mitchellh/p3
macos: support Display P3 colorspace through configuration
2024-01-09 20:50:38 -08:00
Mitchell Hashimoto
44544f29b2 macos: support Display P3 colorspace through configuration
Fixes #1214

This introduces the `window-colorspace` configuration which allows
configuring the colorspace to use for windows on macOS. The default is
sRGB (same as before) but this can also be set to `display-p3`.
2024-01-09 20:47:07 -08:00
Mitchell Hashimoto
7b931b4fcc Merge pull request #1267 from mitchellh/keypad
input: manage application keypad state with mode 1035
2024-01-09 12:07:25 -08:00
Mitchell Hashimoto
cba27e26cf input: manage application keypad state with mode 1035
Fixes #1099

We previously applied application keypad mode logic (`ESC=` or mode 66)
whenever it was active. However, from looking at the behavior of other
terminals (xterm and foot) it appears this isn't correct.

For xterm, application keypad mode only applies unconditionally if the
keyboard mode is VT220 (`-kt vt220`). For modern terminals, application
keypad mode is only applied if mode 1035 is disabled.

Mode 1035 is the "ignore numpad state with keypad mode" mode. It
defaults to true on terminal startup. If this is true, keypads are
always encoded in numerical mode. If this is false, the numlock state
will be respected.
2024-01-09 11:57:09 -08:00
Mitchell Hashimoto
dcc3c17738 input: missing kp_begin encoding entry 2024-01-09 10:52:49 -08:00
Mitchell Hashimoto
9358c3b32c Merge pull request #1266 from mitchellh/shader-animation
custom shader animation can be set to "always" to always remain active
2024-01-09 09:31:36 -08:00
Mitchell Hashimoto
96d33fef20 custom shader animation can be set to "always" to always remain active
Fixes #1225

The `custom-shader-animation` configuration can now be set to "always"
which keeps animation active even if the terminal is unfocused.
2024-01-09 09:21:15 -08:00
Mitchell Hashimoto
92697bad12 update README 2024-01-09 08:59:19 -08:00
Mitchell Hashimoto
b37293bcc0 Update README.md 2024-01-09 08:58:56 -08:00
Jeffrey C. Ollie
6112d56eed add some more documentation about enquiry on iterm2 2024-01-09 10:36:59 -06:00
Jeffrey C. Ollie
5286a63fc5 add some more documentation about enquiry 2024-01-09 10:29:53 -06:00
Jeffrey C. Ollie
3c2dfd4a84 change name of config entry and variables, add lock for safety during config update 2024-01-09 10:07:32 -06:00
Mitchell Hashimoto
a66d221bd5 Merge pull request #1265 from mitchellh/update-nix-zig
update zig 0.12 nixpkgs
2024-01-08 20:24:29 -08:00
Mitchell Hashimoto
49d9e7aa5d update zig 0.12 nxpkgs 2024-01-08 19:04:51 -08:00
Mitchell Hashimoto
3b5a1fe8f1 Merge pull request #1264 from tristan957/fixes
fix: update code to compile with 0.12.0-dev.2075+f5978181e
2024-01-08 19:03:39 -08:00
Mitchell Hashimoto
522f61ff7d update zig 2024-01-08 18:37:19 -08:00
Tristan Partin
d2813655e5 fix: update code to compile with 0.12.0-dev.2075+f5978181e 2024-01-08 20:08:10 -06:00
Mitchell Hashimoto
cfdf6cf312 Merge pull request #1259 from rockorager/kitty-associated
input: never report associated text on key release
2024-01-08 08:13:30 -08:00