hyprland-wiki/pages/Configuring/Keywords.md

164 lines
3.7 KiB
Markdown
Raw Normal View History

2022-10-23 13:35:40 +02: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.
See the sidebar for more keywords to control binds, animations, monitors, et cetera.
2022-08-12 20:46:36 +02:00
2022-08-13 18:53:45 +02:00
{{< hint type=important >}}
2022-08-13 01:47:48 +02:00
Please remember, that for ALL arguments separated by a comma, if you want to
2022-10-19 15:22:42 +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
2022-08-12 20:46:36 +02:00
2022-10-03 15:31:47 +02:00
three_param_keyword = A, C # NOT OK
2022-08-12 20:46:36 +02:00
2022-10-03 15:31:47 +02:00
three_param_keyword = A, , C # OK
2022-08-27 19:17:14 +02:00
2022-10-03 15:31:47 +02:00
three_param_keyword = A, B, # OK
2022-08-12 20:46:36 +02:00
```
2022-08-13 18:53:45 +02:00
{{< /hint >}}
2022-10-20 22:54:34 +02:00
# Table of contents
2022-10-19 15:22:42 +02:00
2022-08-13 17:00:36 +02:00
{{< toc format=html >}}
2022-10-20 22:54:34 +02:00
# Executing
2022-08-12 20:46:36 +02:00
you can execute a shell script on startup of the compositor or on each time it's
reloaded.
`exec-once=command` will execute only on launch
`exec=command` will execute on each reload
2022-10-20 22:54:34 +02:00
# Defining variables
2022-08-12 20:46:36 +02:00
You can define your own custom variables like this:
2022-09-24 16:03:37 +02:00
```ini
2022-08-12 20:46:36 +02:00
$VAR = value
```
for example:
2022-09-24 16:03:37 +02:00
```ini
2022-08-12 20:46:36 +02:00
$MyFavoriteGame = Among Us
```
then, to use them, simply use them. For example:
2022-09-24 16:03:37 +02:00
```ini
2022-08-12 20:46:36 +02:00
col.active_border=$MyColor
```
You ARE allowed to do this:
2022-09-24 16:03:37 +02:00
```ini
2022-08-12 20:46:36 +02:00
col.active_border=ff$MyRedValue1111
```
2022-10-20 22:54:34 +02: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
2022-08-12 20:46:36 +02:00
source=~/.config/hypr/myColors.conf
```
And Hyprland will enter that file and parse it like a Hyprland config.
Please note it's LINEAR. Meaning lines above the `source=` will be parsed first,
then lines inside `~/.config/hypr/myColors.conf`, then lines below.
2022-10-20 22:54:34 +02:00
# Gestures
2022-08-12 20:46:36 +02:00
Use something like
[libinput-gestures](https://github.com/bulletmark/libinput-gestures), with
`hyprctl` if you want to expand Hyprland's gestures beyond what's offered in
2022-09-24 16:37:22 +02:00
[Variables](../Variables).
2022-08-12 20:46:36 +02:00
2022-10-20 22:54:34 +02: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.
In order to apply per-device config options, make a new category like this:
2022-09-24 16:03:37 +02:00
```ini
2022-08-12 20:46:36 +02:00
device:name {
}
```
2022-10-19 18:14:08 +02:00
The `name` can be easily obtained by doing `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**:
force_no_accel, follow_mouse, float_switch_override_focus
2022-08-12 20:46:36 +02:00
2022-10-14 13:29:39 +02:00
Properties that change names:
2022-10-19 15:22:42 +02:00
2022-10-14 13:29:39 +02:00
```plain
touchdevice:transform -> touch_transform
2022-10-14 13:40:01 +02:00
touchdevice:output -> touch_output
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
2022-08-12 20:46:36 +02:00
device:ROYUAN Akko Multi-modes Keyboard-B {
repeat_rate=50
repeat_delay=500
middle_button_emulation=0
}
```
2022-10-19 15:22:42 +02:00
_remember about the space after the end of the device's name (before the `{`)!_
2022-08-12 20:46:36 +02:00
2022-08-20 18:51:11 +02:00
{{< hint type=tip >}}
2022-09-24 16:37:22 +02:00
With hyprctl, the category's spaces get turned into `-`, and everything is
lowercase. So, for `hyprctl` calls, do for example:
2022-10-19 15:22:42 +02:00
2022-09-24 16:03:37 +02:00
```sh
2022-08-20 18:50:45 +02:00
hyprctl keyword device:royuan-akko-multi-modes-keyboard-b:kb_layout us
```
2022-10-19 15:22:42 +02:00
2022-08-20 18:50:45 +02:00
{{< /hint >}}
2022-10-20 22:54:34 +02:00
# Wallpapers
2022-08-12 20:46:36 +02:00
The hyprland background you see when you first start Hyprland is **NOT A
WALLPAPER**, it's the default image rendered at the bottom of the render stack.
To set a wallpaper, use a wallpaper utility like
2022-10-20 21:32:22 +02:00
[hyprpaper](https://github.com/hyprwm/hyprpaper) or [swaybg](https://github.com/swaywm/swaybg).
More can be found in [Useful Utilities](../Useful-Utilities).
2022-08-12 20:46:36 +02:00
2022-10-20 22:54:34 +02:00
# Blurring layerSurfaces
2022-08-12 20:46:36 +02:00
LayerSurfaces are not windows. These are for example: Your wallpapers,
notification overlays, bars, etc.
If you really want to blur them, use `blurls=`
2022-09-24 16:03:37 +02:00
```ini
2022-08-12 20:46:36 +02:00
blurls=NAMESPACE
```
where `NAMESPACE` is the namespace of the layerSurface. (You can get it from
`hyprctl layers`)
2022-10-19 15:22:42 +02:00
To remove a namespace from being blurred (useful in dynamic situations) use:
2022-08-12 20:46:36 +02:00
2022-09-24 16:03:37 +02:00
```ini
2022-08-12 20:46:36 +02:00
blurls=remove,NAMESPACE
```