2022-08-12 20:46:36 +02:00
# Foreword
2022-08-24 06:41:31 +02:00
Due to their proprietary nature, Nvidia GPUs have limited compatibility with
Hyprland. If you want to try Hyprland on Nvidia regardless
(many people have reported successes), follow the [Nvidia page ](../../Nvidia )
after installing Hyprland.
2022-08-12 20:46:36 +02:00
2022-10-23 16:35:39 +02:00
## Distros
2022-08-12 20:46:36 +02:00
2022-08-22 14:06:25 +02:00
Arch, NixOS and openSUSE Tumbleweed are very supported. For any other distro
(not based on Arch/Nix) you might have varying amounts of success. However,
since Hyprland is extremely bleeding-edge, distros like Pop!\_OS, Ubuntu, etc.
might have **major** issues running Hyprland.
2022-08-12 20:46:36 +02:00
2022-10-23 16:35:39 +02:00
## Installation
2022-08-12 20:46:36 +02:00
Installing Hyprland is very easy. Either you install it from your local package
provider (if they provide pkgs for Hyprland) or you install/build it yourself.
2022-08-13 10:41:13 +02:00
{{< hint title = note > }}
This project is under development and is constantly
2022-08-13 01:47:48 +02:00
changing. If you want to keep up to date with the latest commits, please
consider updating your packages with `yay -Syu --devel` , or your other preferred
2022-08-24 06:41:31 +02:00
package manager.
2022-08-13 10:41:13 +02:00
{{< / hint > }}
2022-08-12 20:46:36 +02:00
2022-10-23 16:35:39 +02:00
### Packages
2022-08-12 20:46:36 +02:00
**WARNING:** I do not maintain any packages. If they are broken, try building
from source first.
2022-08-13 10:41:13 +02:00
{{< tabs " uniqueid " > }}
2022-08-12 20:46:36 +02:00
2023-04-06 20:49:50 +02:00
{{< tab " Arch Linux " > }}
2022-08-13 01:45:14 +02:00
```plain
2023-04-06 20:49:50 +02:00
hyprland-git (AUR) - compiles from latest source
hyprland - binary x86 tagged release
2022-08-12 20:46:36 +02:00
```
2022-08-13 10:41:13 +02:00
{{< / tab > }}
2022-08-13 21:11:35 +02:00
{{< tab " Nix " > }}Read the [Nix page ](../../Nix ).{{< / tab > }}
2022-08-22 14:06:25 +02:00
{{< tab " openSUSE " > }}
There are [precompiled packages of Hyprland ](https://build.opensuse.org/package/show/X11:Wayland/hyprland )
available in the [X11:Wayland ](https://build.opensuse.org/project/show/X11:Wayland ) project on OBS.
2022-08-22 14:27:36 +02:00
To install them, follow the instructions at [software.opensuse.org/download.html?project=X11:Wayland&package=hyprland ](https://software.opensuse.org//download.html?project=X11%3AWayland&package=hyprland ) or use [OPI ](https://github.com/openSUSE/opi ) to install it.
2022-08-22 14:06:25 +02:00
```sh
2022-08-24 06:41:31 +02:00
opi hyprland
2022-08-22 14:06:25 +02:00
```
2022-08-22 14:27:36 +02:00
Alternatively, you can also follow the instructions under ["Manual (Manual Build)" ](#manual-manual-build )
2022-08-22 14:06:25 +02:00
to build Hyprland yourself.
2022-10-23 16:35:39 +02:00
Note: _Hyprland is not available for Leap, as most libraries (and compiler) that Hyprland needs are too old._
2022-08-22 14:06:25 +02:00
{{< / tab > }}
2022-08-13 11:48:45 +02:00
{{< tab " Fedora " > }}< https: / / github . com / hyprwm / Hyprland / discussions / 284 > {{< / tab > }}
2022-08-20 22:52:51 +02:00
{{< tab " Gentoo " > }}
2023-02-19 21:59:58 +01:00
The hyprland package is available in the [guru ](https://wiki.gentoo.org/wiki/Project:GURU ) overlay.
2022-08-24 06:41:31 +02:00
2022-08-20 22:52:51 +02:00
```sh
2023-02-19 21:59:58 +01:00
eselect repository enable guru
emaint sync -r guru
2022-08-24 06:41:31 +02:00
emerge --ask --verbose hyprland
2022-08-20 22:52:51 +02:00
```
2022-08-24 06:41:31 +02:00
2022-12-20 17:09:42 +01:00
{{< / tab > }}
{{< tab " FreeBSD " > }}
Hyprland and related are in the default repository:
- [hyprland ](https://www.freshports.org/x11-wm/hyprland )
- [hyprpaper ](https://www.freshports.org/x11/hyprpaper )
- [hyprpicker ](https://www.freshports.org/x11/hyprpicker )
- [xdg-desktop-portal-hyprland ](https://www.freshports.org/x11/xdg-desktop-portal-hyprland )
- [Other Wayland stuff ](https://www.freshports.org/wayland/ )
2022-08-20 22:52:51 +02:00
{{< / tab > }}
2022-08-12 20:46:36 +02:00
2022-08-13 10:41:13 +02:00
{{< / tabs > }}
2022-08-12 20:46:36 +02:00
2022-12-20 17:09:42 +01:00
### Manual (Releases, Linux-only)
2022-08-12 20:46:36 +02:00
Download the most recent release.
copy the binary (Hyprland) to `/usr/bin/` .
copy hyprctl to `/usr/bin/` .
2022-11-09 21:07:45 +01:00
copy the wlroots .so (`libwlroots.so.XX032`) to `/usr/lib/` .
2022-08-12 20:46:36 +02:00
2022-11-09 21:07:45 +01:00
copy the desktop entry (`examples/hyprland.desktop`) to
2022-08-12 20:46:36 +02:00
`/usr/share/wayland-sessions/`
2022-11-09 21:07:45 +01:00
the example config is in `examples/hyprland.conf` .
2022-08-12 20:46:36 +02:00
For updating later on, you can overwrite the binaries (hyprctl, hyprland and
libwlroots), you don't need to update anything else.
2022-10-23 16:35:39 +02:00
### Manual (Manual Build)
2022-08-12 20:46:36 +02:00
2022-10-23 16:35:39 +02:00
_Arch dependencies_:
2022-08-12 20:46:36 +02:00
2022-08-13 01:45:14 +02:00
```plain
2023-03-04 13:30:11 +01:00
yay -S gdb ninja gcc cmake meson libxcb xcb-proto xcb-util xcb-util-keysyms libxfixes libx11 libxcomposite xorg-xinput libxrender pixman wayland-protocols cairo pango seatd libxkbcommon xcb-util-wm xorg-xwayland libinput libliftoff libdisplay-info
2022-08-13 01:45:14 +02:00
```
2022-08-12 20:46:36 +02:00
2022-10-25 16:18:25 +02:00
_(Please make a pull request or open an issue if any packages are missing from the list)_
2022-08-12 20:46:36 +02:00
2022-10-23 16:35:39 +02:00
_openSUSE dependencies_:
2022-08-22 14:06:25 +02:00
```sh
zypper in gcc-c++ git meson cmake "pkgconfig(cairo)" "pkgconfig(egl)" "pkgconfig(gbm)" "pkgconfig(gl)" "pkgconfig(glesv2)" "pkgconfig(libdrm)" "pkgconfig(libinput)" "pkgconfig(libseat)" "pkgconfig(libudev)" "pkgconfig(pango)" "pkgconfig(pangocairo)" "pkgconfig(pixman-1)" "pkgconfig(vulkan)" "pkgconfig(wayland-client)" "pkgconfig(wayland-protocols)" "pkgconfig(wayland-scanner)" "pkgconfig(wayland-server)" "pkgconfig(xcb)" "pkgconfig(xcb-icccm)" "pkgconfig(xcb-renderutil)" "pkgconfig(xkbcommon)" "pkgconfig(xwayland)" glslang-devel Mesa-libGLESv3-devel "pkgconfig(xcb-errors)"
```
2022-08-22 14:27:36 +02:00
(this should also work on RHEL/Fedora if you remove `Mesa-libGLESv3-devel` and `pkgconfig(xcb-errors)` )
2022-08-22 14:06:25 +02:00
2022-12-20 17:09:42 +01:00
_FreeBSD dependencies_:
```plain
pkg install git pkgconf gmake gcc evdev-proto cmake wayland-protocols wayland libglvnd libxkbcommon libinput cairo pixman libxcb
pkg install meson `pkg rquery %dn wlroots`
export CC=gcc CXX=g++ LDFLAGS="-static-libstdc++ -static-libgcc"
```
2022-08-12 20:46:36 +02:00
Please note Hyprland builds `wlroots` . Make sure you have the dependencies of
wlroots installed, you can make sure you have them by installing wlroots
separately (Hyprland doesn't mind)
2022-12-20 17:09:42 +01:00
Also note that Hyprland uses the C++23 standard, so both your compiler
and your C++ library has to support that (`gcc>=12.1.0` or `clang>=15` ).
On Clang-based systems libc++ may be used by default, so until libc++
supports C++23 you have to pass `-stdlib=libstdc++` or switch to GCC.
2022-08-12 20:46:36 +02:00
### CMake (recommended)
2022-08-13 01:45:14 +02:00
```Plain
2022-08-12 20:46:36 +02:00
git clone --recursive https://github.com/hyprwm/Hyprland
cd Hyprland
2022-10-23 16:35:39 +02:00
sudo make install
2022-08-12 20:46:36 +02:00
```
### Meson
2022-08-13 01:45:14 +02:00
```plain
2022-08-12 20:46:36 +02:00
meson _build
ninja -C _build
2022-08-22 14:06:25 +02:00
ninja -C _build install --tags runtime,man
2022-08-12 20:46:36 +02:00
```
2022-08-13 01:47:48 +02:00
Refer to [Debugging ](../../Contributing-and-Debugging ) to see how to build &
debug.
2022-08-12 20:46:36 +02:00
2022-08-13 01:45:14 +02:00
## Crash on launch
2022-08-12 20:46:36 +02:00
2022-08-13 19:56:20 +02:00
See [Crashes and Bugs ](../../Crashes-and-Bugs ).
2022-08-12 20:46:36 +02:00
## Custom installation (legacy renderer, etc)
cd into the hyprland repo.
for legacy renderer:
2022-08-13 01:45:14 +02:00
```plain
2022-12-19 23:49:59 +01:00
sudo make clear & & sudo make config & & make protocols & & make legacyrenderer & & sudo cp ./build/Hyprland /usr/bin & & sudo cp ./example/hyprland.desktop /usr/share/wayland-sessions
2022-08-12 20:46:36 +02:00
```
2022-10-23 16:35:39 +02:00
_please note the legacy renderer may not support some graphical features._
2022-08-12 20:46:36 +02:00
< br />< br /> Any other config: (replace \[PRESET\] with your preset, `release`
`debug` `legacyrenderer` `legacyrendererdebug` )
2022-08-13 01:45:14 +02:00
```plain
2022-12-19 23:49:59 +01:00
sudo make clear & & sudo make config & & make protocols & & make [PRESET] & & sudo cp ./build/Hyprland /usr/bin & & sudo cp ./example/hyprland.desktop /usr/share/wayland-sessions
2022-08-12 20:46:36 +02:00
```
## Custom Build flags
To apply custom build flags, you'll have to ditch make.
Supported custom build flags:
2022-08-13 01:45:14 +02:00
```plain
2022-08-12 20:46:36 +02:00
NO_XWAYLAND - Removes XWayland support
2023-01-11 16:29:34 +01:00
NO_SYSTEMD - Removes systemd dependencies
2022-08-12 20:46:36 +02:00
```
How to?
Go to the root repo.
Clean before everything and config the root:
2022-08-13 01:45:14 +02:00
```plain
2022-12-19 23:49:59 +01:00
make clear & & sudo make config & & make protocols
2022-08-12 20:46:36 +02:00
```
Then, configure CMake:
2022-08-13 01:45:14 +02:00
```plain
2022-08-12 20:46:36 +02:00
mkdir -p build & & cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -D< YOUR_FLAG > :STRING=true -H./ -B./build -G Ninja
```
Change `<YOUR_FLAG>` to one of the custom build flags. You **are allowed to**
use multiple at once, then add another `-D<YOUR_FLAG_2>:STRING=true`
You can of course also change the `BUILD_TYPE` to `Debug` .
Now, build:
2022-08-13 01:45:14 +02:00
```plain
2022-08-22 00:05:38 +02:00
cmake --build ./build --config Release --target all -j $(nproc)
2022-08-12 20:46:36 +02:00
```
If you configured in `Debug` , change the `--config` to `Debug` as well.
Now, of course, install manually.
2022-08-13 01:45:14 +02:00
```plain
2022-08-12 20:46:36 +02:00
sudo cp ./build/Hyprland /usr/bin & & sudo cp ./example/hyprland.desktop /usr/share/wayland-sessions
2023-01-22 08:26:42 +01:00
```