hyprland-wiki/pages/Getting Started/Master-Tutorial.md

157 lines
5.4 KiB
Markdown
Raw Permalink Normal View History

---
2024-07-30 16:37:26 +02:00
weight: 2
title: Master tutorial
---
2023-01-09 20:18:37 +01:00
If you are coming to Hyprland for the first time, this is the main tutorial to
read.
2023-01-09 20:18:37 +01:00
2024-07-30 16:37:26 +02:00
This tutorial covers everything you need to get things going. It links to other
pages where necessary.
2023-01-09 20:18:37 +01:00
## Install Hyprland
2024-03-17 13:44:39 +01:00
See [Installation](../Installation) and come back here once you have
successfully installed Hyprland.
2024-07-30 16:37:26 +02:00
Install `kitty` (default terminal emulator). This is available in most distros'
repositories.
2023-01-09 20:18:37 +01:00
2024-07-30 16:37:26 +02:00
## Nvidia?
2024-11-06 19:34:37 +01:00
{{< callout type=info >}}
If not using an Nvidia card, skip this step.
{{< /callout >}}
2023-01-09 20:18:37 +01:00
2024-07-30 16:37:26 +02:00
Please take a look at [The Nvidia page](../../Nvidia) before launching. It has
information regarding the needed environment and tweaks.
2023-01-09 20:18:37 +01:00
## VM?
2024-11-06 19:34:37 +01:00
{{< callout type=info >}}
If not using a VM, skip this step.
{{< /callout >}}
2023-01-09 20:18:37 +01:00
2024-07-30 16:37:26 +02:00
In a VM, make sure you have 3D acceleration enabled in your `virtio` config (or
`virt-manager`) otherwise Hyprland _**will not work**_.
2023-01-09 20:18:37 +01:00
You can also passthru a GPU to make it work.
2024-07-30 16:37:26 +02:00
Please bear in mind 3D acceleration in VMs may be pretty slow.
2023-03-05 14:18:13 +01:00
## Launching Hyprland
2023-01-09 20:18:37 +01:00
2024-11-06 19:34:37 +01:00
Hyprland can be executed by typing `Hyprland` in your tty.
Systemd users can also start Hyprland, using [uwsm](https://github.com/Vladimir-csp/uwsm). This is the recommended method of launching Hyprland on systemd-based distros, as it provides additional features such as [xdg-autostart](https://www.freedesktop.org/software/systemd/man/latest/systemd-xdg-autostart-generator.html) support, launching any application as a systemd-unit with `uwsm app` helper, and the ability to enable services for programs that rely on a graphical session and provide such services (e.g waybar). See [uwsm](../../Useful-Utilities/Systemd-start) page for further instructions.
2023-01-09 20:18:37 +01:00
2024-07-30 16:37:26 +02:00
{{< callout type=warning >}}
2023-01-09 20:18:37 +01:00
2024-07-30 16:37:26 +02:00
Do **not** launch Hyprland with `root` permissions (don't `sudo`)
{{< /callout >}}
You can see some launch flags by doing `Hyprland -h`, these include setting the
config path, ignoring a check for the above, etc.
2023-04-10 19:28:18 +02:00
2023-01-09 20:18:37 +01:00
Login managers are not officially supported, but here's a short compatibility
list:
- SDDM → Works flawlessly. Install sddm ⩾ 0.20.0 or the
[latest git version](https://github.com/sddm/sddm) (or
[sddm-git](https://aur.archlinux.org/packages/sddm-git) from AUR) to prevent
SDDM bug [1476](https://github.com/sddm/sddm/issues/1476) (90s shutdowns).
2024-07-30 16:37:26 +02:00
- GDM → Works with the caveat of crashing Hyprland on the first launch.
- greetd → Works flawlessly, especially with
[ReGreet](https://github.com/rharish101/ReGreet).
- ly → Works poorly.
2023-01-09 20:18:37 +01:00
2024-09-01 15:20:28 +02:00
## DE-like pre-configured setups
Do you want to just get Hyprland pre-configured like a DE,
without making your own configuration from scratch?
Check out the [Preconfigured setups page](../Preconfigured-setups)
to see a few options.
These dotfiles should do everything for you, and have their own tutorials as well.
If you choose to use those, you can skip the next step. However, it's still recommended to read all the points below
it. They'll give you recommended apps, replacements for old X11 software, information about configuring displays,
etc.
## In Hyprland with the default config
You're good to go with your adventure, technically.
2023-01-09 20:18:37 +01:00
Use <key>SUPER</key> + <key>Q</key> to launch kitty. If you wish to choose the
default terminal before you proceed, you can do so in
`~/.config/hypr/hyprland.conf`
([example config](https://github.com/hyprwm/Hyprland/blob/main/example/hyprland.conf)).
2023-01-09 20:18:37 +01:00
If you want the best experience with less hassle googling, keep reading.
## Critical software
2024-03-17 13:44:39 +01:00
See the [Must-have Software page](../../Useful-Utilities/Must-have) for the
crucial things to make Wayland / Hyprland / other apps work correctly.
2023-01-09 20:18:37 +01:00
## Monitors config
2024-03-17 13:44:39 +01:00
See [Configuring Hyprland page](../../Configuring/Monitors) to learn all about
configuring your displays.
2023-01-09 20:18:37 +01:00
## Apps / X11 replacements
2024-03-17 13:44:39 +01:00
See the [Useful Utilities page](../../Useful-Utilities) and the
2023-01-09 20:18:37 +01:00
[Sway wiki page](https://github.com/swaywm/sway/wiki/Useful-add-ons-for-sway)
2024-07-30 16:37:26 +02:00
about that. You can also visit the
2023-02-03 18:52:37 +01:00
[Awesome-Hyprland](https://github.com/hyprland-community/awesome-hyprland)
repository for a more comprehensive list.
2023-01-09 20:18:37 +01:00
2024-07-30 16:37:26 +02:00
## Fully configure Hyprland
2023-01-09 20:18:37 +01:00
Head onto the
[Configuring Hyprland page](../../Configuring) to learn all
2024-07-30 16:37:26 +02:00
about configuring Hyprland to your liking.
2023-01-09 20:36:34 +01:00
## Cursors
2023-01-09 20:36:34 +01:00
Cursors are a notorious pain to set up when you don't know how. See
2024-03-17 13:44:39 +01:00
[this FAQ entry](../../FAQ#how-do-i-change-me-mouse-cursor)
2023-01-09 20:36:34 +01:00
2024-07-30 16:37:26 +02:00
If your cursor does not appear, see
2024-03-17 13:44:39 +01:00
[this FAQ entry](../../FAQ#me-cursor-no-render)
2023-01-09 20:36:34 +01:00
## Themes
2024-07-30 16:37:26 +02:00
Since Hyprland is not a fully-fledged Desktop Environment, you will need to use
tools such as `lxappearance` or `nwg-look` (recommended) for GTK, and `qt5ct` /
`qt6ct` for their respective Qt versions. Some older applications may also
require `qt4ct`.
2023-01-09 20:39:18 +01:00
## Force apps to use Wayland
2023-01-09 21:18:22 +01:00
A lot of apps will use Wayland by default. Chromium (and other browsers based on
2024-07-30 16:37:26 +02:00
it, or Electron) don't. You need to pass
`--enable-features=UseOzonePlatform --ozone-platform=wayland` to them or use
`.conf` files where possible. Chromium-based browsers also should have a toggle
2024-07-30 16:37:26 +02:00
in `chrome://flags`. Search for _"ozone"_ and select Wayland. If you are on
NixOS you can also set the environment variable `NIXOS_OZONE_WL=1` in your
configuration.
For most electron apps, you should put the above in
2024-07-30 16:37:26 +02:00
`~/.config/electron-flags.conf`. Note that VSCode is known **not** to work with
it.
2023-01-09 21:18:22 +01:00
A few more environment variables for forcing Wayland mode are documented
2024-03-17 13:44:39 +01:00
[here](../../Configuring/Environment-variables).
2023-03-26 20:52:25 +02:00
You can check whether an app is running in xwayland or not with
`hyprctl clients`.