Jan200101
061a730dd3
move strip switch behind option
2024-12-31 12:06:45 +01:00
Jan200101
c87e3e98a3
give strip option a proper description
2024-12-30 18:37:59 +01:00
Arvin Verain
cfeed2b7a2
gtk: Install 1024x1024 icon
2024-12-30 13:05:57 +08:00
Jan200101
2bb3353672
add option to strip build regardless of optimization
2024-12-29 22:06:30 +01:00
Jeffrey C. Ollie
b6e45d49a3
gtk/x11: link directly to libX11, no more dlopen
2024-12-29 01:15:01 -06:00
Jeffrey C. Ollie
8ecb11a602
gtk: add option to not link against libX11
2024-12-28 13:40:17 -06:00
Mitchell Hashimoto
8111f5b995
Fix `DESTDIR` handling for terminfo installation ( #3426 )
...
## Description:
Fix `DESTDIR` handling when installing terminfo database files by using
`install_path` instead of `install_prefix`. This ensures files are
correctly installed under `$DESTDIR/$prefix` during packaging.
## Changes:
- Replace `b.install_prefix` with `b.install_path` for terminfo database
installation paths
- This change properly respects the `DESTDIR` environment variable
during installation
## Testing:
I've verified this fix by:
1. Setting `DESTDIR=/tmp/ghostty`
2. Building with:
```bash
DESTDIR=/tmp/ghostty \
zig build \
--prefix /usr \
--system /tmp/offline-cache/p \
-Doptimize=ReleaseFast \
-Dcpu=baseline
```
3. Confirming files are correctly installed to:
```
/tmp/ghostty/usr/share/terminfo/ghostty.terminfo
/tmp/ghostty/usr/share/terminfo/ghostty.termcap
```
The files are now properly installed under `$DESTDIR/$prefix` path
structure as expected.
cc @BratishkaErik - Since you suggested this fix in #3152 , would you
mind reviewing this implementation?
Fixes #3152
2024-12-27 12:09:37 -08:00
Yorick Peterse
50f7632d81
Fix building with -Dflatpak=true
...
While running a Ghostty instance built with this option currently
crashes under Flatpak, at least it ensures we're able to build it again.
2024-12-27 16:27:19 +01:00
Bryan Lee
2114e0a613
Fix `DESTDIR` handling for terminfo installation
...
Use `install_path` instead of `install_prefix` when installing terminfo
database files to properly respect the `DESTDIR` environment variable.
This ensures files are correctly installed under `$DESTDIR/$prefix`
when packaging.
Fixes #3152
2024-12-27 23:12:42 +08:00
Mitchell Hashimoto
35b9ceee21
up the version to 1.0.1 everywhere for dev
2024-12-26 15:21:50 -08:00
Mitchell Hashimoto
4b4d4062df
build.zig: v1.0.0
2024-12-26 12:00:22 -08:00
Mitchell Hashimoto
270d454c4e
webgen: update config to support callouts, emit keybind actions
2024-12-19 17:15:39 -08:00
Mitchell Hashimoto
82c9787fd3
build: generate reference page for config for website
2024-12-18 07:06:35 -08:00
Mitchell Hashimoto
0ad4b6bf44
bash: add bash completion generation ( #2963 )
...
Bash completions on par with fish and zsh completions. There's a lot of
room to add additional custom completions in all three languages. (see
`key) return;;` for cases)
I've noticed a few mistakes with the other completions I'll raise as a
separate PR.
<details>
<summary>Generated ghostty.bash - updated</summary>
```bash
# -o nospace requires we add back a space when a completion is finished
# and not part of a --key= completion
addSpaces() {
for idx in "${!COMPREPLY[@]}"; do
[ -n "${COMPREPLY[idx]}" ] && COMPREPLY[idx]="${COMPREPLY[idx]} ";
done
}
_fonts() {
local IFS=$'\n'
mapfile -t COMPREPLY < <( compgen -P '"' -S '"' -W "$($ghostty +list-fonts | grep '^[A-Z]' )" -- "$cur")
}
_themes() {
local IFS=$'\n'
mapfile -t COMPREPLY < <( compgen -P '"' -S '"' -W "$($ghostty +list-themes | sed -E 's/^(.*) \(.*$/\1/')" -- "$cur")
}
_files() {
mapfile -t COMPREPLY < <( compgen -o filenames -f -- "$cur" )
for i in "${!COMPREPLY[@]}"; do
if [[ -d "${COMPREPLY[i]}" ]]; then
COMPREPLY[i]="${COMPREPLY[i]}/";
fi
if [[ -f "${COMPREPLY[i]}" ]]; then
COMPREPLY[i]="${COMPREPLY[i]} ";
fi
done
}
_dirs() {
mapfile -t COMPREPLY < <( compgen -o dirnames -d -- "$cur" )
for i in "${!COMPREPLY[@]}"; do
if [[ -d "${COMPREPLY[i]}" ]]; then
COMPREPLY[i]="${COMPREPLY[i]}/";
fi
done
if [[ "${#COMPREPLY[@]}" == 0 && -d "$cur" ]]; then
COMPREPLY=( "$cur " )
fi
}
config="--help"
config+=" --version"
config+=" --font-family="
config+=" --font-family-bold="
config+=" --font-family-italic="
config+=" --font-family-bold-italic="
config+=" --font-style="
config+=" --font-style-bold="
config+=" --font-style-italic="
config+=" --font-style-bold-italic="
config+=" --font-synthetic-style="
config+=" --font-feature="
config+=" --font-size="
config+=" --font-variation="
config+=" --font-variation-bold="
config+=" --font-variation-italic="
config+=" --font-variation-bold-italic="
config+=" --font-codepoint-map="
config+=" --font-thicken="
config+=" --adjust-cell-width="
config+=" --adjust-cell-height="
config+=" --adjust-font-baseline="
config+=" --adjust-underline-position="
config+=" --adjust-underline-thickness="
config+=" --adjust-strikethrough-position="
config+=" --adjust-strikethrough-thickness="
config+=" --adjust-cursor-thickness="
config+=" --grapheme-width-method="
config+=" --freetype-load-flags="
config+=" --theme="
config+=" --background="
config+=" --foreground="
config+=" --selection-foreground="
config+=" --selection-background="
config+=" --selection-invert-fg-bg="
config+=" --minimum-contrast="
config+=" --palette="
config+=" --cursor-color="
config+=" --cursor-invert-fg-bg="
config+=" --cursor-opacity="
config+=" --cursor-style="
config+=" --cursor-style-blink="
config+=" --cursor-text="
config+=" --cursor-click-to-move="
config+=" --mouse-hide-while-typing="
config+=" --mouse-shift-capture="
config+=" --mouse-scroll-multiplier="
config+=" --background-opacity="
config+=" --background-blur-radius="
config+=" --unfocused-split-opacity="
config+=" --unfocused-split-fill="
config+=" --command="
config+=" --initial-command="
config+=" --wait-after-command="
config+=" --abnormal-command-exit-runtime="
config+=" --scrollback-limit="
config+=" --link="
config+=" --link-url="
config+=" --fullscreen="
config+=" --title="
config+=" --class="
config+=" --x11-instance-name="
config+=" --working-directory="
config+=" --keybind="
config+=" --window-padding-x="
config+=" --window-padding-y="
config+=" --window-padding-balance="
config+=" --window-padding-color="
config+=" --window-vsync="
config+=" --window-inherit-working-directory="
config+=" --window-inherit-font-size="
config+=" --window-decoration="
config+=" --window-title-font-family="
config+=" --window-theme="
config+=" --window-colorspace="
config+=" --window-height="
config+=" --window-width="
config+=" --window-save-state="
config+=" --window-step-resize="
config+=" --window-new-tab-position="
config+=" --resize-overlay="
config+=" --resize-overlay-position="
config+=" --resize-overlay-duration="
config+=" --focus-follows-mouse="
config+=" --clipboard-read="
config+=" --clipboard-write="
config+=" --clipboard-trim-trailing-spaces="
config+=" --clipboard-paste-protection="
config+=" --clipboard-paste-bracketed-safe="
config+=" --image-storage-limit="
config+=" --copy-on-select="
config+=" --click-repeat-interval="
config+=" --config-file="
config+=" --config-default-files="
config+=" --confirm-close-surface="
config+=" --quit-after-last-window-closed="
config+=" --quit-after-last-window-closed-delay="
config+=" --initial-window="
config+=" --quick-terminal-position="
config+=" --quick-terminal-screen="
config+=" --quick-terminal-animation-duration="
config+=" --shell-integration="
config+=" --shell-integration-features="
config+=" --osc-color-report-format="
config+=" --vt-kam-allowed="
config+=" --custom-shader="
config+=" --custom-shader-animation="
config+=" --macos-non-native-fullscreen="
config+=" --macos-titlebar-style="
config+=" --macos-titlebar-proxy-icon="
config+=" --macos-option-as-alt="
config+=" --macos-window-shadow="
config+=" --macos-auto-secure-input="
config+=" --macos-secure-input-indication="
config+=" --linux-cgroup="
config+=" --linux-cgroup-memory-limit="
config+=" --linux-cgroup-processes-limit="
config+=" --linux-cgroup-hard-fail="
config+=" --gtk-single-instance="
config+=" --gtk-titlebar="
config+=" --gtk-tabs-location="
config+=" --adw-toolbar-style="
config+=" --gtk-wide-tabs="
config+=" --gtk-adwaita="
config+=" --desktop-notifications="
config+=" --bold-is-bright="
config+=" --term="
config+=" --enquiry-response="
config+=" --auto-update="
_handleConfig() {
case "$prev" in
--font-family) _fonts ;;
--font-family-bold) _fonts ;;
--font-family-italic) _fonts ;;
--font-family-bold-italic) _fonts ;;
--font-style) return ;;
--font-style-bold) return ;;
--font-style-italic) return ;;
--font-style-bold-italic) return ;;
--font-synthetic-style) mapfile -t COMPREPLY < <( compgen -W "bold no-bold italic no-italic bold-italic no-bold-italic" -- "$cur" ); addSpaces ;;
--font-feature) return ;;
--font-size) return ;;
--font-variation) return ;;
--font-variation-bold) return ;;
--font-variation-italic) return ;;
--font-variation-bold-italic) return ;;
--font-codepoint-map) return ;;
--font-thicken) mapfile -t COMPREPLY < <( compgen -W "true false" -- "$cur" ); addSpaces ;;
--adjust-cell-width) return ;;
--adjust-cell-height) return ;;
--adjust-font-baseline) return ;;
--adjust-underline-position) return ;;
--adjust-underline-thickness) return ;;
--adjust-strikethrough-position) return ;;
--adjust-strikethrough-thickness) return ;;
--adjust-cursor-thickness) return ;;
--grapheme-width-method) mapfile -t COMPREPLY < <( compgen -W "legacy unicode" -- "$cur" ); addSpaces ;;
--freetype-load-flags) mapfile -t COMPREPLY < <( compgen -W "hinting no-hinting force-autohint no-force-autohint monochrome no-monochrome autohint no-autohint" -- "$cur" ); addSpaces ;;
--theme) _themes ;;
--background) return ;;
--foreground) return ;;
--selection-foreground) return ;;
--selection-background) return ;;
--selection-invert-fg-bg) mapfile -t COMPREPLY < <( compgen -W "true false" -- "$cur" ); addSpaces ;;
--minimum-contrast) return ;;
--palette) return ;;
--cursor-color) return ;;
--cursor-invert-fg-bg) mapfile -t COMPREPLY < <( compgen -W "true false" -- "$cur" ); addSpaces ;;
--cursor-opacity) return ;;
--cursor-style) mapfile -t COMPREPLY < <( compgen -W "bar block underline block_hollow" -- "$cur" ); addSpaces ;;
--cursor-style-blink) return ;;
--cursor-text) return ;;
--cursor-click-to-move) mapfile -t COMPREPLY < <( compgen -W "true false" -- "$cur" ); addSpaces ;;
--mouse-hide-while-typing) mapfile -t COMPREPLY < <( compgen -W "true false" -- "$cur" ); addSpaces ;;
--mouse-shift-capture) mapfile -t COMPREPLY < <( compgen -W "false true always never" -- "$cur" ); addSpaces ;;
--mouse-scroll-multiplier) return ;;
--background-opacity) return ;;
--background-blur-radius) return ;;
--unfocused-split-opacity) return ;;
--unfocused-split-fill) return ;;
--command) return ;;
--initial-command) return ;;
--wait-after-command) mapfile -t COMPREPLY < <( compgen -W "true false" -- "$cur" ); addSpaces ;;
--abnormal-command-exit-runtime) return ;;
--scrollback-limit) return ;;
--link) return ;;
--link-url) mapfile -t COMPREPLY < <( compgen -W "true false" -- "$cur" ); addSpaces ;;
--fullscreen) mapfile -t COMPREPLY < <( compgen -W "true false" -- "$cur" ); addSpaces ;;
--title) return ;;
--class) return ;;
--x11-instance-name) return ;;
--working-directory) _dirs ;;
--keybind) return ;;
--window-padding-x) return ;;
--window-padding-y) return ;;
--window-padding-balance) mapfile -t COMPREPLY < <( compgen -W "true false" -- "$cur" ); addSpaces ;;
--window-padding-color) mapfile -t COMPREPLY < <( compgen -W "background extend extend-always" -- "$cur" ); addSpaces ;;
--window-vsync) mapfile -t COMPREPLY < <( compgen -W "true false" -- "$cur" ); addSpaces ;;
--window-inherit-working-directory) mapfile -t COMPREPLY < <( compgen -W "true false" -- "$cur" ); addSpaces ;;
--window-inherit-font-size) mapfile -t COMPREPLY < <( compgen -W "true false" -- "$cur" ); addSpaces ;;
--window-decoration) mapfile -t COMPREPLY < <( compgen -W "true false" -- "$cur" ); addSpaces ;;
--window-title-font-family) return ;;
--window-theme) mapfile -t COMPREPLY < <( compgen -W "auto system light dark ghostty" -- "$cur" ); addSpaces ;;
--window-colorspace) mapfile -t COMPREPLY < <( compgen -W "srgb display-p3" -- "$cur" ); addSpaces ;;
--window-height) return ;;
--window-width) return ;;
--window-save-state) mapfile -t COMPREPLY < <( compgen -W "default never always" -- "$cur" ); addSpaces ;;
--window-step-resize) mapfile -t COMPREPLY < <( compgen -W "true false" -- "$cur" ); addSpaces ;;
--window-new-tab-position) mapfile -t COMPREPLY < <( compgen -W "current end" -- "$cur" ); addSpaces ;;
--resize-overlay) mapfile -t COMPREPLY < <( compgen -W "always never after-first" -- "$cur" ); addSpaces ;;
--resize-overlay-position) mapfile -t COMPREPLY < <( compgen -W "center top-left top-center top-right bottom-left bottom-center bottom-right" -- "$cur" ); addSpaces ;;
--resize-overlay-duration) return ;;
--clipboard-read) mapfile -t COMPREPLY < <( compgen -W "allow deny ask" -- "$cur" ); addSpaces ;;
--clipboard-write) mapfile -t COMPREPLY < <( compgen -W "allow deny ask" -- "$cur" ); addSpaces ;;
--clipboard-trim-trailing-spaces) mapfile -t COMPREPLY < <( compgen -W "true false" -- "$cur" ); addSpaces ;;
--clipboard-paste-protection) mapfile -t COMPREPLY < <( compgen -W "true false" -- "$cur" ); addSpaces ;;
--clipboard-paste-bracketed-safe) mapfile -t COMPREPLY < <( compgen -W "true false" -- "$cur" ); addSpaces ;;
--image-storage-limit) return ;;
--copy-on-select) mapfile -t COMPREPLY < <( compgen -W "false true clipboard" -- "$cur" ); addSpaces ;;
--click-repeat-interval) return ;;
--config-file) _files ;;
--config-default-files) mapfile -t COMPREPLY < <( compgen -W "true false" -- "$cur" ); addSpaces ;;
--confirm-close-surface) mapfile -t COMPREPLY < <( compgen -W "true false" -- "$cur" ); addSpaces ;;
--quit-after-last-window-closed) mapfile -t COMPREPLY < <( compgen -W "true false" -- "$cur" ); addSpaces ;;
--quit-after-last-window-closed-delay) return ;;
--initial-window) mapfile -t COMPREPLY < <( compgen -W "true false" -- "$cur" ); addSpaces ;;
--quick-terminal-position) mapfile -t COMPREPLY < <( compgen -W "top bottom left right" -- "$cur" ); addSpaces ;;
--quick-terminal-screen) mapfile -t COMPREPLY < <( compgen -W "main mouse macos-menu-bar" -- "$cur" ); addSpaces ;;
--quick-terminal-animation-duration) return ;;
--shell-integration) mapfile -t COMPREPLY < <( compgen -W "none detect bash elvish fish zsh" -- "$cur" ); addSpaces ;;
--shell-integration-features) mapfile -t COMPREPLY < <( compgen -W "cursor no-cursor sudo no-sudo title no-title" -- "$cur" ); addSpaces ;;
--osc-color-report-format) mapfile -t COMPREPLY < <( compgen -W "none 8-bit 16-bit" -- "$cur" ); addSpaces ;;
--vt-kam-allowed) mapfile -t COMPREPLY < <( compgen -W "true false" -- "$cur" ); addSpaces ;;
--custom-shader) _files ;;
--custom-shader-animation) mapfile -t COMPREPLY < <( compgen -W "false true always" -- "$cur" ); addSpaces ;;
--macos-non-native-fullscreen) mapfile -t COMPREPLY < <( compgen -W "false true visible-menu" -- "$cur" ); addSpaces ;;
--macos-titlebar-style) mapfile -t COMPREPLY < <( compgen -W "native transparent tabs hidden" -- "$cur" ); addSpaces ;;
--macos-titlebar-proxy-icon) mapfile -t COMPREPLY < <( compgen -W "visible hidden" -- "$cur" ); addSpaces ;;
--macos-option-as-alt) return ;;
--macos-window-shadow) mapfile -t COMPREPLY < <( compgen -W "true false" -- "$cur" ); addSpaces ;;
--macos-auto-secure-input) mapfile -t COMPREPLY < <( compgen -W "true false" -- "$cur" ); addSpaces ;;
--macos-secure-input-indication) mapfile -t COMPREPLY < <( compgen -W "true false" -- "$cur" ); addSpaces ;;
--linux-cgroup) mapfile -t COMPREPLY < <( compgen -W "never always single-instance" -- "$cur" ); addSpaces ;;
--linux-cgroup-memory-limit) return ;;
--linux-cgroup-processes-limit) return ;;
--linux-cgroup-hard-fail) mapfile -t COMPREPLY < <( compgen -W "true false" -- "$cur" ); addSpaces ;;
--gtk-single-instance) mapfile -t COMPREPLY < <( compgen -W "desktop false true" -- "$cur" ); addSpaces ;;
--gtk-titlebar) mapfile -t COMPREPLY < <( compgen -W "true false" -- "$cur" ); addSpaces ;;
--gtk-tabs-location) mapfile -t COMPREPLY < <( compgen -W "top bottom left right" -- "$cur" ); addSpaces ;;
--adw-toolbar-style) mapfile -t COMPREPLY < <( compgen -W "flat raised raised-border" -- "$cur" ); addSpaces ;;
--gtk-wide-tabs) mapfile -t COMPREPLY < <( compgen -W "true false" -- "$cur" ); addSpaces ;;
--gtk-adwaita) mapfile -t COMPREPLY < <( compgen -W "true false" -- "$cur" ); addSpaces ;;
--desktop-notifications) mapfile -t COMPREPLY < <( compgen -W "true false" -- "$cur" ); addSpaces ;;
--bold-is-bright) mapfile -t COMPREPLY < <( compgen -W "true false" -- "$cur" ); addSpaces ;;
--term) return ;;
--enquiry-response) return ;;
--auto-update) mapfile -t COMPREPLY < <( compgen -W "off check download" -- "$cur" ); addSpaces ;;
*) mapfile -t COMPREPLY < <( compgen -W "$config" -- "$cur" ) ;;
esac
return 0
}
list_fonts="--family= --style= --bold= --italic= --help"
list_keybinds="--default= --docs= --plain= --help"
list_themes="--path= --plain= --help"
list_actions="--docs= --help"
show_config="--default= --changes-only= --docs= --help"
validate_config="--config-file= --help"
_handleActions() {
case "${COMP_WORDS[1]}" in
+list-fonts)
case $prev in
--family) return;;
--style) return;;
--bold) mapfile -t COMPREPLY < <( compgen -W "true false" -- "$cur" ); addSpaces ;;
--italic) mapfile -t COMPREPLY < <( compgen -W "true false" -- "$cur" ); addSpaces ;;
*) mapfile -t COMPREPLY < <( compgen -W "$list_fonts" -- "$cur" ) ;;
esac
;;
+list-keybinds)
case $prev in
--default) mapfile -t COMPREPLY < <( compgen -W "true false" -- "$cur" ); addSpaces ;;
--docs) mapfile -t COMPREPLY < <( compgen -W "true false" -- "$cur" ); addSpaces ;;
--plain) mapfile -t COMPREPLY < <( compgen -W "true false" -- "$cur" ); addSpaces ;;
*) mapfile -t COMPREPLY < <( compgen -W "$list_keybinds" -- "$cur" ) ;;
esac
;;
+list-themes)
case $prev in
--path) mapfile -t COMPREPLY < <( compgen -W "true false" -- "$cur" ); addSpaces ;;
--plain) mapfile -t COMPREPLY < <( compgen -W "true false" -- "$cur" ); addSpaces ;;
*) mapfile -t COMPREPLY < <( compgen -W "$list_themes" -- "$cur" ) ;;
esac
;;
+list-actions)
case $prev in
--docs) mapfile -t COMPREPLY < <( compgen -W "true false" -- "$cur" ); addSpaces ;;
*) mapfile -t COMPREPLY < <( compgen -W "$list_actions" -- "$cur" ) ;;
esac
;;
+show-config)
case $prev in
--default) mapfile -t COMPREPLY < <( compgen -W "true false" -- "$cur" ); addSpaces ;;
--changes-only) mapfile -t COMPREPLY < <( compgen -W "true false" -- "$cur" ); addSpaces ;;
--docs) mapfile -t COMPREPLY < <( compgen -W "true false" -- "$cur" ); addSpaces ;;
*) mapfile -t COMPREPLY < <( compgen -W "$show_config" -- "$cur" ) ;;
esac
;;
+validate-config)
case $prev in
--config-file) _files ;;
*) mapfile -t COMPREPLY < <( compgen -W "$validate_config" -- "$cur" ) ;;
esac
;;
*) mapfile -t COMPREPLY < <( compgen -W "--help" -- "$cur" ) ;;
esac
return 0
}
topLevel="-e"
topLevel+=" --help"
topLevel+=" --version"
topLevel+=" +list-fonts"
topLevel+=" +list-keybinds"
topLevel+=" +list-themes"
topLevel+=" +list-colors"
topLevel+=" +list-actions"
topLevel+=" +show-config"
topLevel+=" +validate-config"
topLevel+=" +crash-report"
_ghostty() {
cur=""; prev=""; prevWasEq=false; COMPREPLY=()
ghostty="$1"
if [ "$2" = "=" ]; then cur=""
else cur="$2"
fi
if [ "$3" = "=" ]; then prev="${COMP_WORDS[COMP_CWORD-2]}"; prevWasEq=true;
else prev="${COMP_WORDS[COMP_CWORD-1]}"
fi
# current completion is double quoted add a space so the curor progresses
if [[ "$2" == \"*\" ]]; then
COMPREPLY=( "$cur " );
return;
fi
case "$COMP_CWORD" in
1)
case "${COMP_WORDS[1]}" in
-e | --help | --version) return 0 ;;
--*) _handleConfig ;;
*) mapfile -t COMPREPLY < <( compgen -W "${topLevel}" -- "$cur" ); addSpaces ;;
esac
;;
*)
case "$prev" in
-e | --help | --version) return 0 ;;
*)
if [[ "=" != "${COMP_WORDS[COMP_CWORD]}" && $prevWasEq != true ]]; then
# must be completing with a space after the key eg: '--<key> '
# clear out prev so we don't run any of the key specific completions
prev=""
fi
case "${COMP_WORDS[1]}" in
--*) _handleConfig ;;
+*) _handleActions ;;
esac
;;
esac
;;
esac
return 0
}
complete -o nospace -o bashdefault -F _ghostty ghostty
```
</details>
cc @jparise
I agree to re-license my commits to MIT
Closes #2053
2024-12-15 18:14:56 -08:00
Anund
fddc880941
bash: add bash completion generation
...
closes #2053
2024-12-15 02:37:12 +11:00
Anthony
fb0f5519c1
Revert "Change oniguruma link target from `oniguruma` to `onig`"
...
This reverts commit daa0fe00b1 .
It is correct to use the pkg-config name instead of the literal dylib name
2024-12-12 15:35:29 +11:00
Mitchell Hashimoto
3f21921568
Add zsh completions and improve fish completions ( #2925 )
...
Adds zsh completion generation and improves fish completion generation
to cover all actions with arguments.
<details>
<summary>Generated _ghostty contents</summary>
```zsh
#compdef ghostty
_fonts () {
local font_list=$(ghostty +list-fonts | grep -Z '^[A-Z]')
local fonts=(${(f)font_list})
_describe -t fonts 'fonts' fonts
}
_themes() {
local theme_list=$(ghostty +list-themes | sed -E 's/^(.*) \(.*\$/\0/')
local themes=(${(f)theme_list})
_describe -t themes 'themes' themes
}
_config() {
_arguments \
"--help" \
"--version" \
"--font-family=-:::_fonts" \
"--font-family-bold=-:::_fonts" \
"--font-family-italic=-:::_fonts" \
"--font-family-bold-italic=-:::_fonts" \
"--font-style=-:::( )" \
"--font-style-bold=-:::( )" \
"--font-style-italic=-:::( )" \
"--font-style-bold-italic=-:::( )" \
"--font-synthetic-style=-:::(bold no-bold italic no-italic bold-italic
no-bold-italic)" \
"--font-feature=-:::( )" \
"--font-size=-:::( )" \
"--font-variation=-:::( )" \
"--font-variation-bold=-:::( )" \
"--font-variation-italic=-:::( )" \
"--font-variation-bold-italic=-:::( )" \
"--font-codepoint-map=-:::( )" \
"--font-thicken=-:::(true false)" \
"--adjust-cell-width=-:::( )" \
"--adjust-cell-height=-:::( )" \
"--adjust-font-baseline=-:::( )" \
"--adjust-underline-position=-:::( )" \
"--adjust-underline-thickness=-:::( )" \
"--adjust-strikethrough-position=-:::( )" \
"--adjust-strikethrough-thickness=-:::( )" \
"--adjust-cursor-thickness=-:::( )" \
"--grapheme-width-method=-:::(legacy unicode)" \
"--freetype-load-flags=-:::(hinting no-hinting force-autohint
no-force-autohint monochrome no-monochrome autohint no-autohint)" \
"--theme=-:::_themes" \
"--background=-:::( )" \
"--foreground=-:::( )" \
"--selection-foreground=-:::( )" \
"--selection-background=-:::( )" \
"--selection-invert-fg-bg=-:::(true false)" \
"--minimum-contrast=-:::( )" \
"--palette=-:::( )" \
"--cursor-color=-:::( )" \
"--cursor-invert-fg-bg=-:::(true false)" \
"--cursor-opacity=-:::( )" \
"--cursor-style=-:::(bar block underline block_hollow)" \
"--cursor-style-blink=-:::( )" \
"--cursor-text=-:::( )" \
"--cursor-click-to-move=-:::(true false)" \
"--mouse-hide-while-typing=-:::(true false)" \
"--mouse-shift-capture=-:::(false true always never)" \
"--mouse-scroll-multiplier=-:::( )" \
"--background-opacity=-:::( )" \
"--background-blur-radius=-:::( )" \
"--unfocused-split-opacity=-:::( )" \
"--unfocused-split-fill=-:::( )" \
"--command=-:::( )" \
"--initial-command=-:::( )" \
"--wait-after-command=-:::(true false)" \
"--abnormal-command-exit-runtime=-:::( )" \
"--scrollback-limit=-:::( )" \
"--link=-:::( )" \
"--link-url=-:::(true false)" \
"--fullscreen=-:::(true false)" \
"--title=-:::( )" \
"--class=-:::( )" \
"--x11-instance-name=-:::( )" \
"--working-directory=-:::{_files -/}" \
"--keybind=-:::( )" \
"--window-padding-x=-:::( )" \
"--window-padding-y=-:::( )" \
"--window-padding-balance=-:::(true false)" \
"--window-padding-color=-:::(background extend extend-always)" \
"--window-vsync=-:::(true false)" \
"--window-inherit-working-directory=-:::(true false)" \
"--window-inherit-font-size=-:::(true false)" \
"--window-decoration=-:::(true false)" \
"--window-title-font-family=-:::( )" \
"--window-theme=-:::(auto system light dark ghostty)" \
"--window-colorspace=-:::(srgb display-p3)" \
"--window-height=-:::( )" \
"--window-width=-:::( )" \
"--window-save-state=-:::(default never always)" \
"--window-step-resize=-:::(true false)" \
"--window-new-tab-position=-:::(current end)" \
"--resize-overlay=-:::(always never after-first)" \
"--resize-overlay-position=-:::(center top-left top-center top-right
bottom-left bottom-center bottom-right)" \
"--resize-overlay-duration=-:::( )" \
"--focus-follows-mouse=-:::(true false)" \
"--clipboard-read=-:::(allow deny ask)" \
"--clipboard-write=-:::(allow deny ask)" \
"--clipboard-trim-trailing-spaces=-:::(true false)" \
"--clipboard-paste-protection=-:::(true false)" \
"--clipboard-paste-bracketed-safe=-:::(true false)" \
"--image-storage-limit=-:::( )" \
"--copy-on-select=-:::(false true clipboard)" \
"--click-repeat-interval=-:::( )" \
"--config-file=-:::_files" \
"--config-default-files=-:::(true false)" \
"--confirm-close-surface=-:::(true false)" \
"--quit-after-last-window-closed=-:::(true false)" \
"--quit-after-last-window-closed-delay=-:::( )" \
"--initial-window=-:::(true false)" \
"--quick-terminal-position=-:::(top bottom left right)" \
"--quick-terminal-screen=-:::(main mouse macos-menu-bar)" \
"--quick-terminal-animation-duration=-:::( )" \
"--shell-integration=-:::(none detect bash elvish fish zsh)" \
"--shell-integration-features=-:::(cursor no-cursor sudo no-sudo title
no-title)" \
"--osc-color-report-format=-:::(none 8-bit 16-bit)" \
"--vt-kam-allowed=-:::(true false)" \
"--custom-shader=-:::_files" \
"--custom-shader-animation=-:::(false true always)" \
"--macos-non-native-fullscreen=-:::(false true visible-menu)" \
"--macos-titlebar-style=-:::(native transparent tabs hidden)" \
"--macos-titlebar-proxy-icon=-:::(visible hidden)" \
"--macos-option-as-alt=-:::(false true left right)" \
"--macos-window-shadow=-:::(true false)" \
"--macos-auto-secure-input=-:::(true false)" \
"--macos-secure-input-indication=-:::(true false)" \
"--linux-cgroup=-:::(never always single-instance)" \
"--linux-cgroup-memory-limit=-:::( )" \
"--linux-cgroup-processes-limit=-:::( )" \
"--linux-cgroup-hard-fail=-:::(true false)" \
"--gtk-single-instance=-:::(desktop false true)" \
"--gtk-titlebar=-:::(true false)" \
"--gtk-tabs-location=-:::(top bottom left right)" \
"--adw-toolbar-style=-:::(flat raised raised-border)" \
"--gtk-wide-tabs=-:::(true false)" \
"--gtk-adwaita=-:::(true false)" \
"--desktop-notifications=-:::(true false)" \
"--bold-is-bright=-:::(true false)" \
"--term=-:::( )" \
"--enquiry-response=-:::( )" \
"--auto-update=-:::(off check download)" \
}
_ghostty() {
typeset -A opt_args
local context state line
local opt=('--help' '--version')
_arguments -C \
'1:actions:->actions' \
'*:: :->rest' \
if [[ "$line[1]" == "--help" || "$line[1]" == "--version" ]]; then
return
fi
if [[ "$line[1]" == -* ]]; then
_config
return
fi
case "$state" in
(actions)
local actions; actions=(
'+version'
'+help'
'+list-fonts'
'+list-keybinds'
'+list-themes'
'+list-colors'
'+list-actions'
'+show-config'
'+validate-config'
'+crash-report'
)
_describe '' opt
_describe -t action 'action' actions
;;
(rest)
if [[ "$line[2]" == "--help" ]]; then
return
fi
local help=('--help')
_describe '' help
case $line[1] in
(+list-fonts)
_arguments \
'--family=-:::( )' \
'--style=-:::( )' \
'--bold=-:::(true false)' \
'--italic=-:::(true false)' \
;;
(+list-keybinds)
_arguments \
'--default=-:::(true false)' \
'--docs=-:::(true false)' \
'--plain=-:::(true false)' \
;;
(+list-themes)
_arguments \
'--path=-:::(true false)' \
'--plain=-:::(true false)' \
;;
(+list-actions)
_arguments \
'--docs=-:::(true false)' \
;;
(+show-config)
_arguments \
'--default=-:::(true false)' \
'--changes-only=-:::(true false)' \
'--docs=-:::(true false)' \
;;
(+validate-config)
_arguments \
'--config-file=-:::_files' \
;;
esac
;;
esac
}
_ghostty "$@"
```
</details>
I agree to relicense my commits to MIT
2024-12-11 08:57:59 -08:00
Anund
c7deea6a7f
zsh: add completions generation
2024-12-11 21:11:38 +11:00
Mitchell Hashimoto
247409d705
New Ghostty icon
...
❤️ 👻
This is the icon that we'll launch Ghostty 1.0 with. It was designed by
Michael Flareup at PixelResort. It retains the style of the original
Ghostty icon by Alasdair Monk, but brings in the new Ghost character and
adds details that make it more Apple-like.
The new Ghost character is an important evolution from the original
since it separates us from looking too much like PacMan. The new Ghost
is more unique and recognizable to Ghostty (or, hopefully will be!).
The icon itself has more details: the aluminum around the edge has
texture for the large enough sizes, there are visible scanlines, the
glow of a screen emanates from the ghost.
The icon itself is stylistic more Apple-like than other platforms. I
think Apple icons tend to look very good in more environments than the
reverse and I'm a big fan of the Apple aesthetic so I wanted to bring
that to Ghostty for all platforms.
2024-12-09 10:01:18 -08:00
Andrej Daskalov
074312c5ef
updated permissions and build process
...
Removed check for plasma in build.zig, it installs it anyways now
Added executable permissions for ghostty_dolphin.desktop since Plasma
requires them for context menu items
2024-11-29 11:14:17 +01:00
Andrej Daskalov
4be06d1c11
rename file to match package
2024-11-29 00:27:51 +01:00
Andrej Daskalov
62fe3eb652
added right click action for plasma
2024-11-28 23:41:55 +01:00
Mitchell Hashimoto
3392659e1f
Revert "macos: enable Metal shader logging"
...
This reverts commit aad101565a .
2024-11-20 15:01:27 -08:00
Mitchell Hashimoto
5f49ffad6a
Merge pull request #2736 from ghostty-org/push-sltwuokrztpt
...
macos: enable Metal shader logging
2024-11-20 06:37:29 -08:00
Anthony
daa0fe00b1
Change oniguruma link target from `oniguruma` to `onig`
2024-11-20 18:34:21 +11:00
Mitchell Hashimoto
aad101565a
macos: enable Metal shader logging
...
This enables the compile options and Xcode configuration so that logging
in Metal shaders shows up in our Xcode debug console. This doesn't add
any log messages, but makes it so that when we iterate on the shaders in
the future, we can add and see logs to help us out.
2024-11-19 18:59:41 -08:00
Mitchell Hashimoto
cd214dbeac
build: always emit-docs in system packaging mode
...
System packages are always going to want docs. This forces to true so a
build error can appear if `pandoc` is unavailable.
2024-11-18 08:15:19 -08:00
Mitchell Hashimoto
002832deb5
Merge pull request #2703 from furtidev/port-to-latest-vaxis
...
cli: update to latest libvaxis and fix `+list-themes` bugs
2024-11-16 08:49:02 -08:00
furtidev
eb9b7681c7
dep: add latest libvaxis and zf
2024-11-16 19:38:22 +06:00
Mitchell Hashimoto
d205f6a560
build: -Dpie default to true in system package mode
...
Fixes #2673
Rather than document this too much, I think it makes sense to just
default this to true when system package mode is enabled (`--system`)
since it seems that in multiple package ecosystems this is the desired
behavior.
This can still be overridden by setting `-Dpie=false`.
2024-11-14 09:34:07 -08:00
Mitchell Hashimoto
dfe33dc9bb
build.zig: add -Dpie option for position independent executables
...
This is required by some packaging ecosytems.
2024-11-11 19:24:02 -08:00
Jeffrey C. Ollie
b353ddf46d
core/gtk: unify libadwaita/adwaita options in the code
...
Fixes #2574
2024-11-08 22:19:04 -06:00
phillip-hirsch
b5ed4cb680
feat: Add syntax highlighting for bat
2024-11-06 17:06:24 -05:00
Tristan Partin
16e8095d52
feat: install neovim plugin
...
$prefix/share/vim/vimfiles is not always read by Neovim. It is
distribution dependent. $prefix/share/nvim/site is a default path for
Neovim however.
Signed-off-by: Tristan Partin <tristan@partin.io>
2024-11-04 19:58:50 -06:00
Mitchell Hashimoto
038b3dec79
update zig-objc
...
This fixes a hack we had around apple paths since we do this now
upstream in zig-objc. This also adds in support for NSFastEnumeration
needed for #2586
2024-11-03 15:21:26 -08:00
Nyaa97
7eb5563e9c
Fix linking freetype and glslang
2024-10-30 16:43:41 -04:00
Rithul Kamesh
c625d43818
build: require exact major/minor Zig version
2024-10-27 08:33:36 -06:00
Mitchell Hashimoto
4095b189ed
build: only default system libs to false on macOS
2024-10-24 15:28:53 -07:00
Mitchell Hashimoto
8bb8b01e54
build: use Zig system packaging options
...
This allows dynamically linking against system libraries, which is
particularly useful for packaging.
2024-10-24 14:46:37 -07:00
Mitchell Hashimoto
2bbbdf7433
build: strip symbols from release builds
...
This significantly reduces the size of the binary.
2024-10-15 09:46:15 -07:00
Qwerasd
d38d0f30c4
font/sprite: replace pixman with z2d, extend Box coverage
...
More complete coverage of the Symbols For Legacy Computing block,
including characters from Unicode 16.0.
Pixman and the web canvas impl for Canvas have been removed in favor of
z2d for drawing, since it has a nicer API with more powerful methods,
and is in Zig with no specific platform optimizations so should compile
to wasm no problem.
2024-10-14 17:50:49 -04:00
Mitchell Hashimoto
eec77e271c
macos: change our minimum version to macOS 13
...
macOS 12 is officially EOL by Apple and the project only supports
officially supported versions of macOS. Once publicly released, users on
older macOS versions will have to use older released builds.
2024-10-09 14:41:57 -07:00
Mitchell Hashimoto
124ffb3ecb
build: use the native target for generic macos target by default
...
Fixes #2426
2024-10-09 14:08:48 -07:00
Jeffrey C. Ollie
ab0a736089
gtk: load css when libadwaita is not being used
2024-10-08 11:17:32 -05:00
Jeffrey C. Ollie
a969364f93
cli/list-themes: add ability to search theme names
2024-09-27 10:53:58 -07:00
Jeffrey C. Ollie
743e547235
cli: "fancy" theme preview
...
This adds a "fancy" theme preview to the `+list-themes` CLI action.
By default, if the command is connected to a TTY, it will display the
fancy preview. If it is not connected to a TTY, or the user specifies
`--plain` on the command line, a simple list of themes will be printed
to stdout.
While in the preview `F1` or `?` will show a help screen.
2024-09-27 10:53:58 -07:00
Mitchell Hashimoto
47b3e5617f
build: support building without .git directory
...
Fixes #2223
2024-09-12 09:39:17 -07:00
Jeffrey C. Ollie
6edeb45e7e
kitty graphics: address review comments
...
- move wuffs code from src/ to pkg/
- eliminate stray debug logs
- make logs a warning instead of an error
- remove initialization of some structs to zero
2024-09-02 20:47:07 -07:00
Jeffrey C. Ollie
6dbb82c259
kitty graphics: performance enhancements
...
Improve the performance of Kitty graphics by switching to the WUFFS
library for decoding PNG images and for "swizzling" G, GA, and RGB data
to RGBA formats needed by the renderers.
WUFFS claims 2-3x performance benefits over other implementations, as
well as memory-safe operations.
Although not thorougly benchmarked, performance is on par with Kitty's
graphics decoding.
https://github.com/google/wuffs
2024-09-02 20:45:08 -07:00
Mitchell Hashimoto
2f32efbc82
Merge pull request #2173 from ghostty-org/crashlog
...
Initial Crash Logging
2024-09-02 10:35:27 -07:00
Mitchell Hashimoto
17db317916
build: build without Git, tag version as dev with 0 SHA
...
Fixes #2170
Example now: `info: ghostty version=0.1.0-dev+0000000`
2024-08-31 09:43:30 -07:00
Mitchell Hashimoto
e6ae8107c4
build: include breakpad in static lib bundle for lib
2024-08-28 21:44:38 -07:00
Mitchell Hashimoto
7613e5f211
add pkg/breakpad, configure sentry to use breakpad
2024-08-28 21:43:18 -07:00
Mitchell Hashimoto
13f1752836
build: don't include sentry on windows
2024-08-28 21:43:18 -07:00
Mitchell Hashimoto
2abdf291f4
implement sentry transport to write crash reports to XDG_STATE_HOME
2024-08-28 21:43:18 -07:00
Mitchell Hashimoto
42b3ee8df2
build: always compile sentry
2024-08-28 21:43:17 -07:00
Mitchell Hashimoto
adbb394e44
initialize sentry on startup
2024-08-28 21:43:17 -07:00
Mitchell Hashimoto
9409e3072f
apprt/gtk: remove usingnamespace
2024-08-16 14:58:04 -07:00
Qwerasd
57d850822e
macos/opengl: lock context while rendering to stop resize crashes
2024-08-14 23:47:33 -04:00
x123
502c89dce5
fix: vaxis recursive deps issue
2024-08-07 18:32:04 +02:00
Mitchell Hashimoto
0ec0cc0f95
build: build proper metallib for iOS builds
2024-08-06 16:04:41 -07:00
Mitchell Hashimoto
ab7f0c6119
Merge pull request #2056 from ghostty-org/metal
...
metal: precompile shaders as part of the build
2024-08-06 15:44:35 -07:00
Mitchell Hashimoto
c116d147d6
build: build metal lib
2024-08-06 15:30:48 -07:00
Mitchell Hashimoto
64c267a8c7
Merge pull request #2052 from rockorager/pretty-print
...
cli/list-keybinds: add pretty printing
2024-08-06 14:53:15 -07:00
Tim Culverhouse
59e226154c
cli/list-keybinds: add pretty printing
...
Add pretty printing to the +list-keybinds command. This is done by
bringing in a dependency on libvaxis to handle the styling. Pretty
printing happens automatically when printing to a tty, and can be
disabled either by redirecting output or using the flag `--plain`
2024-08-06 12:19:39 -05:00
Łukasz Niemier
f9be02a20f
chore: clean up typos
2024-08-05 13:56:57 +02:00
Mitchell Hashimoto
27acd71105
simd: add base64 functions from simdutf
2024-07-16 20:12:45 -07:00
Mitchell Hashimoto
6da2ef9112
build: if emit-docs is not set, still create share/man
2024-07-02 14:01:40 -07:00
Mitchell Hashimoto
00745f4caa
update README for Zig 0.13
2024-06-24 15:36:05 -07:00
Mitchell Hashimoto
98689413b4
disable AVX512 until Zig issue is resolved
...
https://github.com/ziglang/zig/issues/20414
2024-06-24 15:16:24 -07:00
Mitchell Hashimoto
cb76fe6634
fix linux builds
2024-06-24 15:16:24 -07:00
Mitchell Hashimoto
53423f1071
0.13 conversions
2024-06-24 15:16:24 -07:00
Mitchell Hashimoto
a30e791c85
begin 0.13 update process -- very broken
2024-06-24 15:16:22 -07:00
Jan200101
11a9dd9dad
build: prevent breakage with relative paths
...
`root()` returns `@src().file` which isn't guaranteed to be an absolute path
2024-05-26 17:46:26 +02:00
Jared Widberg
dc613f221b
Revert cc29f06863
2024-04-27 20:06:56 -04:00
Mitchell Hashimoto
99b963d4b0
build.zig: change required zig version
2024-04-21 10:27:26 -07:00
Mitchell Hashimoto
9fc4bc1e14
build: absolute path should not use b.path
2024-04-18 14:57:00 -07:00
Mitchell Hashimoto
736623b7ec
build: use b.path everywhere
2024-04-18 14:51:41 -07:00
Mitchell Hashimoto
e4cbd522e8
update zig
2024-04-18 14:37:05 -07:00
Mitchell Hashimoto
b915c61fee
build: fix broken install header call for Linux
2024-04-17 20:50:50 -07:00
Mitchell Hashimoto
595f24585e
working on more zig breaking changes
2024-04-17 20:50:50 -07:00
Mitchell Hashimoto
fd4d2313d0
build: do not build/link harfbuzz on macOS
2024-04-04 12:22:35 -07:00
Gordon Cassie
3e8193c342
fix(build): solve issue with building tests on certain apple cpus.
2024-04-01 11:45:06 -07:00
Mitchell Hashimoto
b6f5970264
minor style changes
2024-03-28 14:45:44 -07:00
Jeffrey C. Ollie
9f0468f950
generate gresource xml and dependencies at comptime rather than hardcoding
2024-03-27 16:47:27 -05:00
Jeffrey C. Ollie
f943a4cf87
GTK: Add compiled-in GTK resources and use them for icons.
...
Use glib-compile-resources to compile CSS style sheets and icons into
the Ghostty GTK binary. Makes for simpler access to icons and sets
things up for customizing the look of Ghostty with CSS in the future.
The CSS style sheets are blank for now so there will be no visual
changes.
2024-03-27 16:47:26 -05:00
Mitchell Hashimoto
badedf81a7
build.zig update min zig version
2024-03-22 20:25:55 -07:00
Mitchell Hashimoto
b48d24a546
update zig
2024-03-13 09:14:12 -07:00
Mitchell Hashimoto
13c5a70da7
build.zig update required zig version
2024-03-12 14:32:20 -07:00
Mitchell Hashimoto
737e7758e4
update zig version
2024-02-27 08:57:31 -08:00
Mitchell Hashimoto
d92beab1d8
update zig version
2024-02-20 16:43:25 -08:00
Gregory Anders
4df6b36713
Update minimum Zig version in build.zig
...
This is the version required to use the new std.os.O struct format from
https://github.com/mitchellh/ghostty/pull/1509 .
2024-02-18 09:43:13 -06:00
Jonathan Marler
7f6088ee1f
windows: add rc file
...
Adds an rc file for windows. An rc file is a source file given to the
toolchain that instructs it on what "resources" to embed inside the
executable. You can think of "resources" as files or data that get
embedded into the executable and can be accessed both by the application
at runtime or by the OS. The OS uses resources for things like getting
the icon of the executable or extracting the version of an exe for the
user. Note that exe resources can also be modified without having to
recompile/relink the binary.
Thanks to Squeek502 zig has its own "RC Compiler" so this should still be
buildable on all platforms.
In the RC file I've included some basic info and left in comments for
other info to be populated later. I've also included a manifest file
which starts out by telling windows that our exe will be DPI aware and
to use a slightly more modern look and feel for native controls.
2024-02-11 08:51:43 -07:00
Mitchell Hashimoto
be61e0025f
update min zig version
2024-02-10 16:46:09 -08:00
Mitchell Hashimoto
28c078ec37
update req version in build.zig
2024-02-10 16:43:57 -08:00
Mitchell Hashimoto
a471756ee0
build: unigen needs libc
2024-02-08 21:34:28 -08:00
Mitchell Hashimoto
4834b8e925
remove utf8proc
2024-02-08 21:11:11 -08:00
Mitchell Hashimoto
9755d0696e
unicode: generate our own lookup tables
2024-02-08 21:01:11 -08:00
Mitchell Hashimoto
4ae41579da
add utf8proc back for bench
2024-02-08 13:21:36 -08:00
Mitchell Hashimoto
88d81602fa
simd/codepoint-width: wip
2024-02-06 22:28:26 -08:00