hyprland-wiki/pages/Getting Started/Quick-start.md

139 lines
4.9 KiB
Markdown
Raw Normal View History

After you have installed Hyprland, you can either launch it from a TTY with
2022-08-12 20:46:36 +02:00
`Hyprland` or from a login manager. Although login managers aren't officially
supported, you might want to use `SDDM`, as it's been working flawlessly with wayland
2022-08-12 20:46:36 +02:00
compositors.
It is recommended you have `kitty` installed for terminal access, (example and
autogenerated configs have it bound to <kbd>SUPER</kbd> + <kbd>Q</kbd>).
Alternatively, manually change it in the config before launching Hyprland.
2022-08-12 20:46:36 +02:00
If you have an Nvidia card, please also take a look at
2022-08-13 01:47:48 +02:00
[The Nvidia page](../../Nvidia) before launching. You should **first** make a
wrapper, as described in the section below, then follow the instructions from
the Nvidia page, and then continue on with sections below.
2022-08-12 20:46:36 +02:00
2022-10-21 20:02:06 +02:00
{{< hint type=important >}}
Running Hyprland in a VM is **_unsupported_**. VMs employ a bunch of tactics that
mess with Hyprland, on top of the fact that they do _not_ provide a GPU.
If running Hyprland via `WLR_RENDERER_ALLOW_SOFTWARE=1 Hyprland` does not work,
you are out of luck. Try installing it on a real machine.
Although it's 100% possible to use Hyprland in a VM, if it's not launching it's 99.9%
of the times your fault. Please also keep in mind software rendering is _REALLY_ slow.
{{</ hint >}}
# Wrapping the launcher (recommended)
2022-08-13 01:47:48 +02:00
With Xorg, you get the `.xinitrc`. With Hyprland, you can create your own...
kind of.
2022-08-12 20:46:36 +02:00
Make an executable file somewhere in your `PATH`, for example `~/.local/bin/`,
called (for example) `wrappedhl`
2022-08-12 20:46:36 +02:00
In it, put:
2022-08-13 01:47:48 +02:00
```bash
#!/bin/sh
2022-08-12 20:46:36 +02:00
cd ~
export _JAVA_AWT_WM_NONREPARENTING=1
export XCURSOR_SIZE=24
exec Hyprland
```
You can add as many exported envvars as you need (Nvidia users might need a
lot), but it's recommended to have _at least_ the shown two.
2022-08-12 20:46:36 +02:00
2022-08-13 01:47:48 +02:00
You should now launch Hyprland with `wrappedhl` instead of `Hyprland`. Make sure
2022-10-06 17:23:24 +02:00
to copy your `.desktop` file in `/usr/share/wayland-sessions/` and edit it if you use a
2022-08-13 01:47:48 +02:00
login manager! You might need to put the full path in it, as login managers are
usually not ran through the user account.
2022-08-12 20:46:36 +02:00
2022-10-06 17:23:24 +02:00
{{< hint type=important >}}
It is highly recommended to copy the desktop file to e.g. `wrapped_hl.desktop` instead of editing
the provided one, as many package managers (and `sudo make install`) will **overwrite**
the desktop file on updates. If you manually build Hyprland, consider using `sudo make cleaninstall` to preserve `hyprland.deskop`
2022-10-06 17:23:24 +02:00
{{< /hint >}}
# Immediate
2022-08-12 20:46:36 +02:00
**OMG MY SCREEN IS BROKEN, FLASHY TEARY!** -> see the bottom of this page
Once you log in, you'll be greeted with a yellow warning that will give you some
basic keybind info of your pre-generated config.
2022-08-12 20:46:36 +02:00
To make the warning to go away, remove the `autogenerated=1` line from hyprland.conf
2022-08-12 20:46:36 +02:00
# Monitors
2022-08-12 20:46:36 +02:00
Use `hyprctl monitors` to list available outputs. `hyprctl` will _not_ tell you
2022-09-05 13:30:07 +02:00
what your monitor is capable of though, so if you want to check your resolution / refresh rate,
use a tool like `wlr-randr`.
2022-08-12 20:46:36 +02:00
Then, you can configure your outputs with
```bash
2022-08-12 20:46:36 +02:00
hyprctl keyword monitor NAME,RES@HZ,OFFSET,SCALE
```
`NAME` is the name of the display, e.g. `DP-1`. Can be empty for a global rule.
2022-08-12 20:46:36 +02:00
`RES@HZ` is the resolution and refresh rate, e.g. `1920x1080@144`. Can be
`preferred` for auto-detection.
2022-08-12 20:46:36 +02:00
`OFFSET` is the position of the monitor, e.g. `0x0`. Can be `auto` to
automatically add it to the right of the viewport.
2022-08-12 20:46:36 +02:00
`SCALE` is the display scale, e.g. `1`
example command:
```plain
2022-08-12 20:46:36 +02:00
hyprctl keyword monitor DP-3,1920x1080@240,1920x0,1
```
2022-08-13 10:41:13 +02:00
{{< hint type=important >}} These changes are **not** permanent! If you want to
make those changes persist, configure your outputs in the config! {{< /hint >}}
2022-08-12 20:46:36 +02:00
# Proper configuring
Head onto the
2022-08-13 01:47:48 +02:00
[Configuring Hyprland page](../../Configuring/Configuring-Hyprland) to learn all
about configuring Hyprland to your likings.
2022-08-12 20:46:36 +02:00
## Apps / X11 replacements
2022-08-12 20:46:36 +02:00
See the [Useful Utilities page](../../Useful-Utilities) and the
2022-08-12 20:46:36 +02:00
[Sway wiki page](https://github.com/swaywm/sway/wiki/Useful-add-ons-for-sway)
just about that.
## Screenshare / GTK slow launch issues
2022-09-24 20:21:28 +02:00
[FAQ (GTK issue)](../../FAQ/#some-of-my-apps-take-a-really-long-time-to-open)
2022-09-12 15:17:26 +02:00
2022-09-24 20:21:28 +02:00
[FAQ (screensharing)](../../FAQ/#screenshare--obs-no-worky)
2022-09-12 15:17:26 +02:00
## Screen broken on launch
2022-08-12 20:46:36 +02:00
This usually happens due to your monitor not being very happy about the default
settings.
You can get your monitor's name(s) from the TTY.
Exit hyprland, and then:
- `cat /tmp/hypr/$(ls -t /tmp/hypr | head -n 1)/hyprland.log | grep monitor`
will give you a bunch of logs about the connected monitors. Names like `DP-x`
or `HDMI-x` etc are your monitor names.
- edit `~/.config/hypr/hyprland.conf`
2022-08-12 20:46:36 +02:00
- replace the `monitor=` line with `monitor=NAME,RES@Hz,OFFSET,SCALE`, for
2022-08-13 01:47:48 +02:00
example `monitor=DP-1,1920x1080@60,0x0,1` (See [Monitors](#monitors) for more
2022-08-19 21:50:34 +02:00
info about the values). You can also add multiple of those for multi-monitor
2022-08-13 01:47:48 +02:00
setups.
2022-08-12 20:46:36 +02:00
2022-08-13 01:47:48 +02:00
After this, upon launching Hyprland again, everything should be fine, provided
you set an appropriate mode for your monitors.