5828 Commits

Author SHA1 Message Date
Mitchell Hashimoto
edfef1c8df Merge pull request #2662 from ghostty-org/push-zzpqurznxmlq
pwd changed apprt action, macOS app sets proxy icon based on this
2024-11-13 13:37:04 -08:00
Mitchell Hashimoto
e0a733584e libghostty: remove the pwd function 2024-11-13 13:11:24 -08:00
Mitchell Hashimoto
e724c46c64 termio: fix some mild memory corruption 2024-11-13 12:56:02 -08:00
Mitchell Hashimoto
3ca246ceb9 apprt: support a pwd change action 2024-11-13 12:29:30 -08:00
Mitchell Hashimoto
067a36d67c termio: handle empty titles (OSC 0/2)
Fixes #2651

First, our OSC parser didn't allow blank OSC 0 or 2 requests. This
should be allowed and this fixes that with a test.

Second, it seems many terminals (iTerm2, Kitty) treat setting a blank
title as resetting to whatever the default title is rather than
explicitly setting it as blank. If a program wants a title to be blank
they should send a single space. This commit follows this behavior.
2024-11-13 12:12:43 -08:00
Mitchell Hashimoto
bb60190630 update zf api 2024-11-12 19:15:25 -08:00
Mitchell Hashimoto
72659d48ac Merge pull request #2637 from jcollie/core-list-valid-enums
core: list valid options if an invalid value is detected parsing an enum
2024-11-09 11:57:10 -08:00
Mitchell Hashimoto
8b2980284d Merge pull request #2636 from jcollie/unifi-adwaita
core/gtk: unify libadwaita/adwaita options in the code
2024-11-09 11:56:58 -08:00
Mitchell Hashimoto
b76dc9e68b Merge pull request #2626 from nfejzic/freetype-load-flags
feat: implement configurable freetype load flags
2024-11-09 11:31:26 -08:00
Mitchell Hashimoto
3ee6577154 some tweaks 2024-11-09 11:03:02 -08:00
Jeffrey C. Ollie
3eef6d205e core: address review comments
- break formatting values out into a function so that we can
  catch errors and never fail
- eliminate the use of toOwnedSentinelSlice since we are using
  an arena to clean up memory
