428 Commits

Author SHA1 Message Date
Mitchell Hashimoto
e49c4707a1 config: note that styles that aren't found will use regular 2024-08-23 10:29:19 -07:00
Tim Culverhouse
9b036b1763 cli(list-keybinds): format key sequences
Implement formatting of key sequences in the list-keybinds command when
*not* pretty printing. Pretty printing will come in a separate commit.
The print style for that needs some thought, but in the meantime this
removes the panic cause by redirecting output of the command.
2024-08-20 09:48:05 -05:00
Mitchell Hashimoto
bec5772d77 config: warn the hazards of '>' for sequences 2024-08-19 12:56:51 -07:00
Eduardo Dominguez
262902a28d macos: jump to last_tab 2024-08-19 12:19:00 -06:00
Mitchell Hashimoto
6d2cbb0703 config: write the docs now for sequences 2024-08-18 20:30:33 -07:00
Mitchell Hashimoto
43176c750e config: support equality checking keybinds with sequences 2024-08-18 20:30:32 -07:00
Mitchell Hashimoto
9944f5d34d input: Binding.Set.clone handles leaders 2024-08-18 20:30:32 -07:00
Mitchell Hashimoto
7dfad49e40 input: converting set entries to Entry from Action 2024-08-18 20:30:32 -07:00
Mitchell Hashimoto
bc4eab4af7 input: add Set.parseAndPut 2024-08-18 20:30:32 -07:00
Mitchell Hashimoto
c7e0173158 config: remove unused types and function 2024-08-18 19:20:42 -07:00
Jeffrey C. Ollie
7de692c955 themes: don't use arena directly and cleanup debug code 2024-08-18 19:20:42 -07:00
Jeffrey C. Ollie
50c31ba173 themes: fix comment 2024-08-18 19:20:42 -07:00
Jeffrey C. Ollie
8c4cfc3bbb themes: finish refactor 2024-08-18 19:20:42 -07:00
Mitchell Hashimoto
d3182c8d7c config: move theme loading to dedicated file 2024-08-18 19:20:42 -07:00
Jeffrey C. Ollie
7a11b22c5f themes: allow loading from absolute paths and from user config dir 2024-08-18 19:20:42 -07:00
Mitchell Hashimoto
37d19b3cef Merge pull request #2109 from edmz/block_hollow
Config: cursor-style can bet set to block_hollow
2024-08-18 15:08:08 -07:00
Mitchell Hashimoto
b65a804bb2 almost yeeted it all! 2024-08-16 14:42:32 -07:00
Eduardo Dominguez
2e70ad20df Config: cursor-style can bet set to block_hollow
`cursor-style` can now also be set to `block_hollow`, no other changes
in behaviour are added.
2024-08-16 15:25:44 -06:00
Gregory Anders
59f259d7e4 config: fix typo
Disabling vsync reduces input latency, so this should say "minimize"
rather than "maximize".
2024-08-12 09:24:03 -05:00
Christian Kugler
ba41f142ed Add Config Option to Limit Number of Processes
To protect your system and ghostty from misbehaving programs that launch
too many processes for the system to handle (e.g. like a fork bomb),
this implements an option to limit the number of processes that can be
started in a surface.

A fork bomb for example or other misbehaving program would then only
take down one surface and not the entire system.

Side node:
If I am right in issue #2084, this feature does not actually work on a
per surface basis but on all surfaces. If this is the case, it could
probably be fixed together. Chances are, that I am wrong though 😉

