Configuring: reword/revamp

This commit is contained in:
Mihai Fufezan 2024-07-30 22:59:15 +03:00
parent 2fb6853e11
commit ea9d39dbf0
13 changed files with 378 additions and 362 deletions

View file

@ -8,7 +8,7 @@ title: Animations
Animations are declared with the `animation` keyword.
```ini
animation=NAME,ONOFF,SPEED,CURVE[,STYLE]
animation = NAME, ONOFF, SPEED, CURVE [,STYLE]
```
`ONOFF` can be either 0 or 1, 0 to disable, 1 to enable. _note:_ if it's 0, you
@ -26,9 +26,9 @@ parent's values. See [the animation tree](#animation-tree).
### Examples
```ini
animation=workspaces,1,8,default
animation=windows,1,10,myepiccurve,slide
animation=fade,0
animation = workspaces, 1, 8, default
animation = windows, 1, 10, myepiccurve, slide
animation = fade, 0
```
### Animation tree
@ -62,7 +62,7 @@ global
Defining your own Bezier curve can be done with the `bezier` keyword:
```ini
bezier=NAME,X0,Y0,X1,Y1
bezier = NAME, X0, Y0, X1, Y1
```
where `NAME` is the name, and the rest are two points for the Cubic Bezier. A
@ -74,7 +74,7 @@ but if you want to instead choose from a list of beziers, you can check out
### Example
```ini
bezier=overshot,0.05,0.9,0.1,1.1
bezier = overshot, 0.05, 0.9, 0.1, 1.1
```
### Extras
@ -84,7 +84,7 @@ to start from. For example, the following will make the animation 80% -> 100% of
the size:
```ini
animation=windows,1,8,default,popin 80%
animation = windows, 1, 8, default, popin 80%
```
For animation styles `slidefade` and `slidefadevert` in `workspaces`, you can
@ -92,13 +92,14 @@ specify a movement percentage. For example, the following will make windows move
20% of the screen width:
```ini
animation=workspaces,1,8,default,slidefade 20%
animation = workspaces, 1, 8, default, slidefade 20%
```
For animation style `slide` in windows and layers you can specify a forced side, e.g.:
For animation style `slide` in windows and layers you can specify a forced side,
e.g.:
```ini
animation=windows,1,8,default,slide left
animation = windows, 1, 8, default, slide left
```
You can use `top`, `bottom`, `left` or `right`.

View file