2024-11-09 12:49:40 -06:00
Mitchell Hashimoto
799877a436 Merge pull request #2608 from Pangoraw/toggle_split_zoom
gtk: implement toggle_split_zoom
2024-11-09 09:59:29 -08:00
Nadir Fejzic
4def80ce16 refactor: use if expression instead of switch 2024-11-09 13:09:15 +01:00
Nadir Fejzic
67966cb091 refactor: add default value for `freetype_load_flags' 2024-11-09 13:06:36 +01:00
Nadir Fejzic
69aa579ee3 fix: use ternary if expression and correct types 2024-11-09 12:51:28 +01:00
Nadir Fejzic
4c08688275 refactor: remove unused imports 2024-11-09 12:50:51 +01:00
Nadir Fejzic
08720a6d23 chore: fix typo 2024-11-09 12:49:53 +01:00
Nadir Fejzic
0e0751ad5b docs: write documentation for freetype_load_flags field 2024-11-09 12:34:45 +01:00
Nadir Fejzic
83c4d0077b refactor: define FreetypeLoadFlags struct and default in font.face 2024-11-09 12:34:39 +01:00
Pepper Lebeck-Jobe
3c493f2d0d Fix copying the theme name
Prior to this change both C and c would copy the path to the theme even though
the help screen claimed that c would copy the theme name.

There is a bug in libvaxis that results in both of these matches matching c:
  `key.matches('c', .{})`
	`key.matches('c', .{ .shift = true })`

Tested:
  Before the change: 'c' copies path and 'C' copies path
  After the change: 'c' copies the name and 'C' copies the path
2024-11-09 10:10:29 +01:00
Jeffrey C. Ollie
ca844ca3c0 core: list valid options if an invalid value is detected parsing an enum 2024-11-08 22:32:14 -06:00
Jeffrey C. Ollie
b353ddf46d core/gtk: unify libadwaita/adwaita options in the code
Fixes #2574
2024-11-08 22:19:04 -06:00
Nadir Fejzic
e7f286d83f docs: describe load_flags field in Face struct 2024-11-09 01:40:39 +01:00
Nadir Fejzic
c0b24ee60d refactor: make freetype flags void for non-freetype backend
This is an attempt to use `void` as type for Freetype Load Flags when
backend does not use these flags.
2024-11-09 01:39:10 +01:00
Nadir Fejzic
290857a871 chore: remove unused import 2024-11-09 00:44:19 +01:00
Nadir Fejzic
945a715b08 refactor: handle freetype load flags in face instead of renderer 2024-11-09 00:42:18 +01:00
Nadir Fejzic
74bda5a6eb feat: implement configurable freetype load flags 2024-11-08 20:38:38 +01:00
Mitchell Hashimoto
75fe0b2dfb Merge pull request #2617 from ghostty-org/pagelist-wip
chore: rename fields in PageList, move data structures to package, move PageList to intrusive linked list
2024-11-07 15:49:08 -08:00
Kristófer R
84707932d2 os/hostname: fix mac address handling when last section starts with '0'
I hit an edge case when using Private Wi-Fi addressing on macOS where
the last section of the randomized mac address starts with a '0'. The
hostname parsing for the shell integration didn't handle this case, so
issue #2512 reappeared.

This fixes that by explicitly handling port numbers < 10.
2024-11-07 18:17:51 -05:00
Mitchell Hashimoto
1335af3e4a terminal: change pagelist linked list to an intrusive linked list 2024-11-07 15:12:54 -08:00
Mitchell Hashimoto
3aff43b2e8 datastruct: add intrusive doubly linked list 2024-11-07 14:57:55 -08:00
Mitchell Hashimoto
a436bd0af6 move datastructures to dedicated "datastruct" package 2024-11-07 14:39:10 -08:00
Mitchell Hashimoto
aed51fd0b0 terminal: PageList rename "page" to "node" everywhere
This is more correct: a pagelist is a linked list of nodes, not pages.
The nodes themselves contain pages but we were previously calling the
nodes "pages" which was confusing, especially as I plan some future
changes to the way pages are stored.
2024-11-07 13:44:39 -08:00
Mitchell Hashimoto
7517d0a86b Merge pull request #2613 from qwerasd205/git-drawing-chars
feat(font/sprite): branch drawing characters
2024-11-07 09:56:31 -08:00
Qwerasd
4dbf404dc3 font/sprite: cleanup branch drawing character impl, implement fade-out lines 2024-11-06 18:44:12 -05:00
Meili C
0441987346 font feature: add git branch characters
addresses #2561 - adds support for most Git branch drawing characters as
specified in ![kitty/7681](https://github.com/kovidgoyal/kitty/pull/7681)
except for fading vertical and horizontal lines.

Adds git_draw_node function and a new Git node type.
Add this range (0xf5d0...0xf60d) for Git branch characters, to tests.
adds vline_middle_xy and hline_middle_xy for node connections.
add git characters to Face.zig.
2024-11-06 18:26:23 -05:00
Mitchell Hashimoto
444cf3b402 Merge pull request #2611 from phillip-hirsch/feature/Add-syntax-highlighting-for-viewing-config-file-with-bat
Feature: Add syntax highlighting for viewing config file with bat
2024-11-06 14:22:21 -08:00
phillip-hirsch
b5ed4cb680 feat: Add syntax highlighting for bat 2024-11-06 17:06:24 -05:00
Mitchell Hashimoto
94542b04f2 font/coretext: do not set variation axes in discovery
This was causing discovery to find some odd fonts under certain
scenarios (namely: Recursive Mono). Due to our prior fix in
e08eeb2b2ad810c4db22530a181858caee834b22 we no longer need to set
variations here for them to stick.
2024-11-06 12:57:06 -08:00
Mitchell Hashimoto
964f2ce96a font/coretext: always score based on style string length
This fixes an issue where for the regular style we were picking a
suboptimal style because for some font faces we were choosing more bold
faces (just as chance). This modifies our scoring to take the style
length into account even for regular style. We already had this logic
for explicit styles.
2024-11-06 12:55:03 -08:00
Paul Berg
1e003b2e0f gtk: implement toggle_split_zoom 2024-11-06 09:59:10 +01:00
Mitchell Hashimoto
65f1cefb4e config: add "initial-command" config, "-e" sets that
Fixes #2601

It is more expected behavior that `-e` affects only the first window. By
introducing a dedicated configuration we avoid making `-e` too magical:
its simply syntax sugar for setting the "initial-command" configuration.
2024-11-05 16:58:20 -08:00
Mitchell Hashimoto
e08eeb2b2a coretext: set variations on deferred face load
This commit makes CoreText behave a lot like FreeType where we set the
variation axes on the deferred face load. This fixes a bug where the
`slnt` variation axis could not be set with CoreText with the Monaspace
Argon Variable font.

This was a bug found in Discord. Specifically, with the Monaspace Argon
Variable font, the `slnt` variation axis could not be set with CoreText.
I'm not sure _exactly_ what causes this but I suspect it has to do with
the `slnt` axis being a negative value. I'm not sure if this is a bug
with CoreText or not.

What was happening was that with CoreText, we set the variation axes
during discovery and expect them to be preserved in the resulting
discovered faces. That seems to be true with the `wght` axis but not the
`slnt` axis for whatever reason.
2024-11-05 16:16:25 -08:00
Mitchell Hashimoto
fc7ff2a7ef Merge pull request #2512 from reykjalin/fix-hostname-validation-with-macos-wifi-private-address
Make sure a potential port component is considered during hostname validation for OSC 7 handling and shell integration
2024-11-05 10:40:25 -08:00
Mitchell Hashimoto
c8b99f7891 remove refalldecls test 2024-11-05 10:36:16 -08:00
Mitchell Hashimoto
4a263f43af stylistic changes 2024-11-05 10:30:56 -08:00
Kristófer R
9c2f260351 os/hostname: add and use explicit error structs 2024-11-04 19:26:29 -05:00
Kristófer R
e85b114031 os/hostname: add better validation for mac-address hostnames 2024-11-04 18:59:42 -05:00
Kristófer R
9ae6806e30 os/hostname: test bufPrintHostnameFromFileUri
Note that this includes some failing tests because I want to make the
uri handling better and more specific. It's a little bit too general
right now so I want to lock it down to:

1. macOS only; and
2. valid mac address values

because that's how the macOS private Wi-Fi address thing works;
randomizes your mac address and sets that as your hostname.
2024-11-04 18:59:41 -05:00
Kristófer R
78abd051a2 os/hostname: test isLocalHostname 2024-11-04 18:59:41 -05:00