mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-03 23:27:59 +00:00
a41fb29e01
Implements the basics of keyboard and mouse handling. Some keys will need special treatment, like Backspace/Delete. In this PR, all keys are treated as append-only. Leaving this for a follow-up. I used @gabydd 's branch as a reference (thank you!) as well as https://github.com/xkbcommon/libxkbcommon/blob/master/doc/quick-guide.md For future work, I'll also use https://github.com/xkbcommon/libxkbcommon/blob/master/tools/interactive-x11.c All commits are separately compileable and reviewable. Release Notes: - N/A --------- Co-authored-by: Mikayla Maki <mikayla@zed.dev>
51 lines
1 KiB
Bash
Executable file
51 lines
1 KiB
Bash
Executable file
#!/usr/bin/bash -e
|
|
|
|
# if sudo is not installed, define an empty alias
|
|
maysudo=$(command -v sudo || true)
|
|
|
|
# Ubuntu, Debian, etc.
|
|
# https://packages.ubuntu.com/
|
|
apt=$(command -v apt-get || true)
|
|
if [[ -n $apt ]]; then
|
|
deps=(
|
|
libasound2-dev
|
|
libfontconfig-dev
|
|
vulkan-validationlayers*
|
|
libwayland-dev
|
|
libxkbcommon-x11-dev
|
|
)
|
|
$maysudo "$apt" install -y "${deps[@]}"
|
|
exit 0
|
|
fi
|
|
|
|
# Fedora, CentOS, RHEL, etc.
|
|
# https://packages.fedoraproject.org/
|
|
dnf=$(command -v dnf || true)
|
|
if [[ -n $dnf ]]; then
|
|
deps=(
|
|
alsa-lib-devel
|
|
fontconfig-devel
|
|
vulkan-validation-layers
|
|
wayland-devel
|
|
libxkbcommon-x11-devel
|
|
)
|
|
$maysudo "$dnf" install -y "${deps[@]}"
|
|
exit 0
|
|
fi
|
|
|
|
# Arch, Manjaro, etc.
|
|
# https://archlinux.org/packages
|
|
pacman=$(command -v pacman || true)
|
|
if [[ -n $pacman ]]; then
|
|
deps=(
|
|
alsa-lib
|
|
fontconfig
|
|
vulkan-validation-layers
|
|
wayland
|
|
libxkbcommon-x11
|
|
)
|
|
$maysudo "$pacman" -S --needed --noconfirm "${deps[@]}"
|
|
exit 0
|
|
fi
|
|
|
|
echo "Unsupported Linux distribution in script/linux"
|