@ -6,13 +6,13 @@ title: Binds
## Basic
```ini
bind=MODS,key,dispatcher,params
bind = MODS, key, dispatcher, params
```
for example,
```ini
bind=SUPER_SHIFT,Q,exec,firefox
bind = SUPER_SHIFT, Q, exec, firefox
```
will bind opening Firefox to <key>SUPER</key> + <key>SHIFT</key> + <key>Q</key>
@ -22,7 +22,7 @@ will bind opening Firefox to <key>SUPER</key> + <key>SHIFT</key> + <key>Q</key>
For binding keys without a modkey, leave it empty:
```ini
bind=,Print,exec,grim
bind = , Print, exec, grim
```
{{< /callout >}}
@ -45,7 +45,7 @@ If you want to bind by a keycode, you can put it in the KEY position with
a `code:` prefix, e.g.:
```ini
bind=SUPER,code:28,exec,amongus
bind = SUPER, code:28, exec, amongus
```
Will bind <key>SUPER</key> + <key>T</key>. (<key>T</key> is keycode 28.) - You
@ -58,13 +58,13 @@ can also use `xev` or `wev` to find keycodes.
You can also unbind with `unbind`, e.g.:
```ini
unbind=SUPER,O
unbind = SUPER, O
```
May be useful for dynamic keybindings with `hyprctl`.
May be useful for dynamic keybindings with `hyprctl`:
```sh
hyprctl keyword unbind SUPER,O
```bash
hyprctl keyword unbind SUPER, O
```
### Mouse buttons
@ -73,7 +73,7 @@ You can also bind mouse buttons, by prefacing the mouse keycode with `mouse:`,
for example:
```ini
bind=SUPER,mouse:272,exec,amongus
bind = SUPER, mouse:272, exec, amongus
```
will bind it to <key>SUPER</key> + <key>LMB</key>.
@ -84,7 +84,7 @@ For binding only modkeys, you need to use the TARGET modmask (with the
activating mod) and the `r` flag, e.g.:
```ini
bindr=SUPER ALT,Alt_L,exec,amongus
bindr = SUPER ALT, Alt_L, exec, amongus
```
Will bind `exec amongus` to <key>SUPER</key> + <key>ALT</key>
@ -114,7 +114,7 @@ You can also bind the mouse wheel with `mouse_up` and `mouse_down` (or
`mouse_left` and `mouse_right` if your wheel supports horizontal scrolling):
```ini
bind=SUPER,mouse_down,workspace,e-1
bind = SUPER, mouse_down, workspace, e-1
```
(control the reset time with `binds:scroll_event_delay`)
@ -125,11 +125,11 @@ Useful for binding e.g. the lid close/open event:
```ini
# trigger when the switch is toggled
bindl=,switch:[switch name],exec,swaylock
bindl = , switch:[switch name], exec, swaylock
# trigger when the switch is turning on
bindl=,switch:on:[switch name],exec,hyprctl keyword monitor "eDP-1, disable"
bindl = , switch:on:[switch name], exec, hyprctl keyword monitor "eDP-1, disable"
# trigger when the switch is turning off
bindl=,switch:off:[switch name],exec,hyprctl keyword monitor "eDP-1, 2560x1600, 0x0, 1"
bindl = , switch:off:[switch name], exec, hyprctl keyword monitor "eDP-1, 2560x1600, 0x0, 1"
```
You can view your switches in `hyprctl devices`.
@ -141,8 +141,8 @@ one combination, e.g.:
```ini
# to switch between windows in a floating workspace
bind = SUPER,Tab,cyclenext, # change focus to another window
bind = SUPER,Tab,bringactivetotop, # bring it to the top
bind = SUPER, Tab, cyclenext, # change focus to another window
bind = SUPER, Tab, bringactivetotop, # bring it to the top
```
The keybinds will be executed in the order they were created. (top to bottom)
@ -153,13 +153,13 @@ You can describe your keybind with the description flag.
Your description always goes in front of the dispatcher and should never contain the character `,`!
```ini
bindd=MODS,key,description,dispatcher,params
bindd = MODS, key, description, dispatcher, params
```
for example,
```ini
bindd=SUPER,Q,Open my favourite terminal,exec,kitty
bindd = SUPER, Q, Open my favourite terminal, exec, kitty
```
If you want to access your description you can use `hyprctl binds`. For more information have a look at [Using Hyprctl](./Using-hyprctl.md).
@ -169,18 +169,18 @@ If you want to access your description you can use `hyprctl binds`. For more inf
`bind` supports flags in this format:
```ini
bind[flags]=...
bind[flags] = ...
```
e.g.:
```ini
bindrl=MOD,KEY,exec,amongus
bindrl = MOD, KEY, exec, amongus
```
Flags:
```ini
```
l -> locked, will also work when an input inhibitor (e.g. a lockscreen) is active.
r -> release, will trigger on release of a key.
e -> repeat, will repeat when held.
@ -197,16 +197,16 @@ Example Usage:
```ini
# Example volume button that allows press and hold, volume limited to 150%
binde=, XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+
binde = , XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+
# Example volume button that will activate even while an input inhibitor is active
bindl=, XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
bindl = , XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
# Start wofi opens wofi on first press, closes it on second
bindr=, SUPER_L, exec, pkill wofi || wofi
bindr = , SUPER_L, exec, pkill wofi || wofi
# Describe a bind
bindd=SUPER,Q,Open my favourite terminal,exec,kitty
bindd = SUPER, Q, Open my favourite terminal, exec, kitty
# See Mouse Binds section for bindm usage
```
@ -217,7 +217,7 @@ Mouse binds are binds that rely on mouse movement. They
will have one less arg, and may look like this:
```ini
bindm=ALT,mouse:272,movewindow
bindm = ALT, mouse:272, movewindow
```
This will create a bind with <key>ALT</key> + <key>LMB</key> to move the window
@ -252,10 +252,10 @@ activated.
As clicking and moving the mouse on a touchpad is unergonomic, you can also use keyboard keys instead of mouse clicks too.
```ini
bindm=SUPER, mouse:272, movewindow
bindm=SUPER, Control_L, movewindow
bindm=SUPER, mouse:273, resizewindow
bindm=SUPER, ALT_L, resizewindow
bindm = SUPER, mouse:272, movewindow
bindm = SUPER, Control_L, movewindow
bindm = SUPER, mouse:273, resizewindow
bindm = SUPER, ALT_L, resizewindow
```
## Binding mods
@ -263,7 +263,7 @@ bindm=SUPER, ALT_L, resizewindow
You can bind a mod alone like this:
```ini
bindr=ALT,Alt_L,exec,amongus
bindr = ALT,Alt_L,exec,amongus
```
## Global Keybinds
@ -273,15 +273,15 @@ bindr=ALT,Alt_L,exec,amongus
Yes, you heard this right, Hyprland does support global keybinds for ALL apps,
including OBS, Discord, Firefox, etc.
See the [`pass` dispatcher](../Dispatchers/#list-of-dispatchers) and the [`sendshortcut` dispatcher](../Dispatchers/#list-of-dispatchers) for keybinds.
See the [`pass` dispatcher](../Dispatchers/#list-of-dispatchers) and the
[`sendshortcut` dispatcher](../Dispatchers/#list-of-dispatchers) for keybinds.
Let's take OBS as an example: the "Start/Stop Recording" keybind is set to
<key>SUPER</key> + <key>F10</key>, and you want to make it work globally.
Simply add
<key>SUPER</key> + <key>F10</key>, and you want to make it work globally. Simply
add
```ini
bind = SUPER,F10,pass,^(com\.obsproject\.Studio)$
bind = SUPER, F10, pass, ^(com\.obsproject\.Studio)$
```
to your config and you're done.
@ -290,7 +290,7 @@ to your config and you're done.
This also means that push-to-talk will work flawlessly with one pass, e.g.:
```ini
bind=,mouse:276,pass,^(TeamSpeak 3)$
bind = , mouse:276, pass, ^(TeamSpeak 3)$
```
Will pass MOUSE5 to TeamSpeak3.
@ -298,15 +298,16 @@ Will pass MOUSE5 to TeamSpeak3.
You may also add shortcuts, where other keys are passed to the window.
```ini
bind = SUPER,F10,sendshortcut,SUPER,F4,^(com\.obsproject\.Studio)$
bind = SUPER, F10, sendshortcut, SUPER, F4, ^(com\.obsproject\.Studio)$
```
Will send <key>SUPER</key> + <key>F4</key> to OBS if you press <key>SUPER</key> + <key>F10</key>.
Will send <key>SUPER</key> + <key>F4</key> to OBS if you press
<key>SUPER</key> + <key>F10</key>.
{{< callout >}}
This works flawlessly with all native Wayland applications. However, XWayland is a bit wonky.
Make sure that what you're passing is a "global Xorg keybind",
This works flawlessly with all native Wayland applications. However, XWayland
is a bit wonky. Make sure that what you're passing is a "global Xorg keybind",
otherwise passing from a different XWayland app may not work.
{{< /callout >}}
@ -318,12 +319,11 @@ xdg-desktop-portal.
If that's the case, then it's recommended to use this method instead of `pass`.
Open your desired app and issue `hyprctl globalshortcuts`. This will give you a
list of currently registered shortcuts with their description(s).
Open your desired app and run `hyprctl globalshortcuts` in a terminal. This will
give you a list of currently registered shortcuts with their description(s).
Choose whichever you like, for example `coolApp:myToggle`
Bind it to whatever you want with the `global` dispatcher:
Choose whichever you like, for example `coolApp:myToggle`, and bind it to
whatever you want with the `global` dispatcher:
```ini
bind = SUPERSHIFT, A, global, coolApp:myToggle
@ -344,22 +344,22 @@ which allows you to resize windows with the arrow keys, you can do it like this:
```ini
# will switch to a submap called resize
bind=ALT,R,submap,resize
bind = ALT, R, submap, resize
# will start a submap called "resize"
submap=resize
submap = resize
# sets repeatable binds for resizing the active window
binde=,right,resizeactive,10 0
binde=,left,resizeactive,-10 0
binde=,up,resizeactive,0 -10
binde=,down,resizeactive,0 10
binde = , right, resizeactive, 10 0
binde = , left, resizeactive, -10 0
binde = , up, resizeactive, 0 -10
binde = , down, resizeactive, 0 10
# use reset to go back to the global submap
bind=,escape,submap,reset
bind = , escape, submap, reset
# will reset the submap, which will return to the global submap
submap=reset
submap = reset
# keybinds further down will be global again...
```
@ -379,15 +379,15 @@ You can also set the same keybind to perform multiple actions, such as resize
and close the submap, like so:
```ini
bind=ALT,R,submap,resize
bind = ALT, R, submap, resize
submap=resize
submap = resize
bind=,right,resizeactive,10 0
bind=,right,submap,reset
bind = , right, resizeactive, 10 0
bind = , right, submap, reset
# ...
submap=reset
submap = reset
```
This works because the binds are executed in the order they appear, and
@ -401,7 +401,7 @@ from passing to your active application while in a submap or to exit it
immediately when any unknown key is pressed:
```ini
bind=,catchall,submap,reset
bind = , catchall, submap, reset
```
## Example Binds
@ -412,11 +412,11 @@ These binds set the expected behavior for regular keyboard media volume keys,
including when the screen is locked:
```ini
bindel=, XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+
bindel=, XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
bindl=, XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
bindel = , XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+
bindel = , XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
bindl = , XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
# Requires playerctl
bindl=, XF86AudioPlay, exec, playerctl play-pause
bindl=, XF86AudioPrev, exec, playerctl previous
bindl=, XF86AudioNext, exec, playerctl next
bindl = , XF86AudioPlay, exec, playerctl play-pause
bindl = , XF86AudioPrev, exec, playerctl previous
bindl = , XF86AudioNext, exec, playerctl next
```

