on master help sign in
Add instructions for gnome desktop support using the `.desktop` file (#4165)
7af7dadDavid
README.md+22−5
@@ -48,11 +48,11 @@ tree-sitter grammars may be manually fetched and built with `hx --grammar fetch`
48Helix also needs its runtime files so make sure to copy/symlink the `runtime/` directory into the
48Helix also needs its runtime files so make sure to copy/symlink the `runtime/` directory into the
49config directory (for example `~/.config/helix/runtime` on Linux/macOS, or `%AppData%/helix/runtime` on Windows).
49config directory (for example `~/.config/helix/runtime` on Linux/macOS, or `%AppData%/helix/runtime` on Windows).
50
50
51−| OS | Command |
51+| OS | Command |
52−| -------------------- | -------------------------------------------- |
52+| -------------------- | ------------------------------------------------ |
53−| Windows (cmd.exe) | `xcopy /e /i runtime %AppData%\helix\runtime` |
53+| Windows (cmd.exe) | `xcopy /e /i runtime %AppData%\helix\runtime` |
54−| Windows (PowerShell) | `xcopy /e /i runtime $Env:AppData\helix\runtime` |
54+| Windows (PowerShell) | `xcopy /e /i runtime $Env:AppData\helix\runtime` |
55−| Linux/macOS | `ln -s $PWD/runtime ~/.config/helix/runtime` |
55+| Linux/macOS | `ln -s $PWD/runtime ~/.config/helix/runtime` |
56
56
57This location can be overridden via the `HELIX_RUNTIME` environment variable.
57This location can be overridden via the `HELIX_RUNTIME` environment variable.
58
58
@@ -68,6 +68,23 @@ for a language.
68
68
69[![Packaging status](https://repology.org/badge/vertical-allrepos/helix.svg)](https://repology.org/project/helix/versions)
69[![Packaging status](https://repology.org/badge/vertical-allrepos/helix.svg)](https://repology.org/project/helix/versions)
70
70
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+
71## MacOS
88## MacOS
72
89
73Helix can be installed on MacOS through homebrew:
90Helix can be installed on MacOS through homebrew:
book/src/install.md+25−9
@@ -60,24 +60,40 @@ cargo install --path helix-term
60
60
61This will install the `hx` binary to `$HOME/.cargo/bin`.
61This will install the `hx` binary to `$HOME/.cargo/bin`.
62
62
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
64config directory (for example `~/.config/helix/runtime` on Linux/macOS). This location can be overridden
64config directory (for example `~/.config/helix/runtime` on Linux/macOS). This location can be overridden
65via the `HELIX_RUNTIME` environment variable.
65via the `HELIX_RUNTIME` environment variable.
66
66
67−| OS | command |
67+| OS | command |
68−|-------------------|-----------|
68+| ------------------- | ------------------------------------------------ |
69−|windows(cmd.exe) |`xcopy /e /i runtime %AppData%/helix/runtime` |
69+| windows(cmd.exe) | `xcopy /e /i runtime %AppData%/helix/runtime` |
70−|windows(powershell)|`xcopy /e /i runtime $Env:AppData\helix\runtime` |
70+| windows(powershell) | `xcopy /e /i runtime $Env:AppData\helix\runtime` |
71−|linux/macos |`ln -s $PWD/runtime ~/.config/helix/runtime`|
71+| linux/macos | `ln -s $PWD/runtime ~/.config/helix/runtime` |
72
72
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+
73−## Finishing up the installation
88+## Finishing up the installation
89+
90+To make sure everything is set up as expected you should finally run the helix healthcheck via
74
91
75−To make sure everything is set up as expected you should finally run the helix healthcheck via
76```
92```
77hx --health
93hx --health
78```
94```
79−For more information on the information displayed in the healthcheck results refer to [Healthcheck](https://github.com/helix-editor/helix/wiki/Healthcheck).
80
95
96+For more information on the information displayed in the health check results refer to [Healthcheck](https://github.com/helix-editor/helix/wiki/Healthcheck).
81
97
82### Building tree-sitter grammars
98### Building tree-sitter grammars
83
99