Further improvements that could be done:
- unify way to set cgroup attributes
- set sane default: 10% of system max?
2024-08-11 23:37:57 +02:00
Jeffrey C. Ollie
f4bdf8d3a1 gtk: resize overlay improvements
* runtime changing of `resize-overlay` now works on GTK
* shorten function names in ResizeOverlay
* improve documentation
2024-08-11 12:23:43 -05:00
Mitchell Hashimoto
9cf247bb3e macos: implement resize overlay
Implements the resize overlay configurations completely.
2024-08-10 20:17:33 -07:00
Mitchell Hashimoto
451cf69398 Merge pull request #2071 from jcollie/resize-overlay
gtk: add resize overlay
2024-08-10 15:07:09 -07:00
Mitchell Hashimoto
1ef3c79ba8 config: quit-after-last-window-closed should be true on Linux
This was the behavior on GTK prior to #2021 and I think it makes sense
as a default there.
2024-08-10 14:38:20 -07:00
Jeffrey C. Ollie
8b919df1f5 resize-overlay: change default and delay → duration
Change the default to `after-first` and change `resize-overlay-delay` →
`resize-overlay-duration`.
2024-08-10 13:22:20 -05:00
Mitchell Hashimoto
9db89dbf2c config: make window-padding-color=extend default again 2024-08-10 10:41:36 -07:00
Mitchell Hashimoto
9f06e74353 config: add window-padding-color=extend-always to force always 2024-08-10 10:34:12 -07:00
Mitchell Hashimoto
40b3d4c72e config: clarify padding color default 2024-08-10 10:27:59 -07:00
Jeffrey C. Ollie
301826dfff gtk: add resize overlay
This adds a transient overlay that shows the size of the surface
while you are resizing the window or the surfaces.
2024-08-09 22:58:33 -05:00
Eleanor Bartle
bb4b6b5782 Remove Erroneous Config Note 2024-08-06 11:48:30 +10:00
Mitchell Hashimoto
1e7672deba Merge pull request #2034 from jcollie/asymmetric-window-padding
Implement asymmetric window padding.
2024-08-05 15:56:15 -07:00
Mitchell Hashimoto
c2778ab3a6 config: window-padding-x/y take two values for uneven padding 2024-08-05 15:51:42 -07:00
Mitchell Hashimoto
c5d2f352d3 Merge pull request #2045 from nihaals/font-family-all
Document not every font-family needs to be set
2024-08-05 10:28:52 -07:00
Mitchell Hashimoto
978110ec24 config: update docs 2024-08-05 10:28:38 -07:00
Nihaal Sangha
538f6033ea Document not every font-family needs to be set 2024-08-05 17:26:33 +01:00
Łukasz Niemier
f9be02a20f chore: clean up typos 2024-08-05 13:56:57 +02:00
Mitchell Hashimoto
5f0371c189 change window padding color to background by default
While we work out the bugs…
2024-08-03 22:27:19 -07:00
Mitchell Hashimoto
f09a45704a config: typo in window-padding-color docs 2024-08-03 22:04:35 -07:00
Mitchell Hashimoto
ea551990eb renderer: disable window-padding-color=extend in certain scenarios
There are scenarios where this configuration looks bad. This commit
introduces some heuristics to prevent it. Here are the heuristics:

  * Extension is always enabled on alt screen.
  * Extension is disabled if a row contains any default bg color. The
    thinking is that in this scenario, using the default bg color looks
    just fine.
  * Extension is disabled if a row is marked as a prompt (using semantic
    prompt sequences). The thinking here is that prompts often contain
    perfect fit glyphs such as Powerline glyphs and those look bad when
    extended.

This introduces some CPU cost to the extension feature but it should be
minimal and respects dirty tracking. This is unfortunate but the feature
makes many terminal scenarios look much better and the performance cost
is minimal so I believe it is worth it.

Further heuristics are likely warranted but this should be a good
starting set.
2024-08-03 21:56:19 -07:00
Mitchell Hashimoto
55e8c421b5 config: add window-padding-color 2024-08-03 16:14:14 -07:00
Jeffrey C. Ollie
0f27fc2a0d Implement asymmetric window padding.
Add `window-padding-top`, `window-padding-bottom`,
`window-padding-left`, and `window-padding-right` options. The
`window-padding-x` and `window-padding-y` options will override the
individual options.
2024-08-03 14:42:28 -05:00
Mitchell Hashimoto
288a1fe549 Merge pull request #2021 from jcollie/background
gtk: allow running in the background
2024-08-03 10:08:45 -07:00
Mitchell Hashimoto
c5e2889369 config: clarify comment 2024-08-03 09:50:39 -07:00
Mitchell Hashimoto
e62bdbf8b7 config: duration prevents overflow, added tests 2024-08-03 09:48:40 -07:00
Jeffrey C. Ollie
b87667c950 document behavior when no initial window is created and a quit delay is set 2024-08-02 16:17:10 -05:00
Jeffrey C. Ollie
0e533af21a add a warning if quit delay too short 2024-08-02 15:43:40 -05:00
Jeffrey C. Ollie
d243ad6616 add a standard zig formatter to Duration and more testing 2024-08-02 15:43:37 -05:00
Jeffrey C. Ollie
cf515c80d0 fix off-by-one error 2024-08-02 15:43:31 -05:00
Jeffrey C. Ollie
3aa1989620 make Duration units a struct field to reduce duplication and enable table-driven unit tests 2024-08-02 10:47:47 -05:00
Jeffrey C. Ollie
3d6ca14dc6 make quit-after-last-window-closed-delay an optional 2024-08-01 10:51:08 -05:00