on master help sign in
Add instructions for gnome desktop support using the `.desktop` file (#4165)
commit7af7dadd17a45a22633cad2325ca3cf9ac815ca7 authorDavid <12832280+David-Else@users.noreply.github.com> dateMon 10 Oct 2022, 18:23 (4 years ago) parent530f9e3
2 files changed+47−14
README.md+22−5 book/src/install.md+25−9
README.md+22−5
@@ -48,11 +48,11 @@ tree-sitter grammars may be manually fetched and built with `hx --grammar fetch`
4848Helix also needs its runtime files so make sure to copy/symlink the `runtime/` directory into the
4949config directory (for example `~/.config/helix/runtime` on Linux/macOS, or `%AppData%/helix/runtime` on Windows).
5050
51−| OS | Command |
52−| -------------------- | -------------------------------------------- |
53−| Windows (cmd.exe) | `xcopy /e /i runtime %AppData%\helix\runtime` |
54−| Windows (PowerShell) | `xcopy /e /i runtime $Env:AppData\helix\runtime` |
55−| Linux/macOS | `ln -s $PWD/runtime ~/.config/helix/runtime` |
51+| OS | Command |
52+| -------------------- | ------------------------------------------------ |
53+| Windows (cmd.exe) | `xcopy /e /i runtime %AppData%\helix\runtime` |
54+| Windows (PowerShell) | `xcopy /e /i runtime $Env:AppData\helix\runtime` |
55+| Linux/macOS | `ln -s $PWD/runtime ~/.config/helix/runtime` |
5656
5757This location can be overridden via the `HELIX_RUNTIME` environment variable.
5858
@@ -68,6 +68,23 @@ for a language.
6868
6969[![Packaging status](https://repology.org/badge/vertical-allrepos/helix.svg)](https://repology.org/project/helix/versions)
7070
71+## Adding Helix to your desktop environment
72+
73+If installing from source, to use Helix in desktop environments that supports [XDG desktop menu](https://specifications.freedesktop.org/menu-spec/menu-spec-latest.html), including Gnome and KDE, copy the provided `.desktop` file to the correct folder:
74+
75+```bash
76+cp contrib/Helix.desktop ~/.local/share/applications
77+```
78+
79+To use another terminal than the default, you will need to modify the `.desktop` file. For example, to use `kitty`:
80+
81+```bash
82+sed -i "s|Exec=hx %F|Exec=kitty hx %F|g" ~/.local/share/applications/Helix.desktop
83+sed -i "s|Terminal=true|Terminal=false|g" ~/.local/share/applications/Helix.desktop
84+```
85+
86+Please note: there is no icon for Helix yet, so the system default will be used.
87+
7188## MacOS
7289
7390Helix can be installed on MacOS through homebrew:
book/src/install.md+25−9
@@ -60,24 +60,40 @@ cargo install --path helix-term
6060
6161This will install the `hx` binary to `$HOME/.cargo/bin`.
6262
63−Helix also needs it's runtime files so make sure to copy/symlink the `runtime/` directory into the
63+Helix also needs its runtime files so make sure to copy/symlink the `runtime/` directory into the
6464config directory (for example `~/.config/helix/runtime` on Linux/macOS). This location can be overridden
6565via the `HELIX_RUNTIME` environment variable.
6666
67−| OS | command |
68−|-------------------|-----------|
69−|windows(cmd.exe) |`xcopy /e /i runtime %AppData%/helix/runtime` |
70−|windows(powershell)|`xcopy /e /i runtime $Env:AppData\helix\runtime` |
71−|linux/macos |`ln -s $PWD/runtime ~/.config/helix/runtime`|
67+| OS | command |
68+| ------------------- | ------------------------------------------------ |
69+| windows(cmd.exe) | `xcopy /e /i runtime %AppData%/helix/runtime` |
70+| windows(powershell) | `xcopy /e /i runtime $Env:AppData\helix\runtime` |
71+| linux/macos | `ln -s $PWD/runtime ~/.config/helix/runtime` |
7272
73−## Finishing up the installation
73+To use Helix in desktop environments that supports [XDG desktop menu](https://specifications.freedesktop.org/menu-spec/menu-spec-latest.html), including Gnome and KDE, copy the provided `.desktop` file to the correct folder:
74+
75+```bash
76+cp contrib/Helix.desktop ~/.local/share/applications
77+```
78+
79+To use another terminal than the default, you will need to modify the `.desktop` file. For example, to use `kitty`:
80+
81+```bash
82+sed -i "s|Exec=hx %F|Exec=kitty hx %F|g" ~/.local/share/applications/Helix.desktop
83+sed -i "s|Terminal=true|Terminal=false|g" ~/.local/share/applications/Helix.desktop
84+```
85+
86+Please note: there is no icon for Helix yet, so the system default will be used.
87+
88+## Finishing up the installation
89+
90+To make sure everything is set up as expected you should finally run the helix healthcheck via
7491
75−To make sure everything is set up as expected you should finally run the helix healthcheck via
7692```
7793hx --health
7894```
79−For more information on the information displayed in the healthcheck results refer to [Healthcheck](https://github.com/helix-editor/helix/wiki/Healthcheck).
8095
96+For more information on the information displayed in the health check results refer to [Healthcheck](https://github.com/helix-editor/helix/wiki/Healthcheck).
8197
8298### Building tree-sitter grammars
8399