View file

@ -1,84 +0,0 @@
---
weight: 1
title: Configuring Hyprland
---
The config is located in `~/.config/hypr/hyprland.conf`.
You can tell Hyprland to use a specific configuration file by using the
`--config` (or `-c`) argument.
Hyprland will automatically generate an example config for you if you don't have
one. You can find an example config
[here](https://github.com/hyprwm/Hyprland/blob/main/example/hyprland.conf).
By removing the line `autogenerated=1` you'll remove the yellow warning.
The config is reloaded the moment you save it. However, you can use `hyprctl reload` to reload the config manually.
Start a section with `name {` and end in `}` **_in separate lines!_**
{{< callout >}}
The default config is not complete and does not list all the options / features
of Hyprland. Please refer to this wiki page and the pages linked further down
here for full configuration instructions.
**Make sure to read the [Variables](../Variables) page as well**. It covers all
the toggleable / numerical options.
{{< /callout >}}
## Line style
Every config line is a command followed by a value.
```ini
COMMAND=VALUE
```
The command can be a variable, or a special keyword (described further in this
page)
You are **allowed to** input trailing spaces at the beginning and end.
e.g.:
```ini
COMMAND = VALUE
```
is valid.
### Comments
Comments are started with the `#` character.
If you want to escape it (put an actual `#` and not start a comment) you can use
`##`. It will be turned into a single `#` that WILL be a part of your line.
### Escaping errors
If you use plugins, you may want to ignore errors from missing options/keywords
so that you don't get an error bar before they are loaded. To do so, do this:
```ini
# hyprlang noerror true
bind = MOD, KEY, something, amogus
someoption = blah
# hyprlang noerror false
```
## Basic configuring
To configure the "options" of Hyprland, animations, styling, etc. see
[Variables](../Variables).
## Advanced configuring
Some keywords (binds, curves, execs, monitors, etc.) are not variables but
define special behavior.
See all of them in [Keywords](../Keywords) and the sidebar.

View file

@ -84,11 +84,11 @@ layout pages (See the sidebar).
{{< callout type=warning >}}
it is NOT recommended to set DPMS with a keybind directly, as it might cause
It is NOT recommended to set DPMS with a keybind directly, as it might cause
undefined behavior. Instead, consider something like
```ini
bind = MOD,KEY,exec,sleep 1 && hyprctl dispatch dpms off
bind = MOD, KEY, exec, sleep 1 && hyprctl dispatch dpms off
```
{{< /callout >}}
@ -123,17 +123,22 @@ You have nine choices:
- Relative ID: e.g. `+1`, `-3` or `+100`
- workspace on monitor, relative with `+` or `-`, absolute with `~`: e.g. `m+1`, `m-2` or `m~3`
- workspace on monitor, relative with `+` or `-`, absolute with `~`: e.g. `m+1`,
`m-2` or `m~3`
- workspace on monitor including empty workspaces, relative with `+` or `-`, absolute with `~`: e.g. `r+1` or `r~3`
- workspace on monitor including empty workspaces, relative with `+` or `-`,
absolute with `~`: e.g. `r+1` or `r~3`
- open workspace, relative with `+` or `-`, absolute with `~`: e.g. `e+1`, `e-10`, or `e~2`
- open workspace, relative with `+` or `-`, absolute with `~`: e.g. `e+1`,
`e-10`, or `e~2`
- Name: e.g. `name:Web`, `name:Anime` or `name:Better anime`
- Previous workspace: `previous`, or `previous_per_monitor`
- First available empty workspace: `empty`, suffix with `m` to only search on monitor. and/or `n` to make it the *next* available empty workspace. e.g. `emptynm`
- First available empty workspace: `empty`, suffix with `m` to only search
on monitor. and/or `n` to make it the *next* available empty workspace. e.g.
`emptynm`
- Special Workspace: `special` or `special:name` for named special workspaces.
@ -168,7 +173,7 @@ limited to 97 at a time.
For example, to move a window/application to a special workspace you can use the
following syntax:
```
```ini
bind = SUPER, C, movetoworkspace, special
#The above syntax will move the window to a special workspace upon pressing 'SUPER'+'C'.
#To see the hidden window you can use the togglespecialworkspace dispatcher mentioned above.
@ -177,20 +182,21 @@ bind = SUPER, C, movetoworkspace, special
## Executing with rules
The `exec` dispatcher supports adding rules. Please note some windows might work
better, some worse. It records the PID of the spawned process and uses that. For example, if
your process forks and then the fork opens a window, this will not work.
Rules will only be applied once. This means dynamic rules will be overridden as soon as a
property of the window changes (e.g. switching focus). To make dynamic rules stick around
use `hyprctl setprop` (see [Using hyprctl](../Using-hyprctl)).
better, some worse. It records the PID of the spawned process and uses that.
For example, if your process forks and then the fork opens a window, this will
not work. Rules will only be applied once. This means dynamic rules will be
overridden as soon as a property of the window changes (e.g. switching focus).
To make dynamic rules stick around use `hyprctl setprop` (see
[Using hyprctl](../Using-hyprctl)).
The syntax is:
```
```ini
bind = mod, key, exec, [rules...] command
```
For example:
```
```ini
bind = SUPER, E, exec, [workspace 2 silent; float; move 0 0] kitty
```

View file

@ -17,12 +17,9 @@ otherwise in a specific section_:
```ini
three_param_keyword = A, B, C # OK
three_param_keyword = A, C # NOT OK
three_param_keyword = A, , C # OK
three_param_keyword = A, B, # OK
three_param_keyword = A, C # NOT OK
three_param_keyword = A, , C # OK
three_param_keyword = A, B, # OK
```
{{< /callout >}}
@ -32,9 +29,9 @@ three_param_keyword = A, B, # OK
You can execute a shell script on startup of the compositor or every time
the config is reloaded.
`exec-once=command` will execute only on launch
`exec-once = command` will execute only on launch
`exec=command` will execute on each reload
`exec = command` will execute on each reload
## Defining variables
@ -53,13 +50,13 @@ $MyFavoriteGame = Among Us
Then you can reference them in the rest of the config. For example:
```ini
col.active_border=$MyColor
col.active_border = $MyColor
```
You are allowed to combine variables in-place with other strings, like this:
```ini
col.active_border=ff$MyRedValue1111
col.active_border = ff$MyRedValue1111
```
## Sourcing (multi-file)
@ -69,18 +66,17 @@ Use the `source` keyword to source another file.
For example, in your `hyprland.conf` you can:
```ini
source=~/.config/hypr/myColors.conf
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,
Please note it's LINEAR. Meaning lines above the `source =` will be parsed first,
then lines inside `~/.config/hypr/myColors.conf`, then lines below.
## Gestures
Use something like
[libinput-gestures](https://github.com/bulletmark/libinput-gestures), with
Use [libinput-gestures](https://github.com/bulletmark/libinput-gestures) with
`hyprctl` if you want to expand Hyprland's gestures beyond what's offered in
[Variables](../Variables).
@ -90,7 +86,7 @@ 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:
In order to apply per-device config options, add a new category like this:
```ini
device {
@ -99,12 +95,15 @@ device {
}
```
The `name` can be easily obtained by doing `hyprctl devices`.
The `name` can be easily obtained by checking the output of `hyprctl devices`.
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, scroll_factor
- `force_no_accel`
- `follow_mouse`
- `float_switch_override_focus`
- `scroll_factor`
Properties that change names:
@ -118,34 +117,35 @@ Remember to use the name of the `Tablet` and not `Tablet Pad` or `Tablet tool`.
Additional properties only present in per-device configs:
```plain
enabled -> (only for mice / touchpads / touchdevices / keyboards) enables / disables the device (connects / disconnects from the on-screen cursor) - default: Enabled
```
- `enabled` -> (only for mice / touchpads / touchdevices / keyboards)
- enables / disables the device (connects / disconnects from the on-screen cursor)
- default: Enabled
Example config section:
```ini
device {
name = royuan-akko-multi-modes-keyboard-b
repeat_rate=50
repeat_delay=500
middle_button_emulation=0
repeat_rate = 50
repeat_delay = 500
middle_button_emulation = 0
}
```
Example modifying per-device config values using `hyprctl`:
```plain
```bash
hyprctl -r -- keyword device[my-device]:sensitivity -1
```
{{< callout type=info >}}
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`.
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`.
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.
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.
{{< /callout >}}
@ -162,15 +162,15 @@ More can be found in [Useful Utilities](../../Useful-Utilities).
## Blurring layerSurfaces
LayerSurfaces are not windows. These are for example: Your wallpapers,
Layer surfaces are not windows. These are, for example: wallpapers,
notification overlays, bars, etc.
If you really want to blur them, use a layerrule:
If you want to blur them, use a layer rule:
```ini
layerrule = blur,NAMESPACE
layerrule = blur, NAMESPACE
# or
layerrule = blur,address:0x<ADDRESS>
layerrule = blur, address:0x<ADDRESS>
```
You can get the namespace / address from `hyprctl layers`.
@ -178,13 +178,13 @@ You can get the namespace / address from `hyprctl layers`.
To remove a layer rule (useful in dynamic situations) use:
```ini
layerrule = unset,<whatever you used before>
layerrule = unset, <whatever you used before>
```
For example:
```ini
layerrule = unset,NAMESPACE
layerrule = unset, NAMESPACE
```
## Setting the environment
@ -196,15 +196,15 @@ Hyprland's launch.
{{< /callout >}}
You can use the `env` keyword to set environment variables at Hyprland's start,
e.g.:
You can use the `env` keyword to set environment variables when Hyprland starts,
e.g:
```ini
env = XCURSOR_SIZE,24
```
You can also add a `d` flag if you want the env var to be exported to D-Bus
(systemd only)
(systemd only):
```ini
envd = XCURSOR_SIZE,24

View file

@ -62,9 +62,9 @@ Parameters for the commands are separated by a single space.
Example usage:
```ini
bind=MOD,KEY,layoutmsg,cyclenext
bind = MOD, KEY, layoutmsg, cyclenext
# behaves like xmonads promote feature (https://hackage.haskell.org/package/xmonad-contrib-0.17.1/docs/XMonad-Actions-Promote.html)
bind=MOD,KEY,layoutmsg,swapwithmaster master
bind = MOD, KEY, layoutmsg, swapwithmaster master
```
{{< /callout >}}

View file

@ -8,13 +8,13 @@ title: Monitors
The general config of a monitor looks like this:
```ini
monitor=name,resolution,position,scale
monitor = name, resolution, position, scale
```
A common example:
```ini
monitor=DP-1,1920x1080@144,0x0,1
monitor = DP-1, 1920x1080@144, 0x0, 1
```
This will make the monitor on `DP-1` a `1920x1080` display, at
@ -22,35 +22,35 @@ This will make the monitor on `DP-1` a `1920x1080` display, at
To list all available monitors (active and inactive):
```shell
```bash
hyprctl monitors all
```
Monitors are positioned on a virtual "layout". The `position` is the position of
said display in the layout. (calculated from the top-left corner)
Monitors are positioned on a virtual "layout". The `position` is the position,
in pixels, of said display in the layout. (calculated from the top-left corner)
For example:
```ini
monitor=DP-1, 1920x1080, 0x0, 1
monitor=DP-2, 1920x1080, 1920x0, 1
monitor = DP-1, 1920x1080, 0x0, 1
monitor = DP-2, 1920x1080, 1920x0, 1
```
will tell hyprland to make DP-1 on the _left_ of DP-2, while
will tell Hyprland to put DP-1 on the _left_ of DP-2, while
```ini
monitor=DP-1, 1920x1080, 1920x0, 1
monitor=DP-2, 1920x1080, 0x0, 1
monitor = DP-1, 1920x1080, 1920x0, 1
monitor = DP-2, 1920x1080, 0x0, 1
```
will tell hyprland to make DP-1 on the _right_.
will tell Hyprland to put DP-1 on the _right_.
The `position` may contain _negative_ values, so the above example could also be
written as
```ini
monitor=DP-1, 1920x1080, 0x0, 1
monitor=DP-2, 1920x1080, -1920x0, 1
monitor = DP-1, 1920x1080, 0x0, 1
monitor = DP-2, 1920x1080, -1920x0, 1
```
Hyprland uses an inverse Y cartesian system. Thus, a negative y coordinate
@ -59,18 +59,18 @@ places a monitor higher, and a positive y coordinate will place it lower.
For example:
```ini
monitor=DP-1, 1920x1080, 0x0, 1
monitor=DP-2, 1920x1080, 0x-1080, 1
monitor = DP-1, 1920x1080, 0x0, 1
monitor = DP-2, 1920x1080, 0x-1080, 1
```
will tell hyprland to make DP-2 _above_ DP-1, while
will tell Hyprland to put DP-2 _above_ DP-1, while
```ini
monitor=DP-1, 1920x1080, 0x0, 1
monitor=DP-2, 1920x1080, 0x1080, 1
monitor = DP-1, 1920x1080, 0x0, 1
monitor = DP-2, 1920x1080, 0x1080, 1
```
will tell hyprland to make DP-2 _below_.
will tell Hyprland to put DP-2 _below_.
{{< callout type=info >}}
@ -84,12 +84,15 @@ also rotated 90 degrees (vertical), you'd use `1080x0`.
Leaving the name empty will define a fallback rule to use when no other rules
match.
You can use `preferred` as a resolution to use the display's preferred size,
or you can use `highres` or `highrr` to get the best possible resolution or refresh rate for your monitor.
There are a few special values for the resolutions:
- `preferred` - use the display's preferred size and refresh rate.
- `highres` - use the highest supported resolution.
- `highrr` - use the highest supported refresh rate.
Position also has a few special values:
- `auto` - let Hyprland decide on a position. By default, it places each new monitor to the right of existing ones.
- `auto-right/left/up/down` - place the monitor to the right/left, above or below other monitors.
You can use `auto` as a position to let Hyprland decide on a position for you.
If you want to get fancy with multiple monitors you can specify `auto-right` to put your monitor to the right,
`auto-down` to position your monitor below, `auto-left` to put it to the left, and `auto-up` to put your monitor above.
***Please Note:*** While specifying a monitor direction for your first monitor is allowed, this does nothing and it will
be positioned at (0,0). Also the direction is always from the center out, so you can specify `auto-up` then `auto-left`,
but the left monitors will just be left of the origin and above the origin. You can also specify duplicate directions and
@ -101,17 +104,18 @@ These depend on the PPI of the monitor.
Recommended rule for quickly plugging in random monitors:
```ini
monitor=,preferred,auto,1
monitor = , preferred, auto, 1
```
Will make any monitor that was not specified with an explicit rule automatically
placed on the right of the other(s) with its preferred resolution.
This will make any monitor that was not specified with an explicit rule
automatically placed on the right of the other(s), with its preferred
resolution.
For more specific rules, you can also use the output's description (see
`hyprctl monitors` for more details). If the output of `hyprctl monitors` looks
like the following:
```
```yaml
Monitor eDP-1 (ID 0):
1920x1080@60.00100 at 0x0
description: Chimei Innolux Corporation 0x150C (eDP-1)
@ -120,11 +124,11 @@ Monitor eDP-1 (ID 0):
[...]
```
then the `description` value up to the portname `(eDP-1)` can be used to specify
the monitor:
then the `description` value up to, but not including the portname `(eDP-1)` can
be used to specify the monitor:
```
monitor=desc:Chimei Innolux Corporation 0x150C,preferred,auto,1.5
```ini
monitor = desc:Chimei Innolux Corporation 0x150C, preferred, auto, 1.5
```
Remember to remove the `(portname)`!
@ -134,7 +138,7 @@ Remember to remove the `(portname)`!
You can set up a custom modeline by changing the resolution field to a modeline,
for example:
```
```ini
monitor = DP-1, modeline 1071.101 3840 3848 3880 3920 2160 2263 2271 2277 +hsync -vsync, 0x0, 1
```
@ -143,7 +147,7 @@ monitor = DP-1, modeline 1071.101 3840 3848 3880 3920 2160 2263 2271 2277 +hsync
To disable a monitor, use
```ini
monitor=name,disable
monitor = name, disable
```
{{< callout >}}
@ -161,77 +165,81 @@ A reserved area is an area that remains unoccupied by tiled windows.
If your workflow requires a custom reserved area, you can add it with:
```ini
monitor=name,addreserved,TOP,BOTTOM,LEFT,RIGHT
monitor = name, addreserved, TOP, BOTTOM, LEFT, RIGHT
```
Where `TOP` `BOTTOM` `LEFT` `RIGHT` are integers in pixels of the reserved area
to add. This does stack on top of the calculated one (e.g. bars), but you may
only use one of these rules per monitor in the config.
Where `TOP` `BOTTOM` `LEFT` `RIGHT` are integers, i.e the number in pixels of
the reserved area to add. This does stack on top of the calculated reserved area
(e.g. bars), but you may only use one of these rules per monitor in the config.
## Extra args
You can combine extra arguments at the end of the monitor rule, examples:
```ini
monitor=eDP-1,2880x1800@90,0x0,1,transform,1,mirror,DP-2,bitdepth,10
monitor = eDP-1, 2880x1800@90, 0x0, 1, transform, 1, mirror, DP-2, bitdepth, 10
```
See below for more detail about each argument.
See below for more details about each argument.
### Mirrored displays
If you want to mirror a display, add a `,mirror,[NAME]` at the end of the
If you want to mirror a display, add a `, mirror, <NAME>` at the end of the
monitor rule, examples:
```ini
monitor=DP-3,1920x1080@60,0x0,1,mirror,DP-2
monitor=,preferred,auto,1,mirror,DP-1
monitor = DP-3, 1920x1080@60, 0x0, 1, mirror, DP-2
monitor = , preferred, auto, 1, mirror, DP-1
```
Please remember that mirroring displays will not "re-render" everything for your
second monitor, so if mirroring a 1080p screen onto a 4K one, the resolution
will still be 1080p on the 4K display. This also means squishing and stretching
will occur on non-matching resolutions.
will occur on aspect ratios that differ (e.g 16:9 and 16:10).
### 10 bit support
If you want to enable 10 bit support for your display, add a `,bitdepth,10` at
the end of the monitor rule, e.g.:
If you want to enable 10 bit support for your display, add a `, bitdepth, 10` at
the end of the monitor rule, e.g:
```ini
monitor=eDP-1,2880x1800@90,0x0,1,bitdepth,10
monitor = eDP-1, 2880x1800@90, 0x0, 1, bitdepth, 10
```
**NOTE** Colors registered in Hyprland (e.g. the border color) do _not_ support
{{< callout >}}
Colors registered in Hyprland (e.g. the border color) do _not_ support
10 bit.
**NOTE** Some applications do _not_ support screen capture with 10 bit enabled.
Some applications do _not_ support screen capture with 10 bit enabled.
{{< /callout >}}
### VRR
Per-display VRR can be done by adding `,vrr,X` where `X` is the mode from the
Per-display VRR can be done by adding `, vrr, X` where `X` is the mode from the
[variables page](../Variables).
## Rotating
If you want to rotate a monitor, add a `,transform,X` at the end of the monitor
If you want to rotate a monitor, add a `, transform, X` at the end of the monitor
rule, where `X` corresponds to a transform number, e.g.:
```ini
monitor=eDP-1,2880x1800@90,0x0,1,transform,1
monitor = eDP-1, 2880x1800@90, 0x0, 1, transform, 1
```
Transform list:
```ini
normal (no transforms) -> 0
90 degrees -> 1
180 degrees -> 2
270 degrees -> 3
flipped -> 4
flipped + 90 degrees -> 5
flipped + 180 degrees -> 6
flipped + 270 degrees -> 7
```
0 -> normal (no transforms)
1 -> 90 degrees
2 -> 180 degrees
3 -> 270 degrees
4 -> flipped
5 -> flipped + 90 degrees
6 -> flipped + 180 degrees
7 -> flipped + 270 degrees
```
## Default workspace

View file

@ -61,10 +61,10 @@ If you want to disable all keybinds with another keybind (make a keybind toggle
of sorts) you can just use a submap with only a keybind to exit it.
```ini
bind=MOD,KEY,submap,clean
submap=clean
bind=MOD,KEY,submap,reset
submap=reset
bind = MOD, KEY, submap, clean
submap = clean
bind = MOD, KEY, submap, reset
submap = reset
```
## Remap Caps-Lock to Ctrl
@ -114,11 +114,11 @@ To use Shimeji programs like
following rules:
```ini
windowrule=float, com-group_finity-mascot-Main
windowrule=noblur, com-group_finity-mascot-Main
windowrule=nofocus, com-group_finity-mascot-Main
windowrule=noshadow, com-group_finity-mascot-Main
windowrule=noborder, com-group_finity-mascot-Main
windowrule = float, com-group_finity-mascot-Main
windowrule = noblur, com-group_finity-mascot-Main
windowrule = nofocus, com-group_finity-mascot-Main
windowrule = noshadow, com-group_finity-mascot-Main
windowrule = noborder, com-group_finity-mascot-Main
```
{{< callout type=info >}}

View file

@ -4,14 +4,7 @@ title: Using hyprctl
---
`hyprctl` is a utility for controlling some parts of the compositor from a CLI
or a script. If you install with `make install`, or any package, it should
automatically be installed.
To check if `hyprctl` is installed, simply execute it by issuing `hyprctl` in
the terminal.
If it's not, go to the repo root and `/hyprctl`. Issue a `make all` and then
`sudo cp ./hyprctl /usr/bin`.
or a script. It should automatically be installed along with Hyprland.
{{< callout type=warning >}}
@ -27,12 +20,13 @@ For live event handling, see the [socket2](../../IPC/).
### dispatch
Issue a `dispatch` to call a keybind dispatcher with an arg.
Issue a `dispatch` to call a keybind dispatcher with an argument.
An arg has to be present, for dispatchers without parameters it can be anything.
An argument has to be present, for dispatchers without parameters it can be
anything.
To pass an argument starting with `-` or `--`, such as command line options to
`exec` programs, pass `--` as an option. This will disable any subsequent
To pass an argument starting with `-` or `--`, such as command line options
to `exec` programs, pass `--` as an option. This will disable any subsequent
parsing of options by _hyprctl_.
Examples:
@ -106,8 +100,9 @@ or
hyprctl output remove [name]
```
Where `[backend]` is the name of the backend and `(name)` is an optional name for the output. If `(name)` is not
specified, the default naming scheme will be used (`HEADLESS-2`, `WL-1`, etc.)
Where `[backend]` is the name of the backend and `(name)` is an optional name
for the output. If `(name)` is not specified, the default naming scheme will be
used (`HEADLESS-2`, `WL-1`, etc.)
{{< callout type=info >}}
@ -116,9 +111,12 @@ specified, the default naming scheme will be used (`HEADLESS-2`, `WL-1`, etc.)
{{< /callout >}}
Available backends:
- `wayland`: Creates an output as a Wayland window. This will only work if you're already running Hyprland with the Wayland backend.
- `headless`: Creates a headless monitor output. If you're running a VNC/RDP/Sunshine server, you should use this.
- `auto`: Picks a backend for you. For example, if you're running Hyprland from the TTY, `headless` will be chosen.
- `wayland`: Creates an output as a Wayland window. This will only work if
you're already running Hyprland with the Wayland backend.
- `headless`: Creates a headless monitor output. If you're running a VNC/RDP/
Sunshine server, you should use this.
- `auto`: Picks a backend for you. For example, if you're running Hyprland from
the TTY, `headless` will be chosen.
For example, to create a headless output named "test":
@ -140,8 +138,8 @@ For example, if you set:
```ini
device {
name=my-epic-keyboard-v1
kb_layout=us,pl,de
name = my-epic-keyboard-v1
kb_layout = us,pl,de
}
```
@ -163,7 +161,7 @@ hyprctl switchxkblayout at-translated-set-2-keyboard next
{{< callout type=info >}}
If you want a single variant ie. pl/dvorak on one layout but us/qwerty on the
If you want a single variant i.e. pl/dvorak on one layout but us/qwerty on the
other, xkb parameters can still be blank, however the amount of comma-separated
parameters have to match. Alternatively, a single parameter can be specified for
it to apply to all three.
@ -226,7 +224,9 @@ To get more information about a window, you can use `hyprctl clients`.
{{< callout type=warning >}}
Please beware that `hyprctl clients` will display the fields as **initialClass** and **initialTitle** while the regex mode uses `initialclass` and `initialtitle`.
Please beware that `hyprctl clients` will display the fields as **initialClass**
and **initialTitle** while the regex mode uses `initialclass` and
`initialtitle`.
{{< /callout >}}

View file

@ -30,8 +30,8 @@ windowrule=RULE,WINDOW
### Examples
```ini
windowrule=float,^(kitty)$
windowrule=move 0 0,title:^(Firefox)(.*)$
windowrule = float, ^(kitty)$
windowrule = move 0 0, title:^(Firefox)(.*)$
```
## Window Rules V2
@ -45,7 +45,7 @@ the `RULE` field is unchanged, but in the `WINDOW` field, you can put regexes
for multiple values like so:
```ini
windowrulev2 = float,class:(kitty),title:(kitty)
windowrulev2 = float, class:(kitty), title:(kitty)
```
{{< callout type=info >}}
@ -54,7 +54,7 @@ In the case of dynamic window titles such as browser windows, keep in mind how
powerful regex is.
For example, a window rule of:
`windowrule=opacity 0.3 override 0.3 override,title:(.*)(- Youtube)$` will match
`windowrule = opacity 0.3 override 0.3 override,title:(.*)(- Youtube)$` will match
_any_ window that contains a string of "- Youtube" after any other text. This
could be multiple browser windows or other applications that contain the string
for any reason.
@ -67,7 +67,7 @@ terminals.
For now, the supported fields for V2 are:
```ini
```
class - class regex
title - title regex
initialclass - initialClass regex
@ -166,15 +166,16 @@ The following rules can also be set with [`hyprctl setprop`](../Using-hyprctl#se
| immediate \[on\] | forces the window to allow to be torn. See [the Tearing page](../Tearing). |
| xray \[on\] | sets blur xray mode for the window |
When using window rules, \[on\] can be set to `0` for off, `1` for on or not set for default.
When using window rules, \[on\] can be set to `0` for off, `1` for on or not set
for default.
When using `hyprctl setprop`, \[on\] can be set to `0` for off, `1` for on, `toggle` to toggle the state or `unset` to unset previous values.
When using `hyprctl setprop`, \[on\] can be set to `0` for off, `1` for on,
`toggle` to toggle the state or `unset` to unset previous values.
When using `hyprctl setprop`, \[int\] can also be `unset` to unset previous values.
When using `hyprctl setprop`, \[int\] can also be `unset` to unset previous
values.
{{< callout type=info >}}
## `group` window rule options
### `group` window rule options
- `set` \[`always`\] - Open window as a group.
- `new` - Shorthand of `barred set`.
@ -196,16 +197,14 @@ The `group` rule without options is a shorthand for `group set`.
By default, `set` and `lock` only affect new windows once. The `always`
qualifier makes them always effective.
{{< /callout >}}
### Tags
Window may have several tags, either static or dynamic, dynamic tag will have a suffix of `*`.
You may check window tags with `hyprctl clients`.
Window may have several tags, either static or dynamic, dynamic tag will have a
suffix of `*`. You may check window tags with `hyprctl clients`.
Use `tagwindow` dispatcher to add a static tag to a window:
```
```bash
hyprctl dispatch tagwindow +code # add tag to current window
hyprctl dispatch tagwindow -- -code # remove tag from current window (use `--` to protect the leading `-`)
hyprctl dispatch tagwindow code # toggle the tag of current window
@ -239,42 +238,44 @@ windowrulev2 = opacity 0.2 override, tag:alpha_0.2
windowrulev2 = opacity 0.4 override, tag:alpha_0.4
```
The `tag` rule can only manipulate dynamic tags, and the `tagwindow` dispatcher only work with static tags
(as once the dispatcher is called, dynamic tags will be cleared).
The `tag` rule can only manipulate dynamic tags, and the `tagwindow` dispatcher
only work with static tags (as once the dispatcher is called, dynamic tags will
be cleared).
### Example Rules
```ini
windowrule = move 100 100,^(kitty)$ # moves kitty to 100 100
windowrule = animation popin,^(kitty)$ # sets the animation style for kitty
windowrule = noblur,^(firefox)$ # disables blur for firefox
windowrule = move cursor -50% -50%,^(kitty)$ # moves kitty to the center of the cursor
windowrulev2 = bordercolor rgb(FF0000) rgb(880808),fullscreen:1 # set bordercolor to red if window is fullscreen
windowrulev2 = bordercolor rgb(FFFF00),title:^(.*Hyprland.*)$ # set bordercolor to yellow when title contains Hyprland
windowrule = opacity 1.0 override 0.5 override 0.8 override,^(kitty)$ # set opacity to 1.0 active, 0.5 inactive and 0.8 fullscreen for kitty
windowrule = rounding 10,^(kitty)$ # set rounding to 10 for kitty
windowrulev2 = stayfocused, class:^(pinentry-) # fix pinentry losing focus
windowrule = move 100 100, ^(kitty)$ # moves kitty to 100 100
windowrule = animation popin, ^(kitty)$ # sets the animation style for kitty
windowrule = noblur, ^(firefox)$ # disables blur for firefox
windowrule = move cursor -50% -50%, ^(kitty)$ # moves kitty to the center of the cursor
windowrulev2 = bordercolor rgb(FF0000) rgb(880808), fullscreen:1 # set bordercolor to red if window is fullscreen
windowrulev2 = bordercolor rgb(FFFF00), title:^(.*Hyprland.*)$ # set bordercolor to yellow when title contains Hyprland
windowrule = opacity 1.0 override 0.5 override 0.8 override, ^(kitty)$ # set opacity to 1.0 active, 0.5 inactive and 0.8 fullscreen for kitty
windowrule = rounding 10, ^(kitty)$ # set rounding to 10 for kitty
windowrulev2 = stayfocused, class:^(pinentry-) # fix pinentry losing focus
```
### Notes
Rules that are marked as _Dynamic_ will be reevaluated if the matching property
of the window changes. For instance, if a rule is defined that changes the
`bordercolor` of a window when it is floating, then the `bordercolor` will change to
the requested color when it is set to floating, and revert to the default color
when it is tiled again.
`bordercolor` of a window when it is floating, then the `bordercolor` will
change to the requested color when it is set to floating, and revert to the
default color when it is tiled again.
Rules will be processed from top to bottom, where the _last_ match will take
precedence. i.e.
```ini
windowrulev2 = opacity 0.8 0.8,class:^(kitty)$
windowrulev2 = opacity 0.5 0.5,floating:1
windowrulev2 = opacity 0.8 0.8, class:^(kitty)$
windowrulev2 = opacity 0.5 0.5, floating:1
```
Here, all non-fullscreen kitty windows will have `opacity 0.8`, except if they are floating.
Otherwise, they will have `opacity 0.5`. The rest of the non-fullscreen floating windows will have `opacity 0.5`.
Here, all non-fullscreen kitty windows will have `opacity 0.8`, except if
they are floating. Otherwise, they will have `opacity 0.5`. The rest of the
non-fullscreen floating windows will have `opacity 0.5`.
```ini
windowrulev2 = opacity 0.5 0.5,floating:1
@ -286,16 +287,17 @@ The rest of the floating windows will have `opacity 0.5`.
{{< callout type=info >}}
Opacity is a PRODUCT of all opacities by default. For example, setting `activeopacity` to 0.5
and `opacity` to 0.5 will result in a total opacity of 0.25. You are allowed
to set opacities over 1, but any opacity product over 1 will cause graphical
glitches. For example, using `0.5 * 2 = 1` is fine, but `0.5 * 4 = 2` will cause
graphical glitches. You can put `override` after an opacity value to override it to an exact value
rather than a multiplier. For example, to set active and inactive opacity to 0.8,
and make fullscreen windows fully opaque regardless of other opacity rules:
Opacity is a PRODUCT of all opacities by default. For example, setting
`activeopacity` to 0.5 and `opacity` to 0.5 will result in a total opacity of
0.25. You are allowed to set opacities over 1, but any opacity product over 1
will cause graphical glitches. For example, using `0.5 * 2 = 1` is fine, but
`0.5 * 4 = 2` will cause graphical glitches. You can put `override` after an
opacity value to override it to an exact value rather than a multiplier. For
example, to set active and inactive opacity to 0.8, and make fullscreen windows
fully opaque regardless of other opacity rules:
```ini
windowrulev2 = opacity 0.8 override 0.8 override 1.0 override,^(kitty)$
windowrulev2 = opacity 0.8 override 0.8 override 1.0 override, ^(kitty)$
```
{{< /callout >}}
@ -313,8 +315,9 @@ layerrule = rule, namespace
layerrule = rule, address
```
where `rule` is the rule and `namespace` is the namespace regex (find namespaces
in `hyprctl layers`) or `address` is an address in the form of `address:0x[hex]`
where `rule` is the rule and `namespace` is the namespace regex (find
namespaces in `hyprctl layers`) or `address` is an address in the form of
`address:0x[hex]`.
### Rules

View file

@ -3,34 +3,40 @@ weight: 8
title: Workspace Rules
---
## Workspace Rules
You can set workspace rules to achieve workspace-specific behaviors. For
instance, you can define a workspace where all windows are drawn without borders
or gaps.
For layout-specific rules, see the specific layout page. For example:
[Master Layout->Workspace Rules](../Master-Layout#workspace-rules)
[Master Layout->Workspace Rules](../Master-Layout#workspace-rules).
### Workspace selectors
Workspaces that have already been created can be targeted by workspace selectors,
e.g. `r[2-4] w[t1]`
Workspaces that have already been created can be targeted by workspace
selectors, e.g. `r[2-4] w[t1]`.
Selectors have props separated by a space. No spaces are allowed inside props themselves.
Selectors have props separated by a space. No spaces are allowed inside props
themselves.
Props:
- `r[A-B]` - ID range from A to B inclusive
- `s[bool]` - Whether the workspace is special or not
- `n[bool]`, `n[s:string]`, `n[e:string]` - named actions. `n[bool]` -> whether a workspace is a named workspace, `s` and `e` are starts and ends with respectively
- `n[bool]`, `n[s:string]`, `n[e:string]` - named actions. `n[bool]` ->
whether a workspace is a named workspace, `s` and `e` are starts and ends
with respectively
- `m[monitor]` - Monitor selector
- `w[(flags)A-B]`, `w[(flags)X]` - Prop for window counts on the workspace. A-B is an inclusive range, X is a specific number. Flags can be omitted. It can be `t` for tiled-only, `f` for floating-only, `g` to count groups instead of windows, and `v` to count only visible windows.
- `f[-1]`, `f[0]`, `f[1]`, `f[2]` - fullscreen state of the workspace. `-1`: no fullscreen, `0`: fullscreen, `1`: maximized, `2`, fullscreen without fullscreen state sent to the window.
- `w[(flags)A-B]`, `w[(flags)X]` - Prop for window counts on the workspace.
A-B is an inclusive range, X is a specific number. Flags can be omitted.
It can be `t` for tiled-only, `f` for floating-only, `g` to count groups
instead of windows, and `v` to count only visible windows.
- `f[-1]`, `f[0]`, `f[1]`, `f[2]` - fullscreen state of the workspace. `-1`: no
fullscreen, `0`: fullscreen, `1`: maximized, `2`, fullscreen without
fullscreen state sent to the window.
### Syntax
```ini
workspace=WORKSPACE,RULES
workspace = WORKSPACE, RULES
```
- WORKSPACE is a valid workspace identifier (see
@ -42,9 +48,9 @@ workspace=WORKSPACE,RULES
### Examples
```ini
workspace=name:myworkspace,gapsin:0,gapsout:0
workspace=3,rounding:false,bordersize:0
workspace=w[tg1-4],shadow:false
workspace = name:myworkspace, gapsin:0, gapsout:0
workspace = 3, rounding:false, bordersize:0
workspace = w[tg1-4], shadow:false
```
## Rules

View file

@ -20,7 +20,7 @@ properly. To do this, each toolkit has its own mechanism.
```ini
# change monitor to high resolution, the last argument is the scale factor
monitor=,highres,auto,2
monitor = , highres, auto, 2
# unscale XWayland
xwayland {

View file

@ -4,3 +4,79 @@ title: Configuring
sidebar:
open: true
---
The config is located in `$XDG_CONFIG_HOME/hypr/hyprland.conf`. In most cases,
that maps to `~/.config/hypr/hyprland.conf`.
You can tell Hyprland to use a specific configuration file by using the
`--config` (or `-c`) argument.
Hyprland will automatically generate an example config for you if you don't have
one. You can find an example config
[here](https://github.com/hyprwm/Hyprland/blob/main/example/hyprland.conf).
By removing the line containing `autogenerated=1` you'll remove the yellow
warning.
The config is reloaded the moment you save it. However, you can use
`hyprctl reload` to reload the config manually.
Start a section with `name {` and end in `}` **_on separate lines!_**
{{< callout >}}
The default config is not complete and does not list all the options / features
of Hyprland. Please refer to this wiki page and the pages linked further down
here for full configuration instructions.
**Make sure to read the [Variables](./Variables) page as well**. It covers all
the toggleable / numerical options.
{{< /callout >}}
## Line style
Every config line is a command followed by a value.
```ini
COMMAND = VALUE
```
The command can be a variable, or a special keyword (described further in this
page)
The trailing spaces at the beginning and end of words are not necessary, and are
there only for legibility.
### Comments
Comments are started with the `#` character.
If you want to escape it (put an actual `#` and not start a comment) you can use
`##`. It will be turned into a single `#` that _will_ be a part of your line.
### Escaping errors
If you use plugins, you may want to ignore errors from missing options/keywords
so that you don't get an error bar before they are loaded. To do so, do this:
```ini
# hyprlang noerror true
bind = MOD, KEY, something, amogus
someoption = blah
# hyprlang noerror false
```
## Basic configuring
To configure Hyprland's options, animations, styling, etc. see
[Variables](./Variables).
## Advanced configuring
Some keywords (binds, curves, execs, monitors, etc.) are not variables but
define special behavior.
See all of them in [Keywords](./Keywords) and the sidebar.