2024-02-20 21:16:07 +01:00
|
|
|
---
|
|
|
|
weight: 3
|
|
|
|
title: Keywords
|
|
|
|
---
|
2022-10-23 16:35:39 +02:00
|
|
|
|
2024-02-20 21:16:07 +01:00
|
|
|
Keywords are not variables, but "commands" for more advanced configuring. On
|
|
|
|
this page, you will be presented with some that do not deserve their own page.
|
2022-08-12 20:46:36 +02:00
|
|
|
|
2024-02-20 21:16:07 +01:00
|
|
|
See the sidebar for more keywords to control binds, animations, monitors, et
|
|
|
|
cetera.
|
|
|
|
|
|
|
|
{{< callout >}}
|
2022-08-13 18:53:45 +02:00
|
|
|
|
2022-08-13 01:47:48 +02:00
|
|
|
Please remember, that for ALL arguments separated by a comma, if you want to
|
2022-10-23 16:35:39 +02:00
|
|
|
leave one of them empty, you cannot reduce the number of commas, _unless told
|
|
|
|
otherwise in a specific section_:
|
2022-08-12 20:46:36 +02:00
|
|
|
|
2022-09-24 16:03:37 +02:00
|
|
|
```ini
|
2022-10-03 15:31:47 +02:00
|
|
|
three_param_keyword = A, B, C # OK
|
2024-07-30 21:59:15 +02:00
|
|
|
three_param_keyword = A, C # NOT OK
|
|
|
|
three_param_keyword = A, , C # OK
|
|
|
|
three_param_keyword = A, B, # OK
|
2022-08-12 20:46:36 +02:00
|
|
|
```
|
|
|
|
|
2024-02-20 21:16:07 +01:00
|
|
|
{{< /callout >}}
|
2022-10-23 16:35:39 +02:00
|
|
|
|
2024-02-20 21:16:07 +01:00
|
|
|
## Executing
|
2022-08-12 20:46:36 +02:00
|
|
|
|
2024-09-07 21:54:46 +02:00
|
|
|
You can execute a shell script on:
|
2024-11-06 19:34:37 +01:00
|
|
|
|
2024-09-07 21:54:46 +02:00
|
|
|
- startup of the compositor
|
|
|
|
- every time the config is reloaded.
|
|
|
|
- shutdown of the compositor
|
2022-08-12 20:46:36 +02:00
|
|
|
|
2024-07-30 21:59:15 +02:00
|
|
|
`exec-once = command` will execute only on launch
|
2022-08-12 20:46:36 +02:00
|
|
|
|
2024-07-30 21:59:15 +02:00
|
|
|
`exec = command` will execute on each reload
|
2022-08-12 20:46:36 +02:00
|
|
|
|
2024-09-07 21:54:46 +02:00
|
|
|
`exec-shutdown = command` will execute only on shutdown
|
|
|
|
|
2024-02-20 21:16:07 +01:00
|
|
|
## Sourcing (multi-file)
|
2022-08-12 20:46:36 +02:00
|
|
|
|
|
|
|
Use the `source` keyword to source another file.
|
|
|
|
|
|
|
|
For example, in your `hyprland.conf` you can:
|
|
|
|
|
2022-09-24 16:03:37 +02:00
|
|
|
```ini
|
2024-07-30 21:59:15 +02:00
|
|
|
source = ~/.config/hypr/myColors.conf
|
2022-08-12 20:46:36 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
And Hyprland will enter that file and parse it like a Hyprland config.
|
|
|
|
|
2024-07-30 21:59:15 +02:00
|
|
|
Please note it's LINEAR. Meaning lines above the `source =` will be parsed first,
|
2022-08-12 20:46:36 +02:00
|
|
|
then lines inside `~/.config/hypr/myColors.conf`, then lines below.
|
|
|
|
|
2024-02-20 21:16:07 +01:00
|
|
|
## Gestures
|
2022-08-12 20:46:36 +02:00
|
|
|
|
2024-07-30 21:59:15 +02:00
|
|
|
Use [libinput-gestures](https://github.com/bulletmark/libinput-gestures) with
|
2022-08-12 20:46:36 +02:00
|
|
|
`hyprctl` if you want to expand Hyprland's gestures beyond what's offered in
|
2024-03-17 13:44:39 +01:00
|
|
|
[Variables](../Variables).
|
2022-08-12 20:46:36 +02:00
|
|
|
|
2024-02-20 21:16:07 +01:00
|
|
|
## Per-device input configs
|
2022-08-12 20:46:36 +02:00
|
|
|
|
|
|
|
Per-device config options will overwrite your options set in the `input`
|
|
|
|
section. It's worth noting that ONLY values explicitly changed will be
|
|
|
|
overwritten.
|
|
|
|
|
2024-07-30 21:59:15 +02:00
|
|
|
In order to apply per-device config options, add a new category like this:
|
2022-08-12 20:46:36 +02:00
|
|
|
|
2022-09-24 16:03:37 +02:00
|
|
|
```ini
|
2024-02-18 16:01:40 +01:00
|
|
|
device {
|
|
|
|
name = ...
|
|
|
|
# options ...
|
2022-08-12 20:46:36 +02:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2024-07-30 21:59:15 +02:00
|
|
|
The `name` can be easily obtained by checking the output of `hyprctl devices`.
|
2022-08-12 20:46:36 +02:00
|
|
|
|
|
|
|
Inside of it, put your config options. All options from the `input` category
|
|
|
|
(and all subcategories, e.g. `input:touchpad`) can be put inside, **EXCEPT**:
|
|
|
|
|
2024-07-30 21:59:15 +02:00
|
|
|
- `force_no_accel`
|
|
|
|
- `follow_mouse`
|
|
|
|
- `float_switch_override_focus`
|
|
|
|
- `scroll_factor`
|
2022-08-12 20:46:36 +02:00
|
|
|
|
2022-10-14 13:29:39 +02:00
|
|
|
Properties that change names:
|
2022-10-23 16:35:39 +02:00
|
|
|
|
2022-10-14 13:29:39 +02:00
|
|
|
```plain
|
2022-12-21 16:12:58 +01:00
|
|
|
touchdevice:transform -> transform
|
|
|
|
touchdevice:output -> output
|
2022-10-14 13:29:39 +02:00
|
|
|
```
|
|
|
|
|
2024-02-20 21:16:07 +01:00
|
|
|
You can also use the `output` setting for tablets to bind them to outputs.
|
|
|
|
Remember to use the name of the `Tablet` and not `Tablet Pad` or `Tablet tool`.
|
2022-12-21 16:12:58 +01:00
|
|
|
|
2022-10-27 13:58:22 +02:00
|
|
|
Additional properties only present in per-device configs:
|
2024-02-20 21:16:07 +01:00
|
|
|
|
2024-07-30 21:59:15 +02:00
|
|
|
- `enabled` -> (only for mice / touchpads / touchdevices / keyboards)
|
2024-11-06 19:34:37 +01:00
|
|
|
- enables / disables the device (connects / disconnects from the on-screen cursor)
|
|
|
|
- default: Enabled
|
2022-10-27 13:58:22 +02:00
|
|
|
|
2022-10-14 13:29:39 +02:00
|
|
|
Example config section:
|
2022-08-12 20:46:36 +02:00
|
|
|
|
2022-09-24 16:03:37 +02:00
|
|
|
```ini
|
2024-02-18 16:01:40 +01:00
|
|
|
device {
|
|
|
|
name = royuan-akko-multi-modes-keyboard-b
|
2024-07-30 21:59:15 +02:00
|
|
|
repeat_rate = 50
|
|
|
|
repeat_delay = 500
|
|
|
|
middle_button_emulation = 0
|
2022-08-12 20:46:36 +02:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2024-07-30 13:15:04 +02:00
|
|
|
Example modifying per-device config values using `hyprctl`:
|
|
|
|
|
2024-07-30 21:59:15 +02:00
|
|
|
```bash
|
2024-07-30 13:15:04 +02:00
|
|
|
hyprctl -r -- keyword device[my-device]:sensitivity -1
|
|
|
|
```
|
|
|
|
|
2024-02-20 21:16:07 +01:00
|
|
|
{{< callout type=info >}}
|
|
|
|
|
2024-07-30 21:59:15 +02:00
|
|
|
Per-device layouts will by default not alter the keybind keymap, so for example
|
|
|
|
with a global keymap of `us` and a per-device one of `fr`, the keybinds will
|
|
|
|
still act as if you were on `us`.
|
2024-02-28 00:21:25 +01:00
|
|
|
|
2024-07-30 21:59:15 +02:00
|
|
|
You can change this behavior by setting `resolve_binds_by_sym = 1`. In that case
|
|
|
|
you'll need to type the symbol specified in the bind to activate it.
|
2023-03-28 14:57:51 +02:00
|
|
|
|
2024-02-20 21:16:07 +01:00
|
|
|
{{< /callout >}}
|
|
|
|
|
|
|
|
## Wallpapers
|
2022-08-12 20:46:36 +02:00
|
|
|
|
2024-04-21 16:35:48 +02:00
|
|
|
The "Hyprland" background you see when you first start Hyprland is **NOT A
|
2022-08-12 20:46:36 +02:00
|
|
|
WALLPAPER**, it's the default image rendered at the bottom of the render stack.
|
|
|
|
|
|
|
|
To set a wallpaper, use a wallpaper utility like
|
2024-02-20 21:16:07 +01:00
|
|
|
[hyprpaper](https://github.com/hyprwm/hyprpaper) or
|
|
|
|
[swaybg](https://github.com/swaywm/swaybg).
|
2022-10-23 16:35:39 +02:00
|
|
|
|
2024-03-17 13:44:39 +01:00
|
|
|
More can be found in [Useful Utilities](../../Useful-Utilities).
|
2022-08-12 20:46:36 +02:00
|
|
|
|
2024-02-20 21:16:07 +01:00
|
|
|
## Blurring layerSurfaces
|
2022-08-12 20:46:36 +02:00
|
|
|
|
2024-07-30 21:59:15 +02:00
|
|
|
Layer surfaces are not windows. These are, for example: wallpapers,
|
2022-08-12 20:46:36 +02:00
|
|
|
notification overlays, bars, etc.
|
|
|
|
|
2024-07-30 21:59:15 +02:00
|
|
|
If you want to blur them, use a layer rule:
|
2022-08-12 20:46:36 +02:00
|
|
|
|
2022-09-24 16:03:37 +02:00
|
|
|
```ini
|
2024-07-30 21:59:15 +02:00
|
|
|
layerrule = blur, NAMESPACE
|
2023-02-25 18:41:27 +01:00
|
|
|
# or
|
2024-07-30 21:59:15 +02:00
|
|
|
layerrule = blur, address:0x<ADDRESS>
|
2022-08-12 20:46:36 +02:00
|
|
|
```
|
|
|
|
|
2024-04-21 16:35:48 +02:00
|
|
|
You can get the namespace / address from `hyprctl layers`.
|
2022-08-12 20:46:36 +02:00
|
|
|
|
2023-05-05 15:40:51 +02:00
|
|
|
To remove a layer rule (useful in dynamic situations) use:
|
2022-08-12 20:46:36 +02:00
|
|
|
|
2022-09-24 16:03:37 +02:00
|
|
|
```ini
|
2024-07-30 21:59:15 +02:00
|
|
|
layerrule = unset, <whatever you used before>
|
2022-08-12 20:46:36 +02:00
|
|
|
```
|
2023-03-05 14:17:08 +01:00
|
|
|
|
2023-05-05 15:40:51 +02:00
|
|
|
For example:
|
|
|
|
|
|
|
|
```ini
|
2024-07-30 21:59:15 +02:00
|
|
|
layerrule = unset, NAMESPACE
|
2023-05-05 15:40:51 +02:00
|
|
|
```
|
|
|
|
|
2024-02-20 21:16:07 +01:00
|
|
|
## Setting the environment
|
|
|
|
|
|
|
|
{{< callout type=info >}}
|
|
|
|
|
|
|
|
The `env` keyword works just like `exec-once`, meaning it will only fire once on
|
|
|
|
Hyprland's launch.
|
2023-03-05 14:17:08 +01:00
|
|
|
|
2024-02-20 21:16:07 +01:00
|
|
|
{{< /callout >}}
|
|
|
|
|
2024-07-30 21:59:15 +02:00
|
|
|
You can use the `env` keyword to set environment variables when Hyprland starts,
|
|
|
|
e.g:
|
2023-03-05 14:17:08 +01:00
|
|
|
|
|
|
|
```ini
|
|
|
|
env = XCURSOR_SIZE,24
|
|
|
|
```
|
|
|
|
|
2024-02-20 21:16:07 +01:00
|
|
|
You can also add a `d` flag if you want the env var to be exported to D-Bus
|
2024-07-30 21:59:15 +02:00
|
|
|
(systemd only):
|
2024-02-20 21:16:07 +01:00
|
|
|
|
2023-03-05 14:17:08 +01:00
|
|
|
```ini
|
|
|
|
envd = XCURSOR_SIZE,24
|
2023-03-17 17:27:13 +01:00
|
|
|
```
|
|
|
|
|
2024-02-20 21:16:07 +01:00
|
|
|
{{< callout >}}
|
|
|
|
|
2024-04-09 11:45:18 +02:00
|
|
|
Hyprland puts the raw string to the env var. You should _not_ add quotes around
|
2024-02-20 21:16:07 +01:00
|
|
|
the values.
|
2023-03-17 17:27:13 +01:00
|
|
|
|
|
|
|
e.g.:
|
2024-02-20 21:16:07 +01:00
|
|
|
|
2023-03-17 17:27:13 +01:00
|
|
|
```ini
|
|
|
|
env = QT_QPA_PLATFORM,wayland
|
|
|
|
```
|
|
|
|
|
2024-02-20 21:16:07 +01:00
|
|
|
and _**NOT**_
|
|
|
|
|
2023-03-17 17:27:13 +01:00
|
|
|
```ini
|
|
|
|
env = QT_QPA_PLATFORM,"wayland"
|
|
|
|
```
|
2024-02-20 21:16:07 +01:00
|
|
|
|
|
|
|
{{< /callout >}}
|