mirror of
https://github.com/hyprwm/hyprland-wiki.git
synced 2024-11-22 12:45:59 +01:00
Configuring: reword/revamp
This commit is contained in:
parent
2fb6853e11
commit
ea9d39dbf0
13 changed files with 378 additions and 362 deletions
|
@ -8,7 +8,7 @@ title: Animations
|
||||||
Animations are declared with the `animation` keyword.
|
Animations are declared with the `animation` keyword.
|
||||||
|
|
||||||
```ini
|
```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
|
`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
|
### Examples
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
animation=workspaces,1,8,default
|
animation = workspaces, 1, 8, default
|
||||||
animation=windows,1,10,myepiccurve,slide
|
animation = windows, 1, 10, myepiccurve, slide
|
||||||
animation=fade,0
|
animation = fade, 0
|
||||||
```
|
```
|
||||||
|
|
||||||
### Animation tree
|
### Animation tree
|
||||||
|
@ -62,7 +62,7 @@ global
|
||||||
Defining your own Bezier curve can be done with the `bezier` keyword:
|
Defining your own Bezier curve can be done with the `bezier` keyword:
|
||||||
|
|
||||||
```ini
|
```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
|
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
|
### Example
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
bezier=overshot,0.05,0.9,0.1,1.1
|
bezier = overshot, 0.05, 0.9, 0.1, 1.1
|
||||||
```
|
```
|
||||||
|
|
||||||
### Extras
|
### Extras
|
||||||
|
@ -84,7 +84,7 @@ to start from. For example, the following will make the animation 80% -> 100% of
|
||||||
the size:
|
the size:
|
||||||
|
|
||||||
```ini
|
```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
|
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:
|
20% of the screen width:
|
||||||
|
|
||||||
```ini
|
```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
|
```ini
|
||||||
animation=windows,1,8,default,slide left
|
animation = windows, 1, 8, default, slide left
|
||||||
```
|
```
|
||||||
|
|
||||||
You can use `top`, `bottom`, `left` or `right`.
|
You can use `top`, `bottom`, `left` or `right`.
|
||||||
|
|
|
@ -6,13 +6,13 @@ title: Binds
|
||||||
## Basic
|
## Basic
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
bind=MODS,key,dispatcher,params
|
bind = MODS, key, dispatcher, params
|
||||||
```
|
```
|
||||||
|
|
||||||
for example,
|
for example,
|
||||||
|
|
||||||
```ini
|
```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>
|
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:
|
For binding keys without a modkey, leave it empty:
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
bind=,Print,exec,grim
|
bind = , Print, exec, grim
|
||||||
```
|
```
|
||||||
|
|
||||||
{{< /callout >}}
|
{{< /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.:
|
a `code:` prefix, e.g.:
|
||||||
|
|
||||||
```ini
|
```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
|
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.:
|
You can also unbind with `unbind`, e.g.:
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
unbind=SUPER,O
|
unbind = SUPER, O
|
||||||
```
|
```
|
||||||
|
|
||||||
May be useful for dynamic keybindings with `hyprctl`.
|
May be useful for dynamic keybindings with `hyprctl`:
|
||||||
|
|
||||||
```sh
|
```bash
|
||||||
hyprctl keyword unbind SUPER,O
|
hyprctl keyword unbind SUPER, O
|
||||||
```
|
```
|
||||||
|
|
||||||
### Mouse buttons
|
### Mouse buttons
|
||||||
|
@ -73,7 +73,7 @@ You can also bind mouse buttons, by prefacing the mouse keycode with `mouse:`,
|
||||||
for example:
|
for example:
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
bind=SUPER,mouse:272,exec,amongus
|
bind = SUPER, mouse:272, exec, amongus
|
||||||
```
|
```
|
||||||
|
|
||||||
will bind it to <key>SUPER</key> + <key>LMB</key>.
|
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.:
|
activating mod) and the `r` flag, e.g.:
|
||||||
|
|
||||||
```ini
|
```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>
|
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):
|
`mouse_left` and `mouse_right` if your wheel supports horizontal scrolling):
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
bind=SUPER,mouse_down,workspace,e-1
|
bind = SUPER, mouse_down, workspace, e-1
|
||||||
```
|
```
|
||||||
|
|
||||||
(control the reset time with `binds:scroll_event_delay`)
|
(control the reset time with `binds:scroll_event_delay`)
|
||||||
|
@ -125,11 +125,11 @@ Useful for binding e.g. the lid close/open event:
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
# trigger when the switch is toggled
|
# 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
|
# 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
|
# 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`.
|
You can view your switches in `hyprctl devices`.
|
||||||
|
@ -141,8 +141,8 @@ one combination, e.g.:
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
# to switch between windows in a floating workspace
|
# to switch between windows in a floating workspace
|
||||||
bind = SUPER,Tab,cyclenext, # change focus to another window
|
bind = SUPER, Tab, cyclenext, # change focus to another window
|
||||||
bind = SUPER,Tab,bringactivetotop, # bring it to the top
|
bind = SUPER, Tab, bringactivetotop, # bring it to the top
|
||||||
```
|
```
|
||||||
|
|
||||||
The keybinds will be executed in the order they were created. (top to bottom)
|
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 `,`!
|
Your description always goes in front of the dispatcher and should never contain the character `,`!
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
bindd=MODS,key,description,dispatcher,params
|
bindd = MODS, key, description, dispatcher, params
|
||||||
```
|
```
|
||||||
|
|
||||||
for example,
|
for example,
|
||||||
|
|
||||||
```ini
|
```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).
|
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:
|
`bind` supports flags in this format:
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
bind[flags]=...
|
bind[flags] = ...
|
||||||
```
|
```
|
||||||
|
|
||||||
e.g.:
|
e.g.:
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
bindrl=MOD,KEY,exec,amongus
|
bindrl = MOD, KEY, exec, amongus
|
||||||
```
|
```
|
||||||
|
|
||||||
Flags:
|
Flags:
|
||||||
|
|
||||||
```ini
|
```
|
||||||
l -> locked, will also work when an input inhibitor (e.g. a lockscreen) is active.
|
l -> locked, will also work when an input inhibitor (e.g. a lockscreen) is active.
|
||||||
r -> release, will trigger on release of a key.
|
r -> release, will trigger on release of a key.
|
||||||
e -> repeat, will repeat when held.
|
e -> repeat, will repeat when held.
|
||||||
|
@ -197,16 +197,16 @@ Example Usage:
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
# Example volume button that allows press and hold, volume limited to 150%
|
# 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
|
# 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
|
# 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
|
# 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
|
# 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:
|
will have one less arg, and may look like this:
|
||||||
|
|
||||||
```ini
|
```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
|
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.
|
As clicking and moving the mouse on a touchpad is unergonomic, you can also use keyboard keys instead of mouse clicks too.
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
bindm=SUPER, mouse:272, movewindow
|
bindm = SUPER, mouse:272, movewindow
|
||||||
bindm=SUPER, Control_L, movewindow
|
bindm = SUPER, Control_L, movewindow
|
||||||
bindm=SUPER, mouse:273, resizewindow
|
bindm = SUPER, mouse:273, resizewindow
|
||||||
bindm=SUPER, ALT_L, resizewindow
|
bindm = SUPER, ALT_L, resizewindow
|
||||||
```
|
```
|
||||||
|
|
||||||
## Binding mods
|
## Binding mods
|
||||||
|
@ -263,7 +263,7 @@ bindm=SUPER, ALT_L, resizewindow
|
||||||
You can bind a mod alone like this:
|
You can bind a mod alone like this:
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
bindr=ALT,Alt_L,exec,amongus
|
bindr = ALT,Alt_L,exec,amongus
|
||||||
```
|
```
|
||||||
|
|
||||||
## Global Keybinds
|
## 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,
|
Yes, you heard this right, Hyprland does support global keybinds for ALL apps,
|
||||||
including OBS, Discord, Firefox, etc.
|
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
|
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.
|
<key>SUPER</key> + <key>F10</key>, and you want to make it work globally. Simply
|
||||||
|
add
|
||||||
Simply add
|
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
bind = SUPER,F10,pass,^(com\.obsproject\.Studio)$
|
bind = SUPER, F10, pass, ^(com\.obsproject\.Studio)$
|
||||||
```
|
```
|
||||||
|
|
||||||
to your config and you're done.
|
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.:
|
This also means that push-to-talk will work flawlessly with one pass, e.g.:
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
bind=,mouse:276,pass,^(TeamSpeak 3)$
|
bind = , mouse:276, pass, ^(TeamSpeak 3)$
|
||||||
```
|
```
|
||||||
|
|
||||||
Will pass MOUSE5 to TeamSpeak3.
|
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.
|
You may also add shortcuts, where other keys are passed to the window.
|
||||||
|
|
||||||
```ini
|
```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 >}}
|
{{< callout >}}
|
||||||
|
|
||||||
This works flawlessly with all native Wayland applications. However, XWayland is a bit wonky.
|
This works flawlessly with all native Wayland applications. However, XWayland
|
||||||
Make sure that what you're passing is a "global Xorg keybind",
|
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.
|
otherwise passing from a different XWayland app may not work.
|
||||||
|
|
||||||
{{< /callout >}}
|
{{< /callout >}}
|
||||||
|
@ -318,12 +319,11 @@ xdg-desktop-portal.
|
||||||
|
|
||||||
If that's the case, then it's recommended to use this method instead of `pass`.
|
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
|
Open your desired app and run `hyprctl globalshortcuts` in a terminal. This will
|
||||||
list of currently registered shortcuts with their description(s).
|
give you a list of currently registered shortcuts with their description(s).
|
||||||
|
|
||||||
Choose whichever you like, for example `coolApp:myToggle`
|
Choose whichever you like, for example `coolApp:myToggle`, and bind it to
|
||||||
|
whatever you want with the `global` dispatcher:
|
||||||
Bind it to whatever you want with the `global` dispatcher:
|
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
bind = SUPERSHIFT, A, global, coolApp:myToggle
|
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
|
```ini
|
||||||
# will switch to a submap called resize
|
# will switch to a submap called resize
|
||||||
bind=ALT,R,submap,resize
|
bind = ALT, R, submap, resize
|
||||||
|
|
||||||
# will start a submap called "resize"
|
# will start a submap called "resize"
|
||||||
submap=resize
|
submap = resize
|
||||||
|
|
||||||
# sets repeatable binds for resizing the active window
|
# sets repeatable binds for resizing the active window
|
||||||
binde=,right,resizeactive,10 0
|
binde = , right, resizeactive, 10 0
|
||||||
binde=,left,resizeactive,-10 0
|
binde = , left, resizeactive, -10 0
|
||||||
binde=,up,resizeactive,0 -10
|
binde = , up, resizeactive, 0 -10
|
||||||
binde=,down,resizeactive,0 10
|
binde = , down, resizeactive, 0 10
|
||||||
|
|
||||||
# use reset to go back to the global submap
|
# 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
|
# will reset the submap, which will return to the global submap
|
||||||
submap=reset
|
submap = reset
|
||||||
|
|
||||||
# keybinds further down will be global again...
|
# 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:
|
and close the submap, like so:
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
bind=ALT,R,submap,resize
|
bind = ALT, R, submap, resize
|
||||||
|
|
||||||
submap=resize
|
submap = resize
|
||||||
|
|
||||||
bind=,right,resizeactive,10 0
|
bind = , right, resizeactive, 10 0
|
||||||
bind=,right,submap,reset
|
bind = , right, submap, reset
|
||||||
# ...
|
# ...
|
||||||
|
|
||||||
submap=reset
|
submap = reset
|
||||||
```
|
```
|
||||||
|
|
||||||
This works because the binds are executed in the order they appear, and
|
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:
|
immediately when any unknown key is pressed:
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
bind=,catchall,submap,reset
|
bind = , catchall, submap, reset
|
||||||
```
|
```
|
||||||
|
|
||||||
## Example Binds
|
## Example Binds
|
||||||
|
@ -412,11 +412,11 @@ These binds set the expected behavior for regular keyboard media volume keys,
|
||||||
including when the screen is locked:
|
including when the screen is locked:
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
bindel=, XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+
|
bindel = , XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+
|
||||||
bindel=, XF86AudioLowerVolume, 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
|
bindl = , XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
|
||||||
# Requires playerctl
|
# Requires playerctl
|
||||||
bindl=, XF86AudioPlay, exec, playerctl play-pause
|
bindl = , XF86AudioPlay, exec, playerctl play-pause
|
||||||
bindl=, XF86AudioPrev, exec, playerctl previous
|
bindl = , XF86AudioPrev, exec, playerctl previous
|
||||||
bindl=, XF86AudioNext, exec, playerctl next
|
bindl = , XF86AudioNext, exec, playerctl next
|
||||||
```
|
```
|
||||||
|
|
|
@ -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.
|
|
|
@ -84,11 +84,11 @@ layout pages (See the sidebar).
|
||||||
|
|
||||||
{{< callout type=warning >}}
|
{{< 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
|
undefined behavior. Instead, consider something like
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
bind = MOD,KEY,exec,sleep 1 && hyprctl dispatch dpms off
|
bind = MOD, KEY, exec, sleep 1 && hyprctl dispatch dpms off
|
||||||
```
|
```
|
||||||
|
|
||||||
{{< /callout >}}
|
{{< /callout >}}
|
||||||
|
@ -123,17 +123,22 @@ You have nine choices:
|
||||||
|
|
||||||
- Relative ID: e.g. `+1`, `-3` or `+100`
|
- 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`
|
- Name: e.g. `name:Web`, `name:Anime` or `name:Better anime`
|
||||||
|
|
||||||
- Previous workspace: `previous`, or `previous_per_monitor`
|
- 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.
|
- 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
|
For example, to move a window/application to a special workspace you can use the
|
||||||
following syntax:
|
following syntax:
|
||||||
|
|
||||||
```
|
```ini
|
||||||
bind = SUPER, C, movetoworkspace, special
|
bind = SUPER, C, movetoworkspace, special
|
||||||
#The above syntax will move the window to a special workspace upon pressing 'SUPER'+'C'.
|
#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.
|
#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
|
## Executing with rules
|
||||||
|
|
||||||
The `exec` dispatcher supports adding rules. Please note some windows might work
|
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
|
better, some worse. It records the PID of the spawned process and uses that.
|
||||||
your process forks and then the fork opens a window, this will not work.
|
For example, if your process forks and then the fork opens a window, this will
|
||||||
Rules will only be applied once. This means dynamic rules will be overridden as soon as a
|
not work. Rules will only be applied once. This means dynamic rules will be
|
||||||
property of the window changes (e.g. switching focus). To make dynamic rules stick around
|
overridden as soon as a property of the window changes (e.g. switching focus).
|
||||||
use `hyprctl setprop` (see [Using hyprctl](../Using-hyprctl)).
|
To make dynamic rules stick around use `hyprctl setprop` (see
|
||||||
|
[Using hyprctl](../Using-hyprctl)).
|
||||||
|
|
||||||
The syntax is:
|
The syntax is:
|
||||||
|
|
||||||
```
|
```ini
|
||||||
bind = mod, key, exec, [rules...] command
|
bind = mod, key, exec, [rules...] command
|
||||||
```
|
```
|
||||||
|
|
||||||
For example:
|
For example:
|
||||||
|
|
||||||
```
|
```ini
|
||||||
bind = SUPER, E, exec, [workspace 2 silent; float; move 0 0] kitty
|
bind = SUPER, E, exec, [workspace 2 silent; float; move 0 0] kitty
|
||||||
```
|
```
|
||||||
|
|
|
@ -17,12 +17,9 @@ otherwise in a specific section_:
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
three_param_keyword = A, B, C # OK
|
three_param_keyword = A, B, C # OK
|
||||||
|
three_param_keyword = A, C # NOT 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 # OK
|
|
||||||
|
|
||||||
three_param_keyword = A, B, # OK
|
|
||||||
```
|
```
|
||||||
|
|
||||||
{{< /callout >}}
|
{{< /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
|
You can execute a shell script on startup of the compositor or every time
|
||||||
the config is reloaded.
|
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
|
## Defining variables
|
||||||
|
|
||||||
|
@ -53,13 +50,13 @@ $MyFavoriteGame = Among Us
|
||||||
Then you can reference them in the rest of the config. For example:
|
Then you can reference them in the rest of the config. For example:
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
col.active_border=$MyColor
|
col.active_border = $MyColor
|
||||||
```
|
```
|
||||||
|
|
||||||
You are allowed to combine variables in-place with other strings, like this:
|
You are allowed to combine variables in-place with other strings, like this:
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
col.active_border=ff$MyRedValue1111
|
col.active_border = ff$MyRedValue1111
|
||||||
```
|
```
|
||||||
|
|
||||||
## Sourcing (multi-file)
|
## Sourcing (multi-file)
|
||||||
|
@ -69,18 +66,17 @@ Use the `source` keyword to source another file.
|
||||||
For example, in your `hyprland.conf` you can:
|
For example, in your `hyprland.conf` you can:
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
source=~/.config/hypr/myColors.conf
|
source = ~/.config/hypr/myColors.conf
|
||||||
```
|
```
|
||||||
|
|
||||||
And Hyprland will enter that file and parse it like a Hyprland config.
|
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.
|
then lines inside `~/.config/hypr/myColors.conf`, then lines below.
|
||||||
|
|
||||||
## Gestures
|
## Gestures
|
||||||
|
|
||||||
Use something like
|
Use [libinput-gestures](https://github.com/bulletmark/libinput-gestures) with
|
||||||
[libinput-gestures](https://github.com/bulletmark/libinput-gestures), with
|
|
||||||
`hyprctl` if you want to expand Hyprland's gestures beyond what's offered in
|
`hyprctl` if you want to expand Hyprland's gestures beyond what's offered in
|
||||||
[Variables](../Variables).
|
[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
|
section. It's worth noting that ONLY values explicitly changed will be
|
||||||
overwritten.
|
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
|
```ini
|
||||||
device {
|
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
|
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**:
|
(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:
|
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:
|
Additional properties only present in per-device configs:
|
||||||
|
|
||||||
```plain
|
- `enabled` -> (only for mice / touchpads / touchdevices / keyboards)
|
||||||
enabled -> (only for mice / touchpads / touchdevices / keyboards) enables / disables the device (connects / disconnects from the on-screen cursor) - default: Enabled
|
- enables / disables the device (connects / disconnects from the on-screen cursor)
|
||||||
```
|
- default: Enabled
|
||||||
|
|
||||||
Example config section:
|
Example config section:
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
device {
|
device {
|
||||||
name = royuan-akko-multi-modes-keyboard-b
|
name = royuan-akko-multi-modes-keyboard-b
|
||||||
repeat_rate=50
|
repeat_rate = 50
|
||||||
repeat_delay=500
|
repeat_delay = 500
|
||||||
middle_button_emulation=0
|
middle_button_emulation = 0
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Example modifying per-device config values using `hyprctl`:
|
Example modifying per-device config values using `hyprctl`:
|
||||||
|
|
||||||
```plain
|
```bash
|
||||||
hyprctl -r -- keyword device[my-device]:sensitivity -1
|
hyprctl -r -- keyword device[my-device]:sensitivity -1
|
||||||
```
|
```
|
||||||
|
|
||||||
{{< callout type=info >}}
|
{{< callout type=info >}}
|
||||||
|
|
||||||
Per-device layouts will by default not alter the keybind keymap, so for example with a global keymap of `us`
|
Per-device layouts will by default not alter the keybind keymap, so for example
|
||||||
and a per-device one of `fr`, the keybinds will still act as if you were on `us`.
|
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`.
|
You can change this behavior by setting `resolve_binds_by_sym = 1`. In that case
|
||||||
In that case you'll need to type the symbol specified in the bind to activate it.
|
you'll need to type the symbol specified in the bind to activate it.
|
||||||
|
|
||||||
{{< /callout >}}
|
{{< /callout >}}
|
||||||
|
|
||||||
|
@ -162,15 +162,15 @@ More can be found in [Useful Utilities](../../Useful-Utilities).
|
||||||
|
|
||||||
## Blurring layerSurfaces
|
## 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.
|
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
|
```ini
|
||||||
layerrule = blur,NAMESPACE
|
layerrule = blur, NAMESPACE
|
||||||
# or
|
# or
|
||||||
layerrule = blur,address:0x<ADDRESS>
|
layerrule = blur, address:0x<ADDRESS>
|
||||||
```
|
```
|
||||||
|
|
||||||
You can get the namespace / address from `hyprctl layers`.
|
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:
|
To remove a layer rule (useful in dynamic situations) use:
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
layerrule = unset,<whatever you used before>
|
layerrule = unset, <whatever you used before>
|
||||||
```
|
```
|
||||||
|
|
||||||
For example:
|
For example:
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
layerrule = unset,NAMESPACE
|
layerrule = unset, NAMESPACE
|
||||||
```
|
```
|
||||||
|
|
||||||
## Setting the environment
|
## Setting the environment
|
||||||
|
@ -196,15 +196,15 @@ Hyprland's launch.
|
||||||
|
|
||||||
{{< /callout >}}
|
{{< /callout >}}
|
||||||
|
|
||||||
You can use the `env` keyword to set environment variables at Hyprland's start,
|
You can use the `env` keyword to set environment variables when Hyprland starts,
|
||||||
e.g.:
|
e.g:
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
env = XCURSOR_SIZE,24
|
env = XCURSOR_SIZE,24
|
||||||
```
|
```
|
||||||
|
|
||||||
You can also add a `d` flag if you want the env var to be exported to D-Bus
|
You can also add a `d` flag if you want the env var to be exported to D-Bus
|
||||||
(systemd only)
|
(systemd only):
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
envd = XCURSOR_SIZE,24
|
envd = XCURSOR_SIZE,24
|
||||||
|
|
|
@ -62,9 +62,9 @@ Parameters for the commands are separated by a single space.
|
||||||
Example usage:
|
Example usage:
|
||||||
|
|
||||||
```ini
|
```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)
|
# 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 >}}
|
{{< /callout >}}
|
||||||
|
|
|
@ -8,13 +8,13 @@ title: Monitors
|
||||||
The general config of a monitor looks like this:
|
The general config of a monitor looks like this:
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
monitor=name,resolution,position,scale
|
monitor = name, resolution, position, scale
|
||||||
```
|
```
|
||||||
|
|
||||||
A common example:
|
A common example:
|
||||||
|
|
||||||
```ini
|
```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
|
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):
|
To list all available monitors (active and inactive):
|
||||||
|
|
||||||
```shell
|
```bash
|
||||||
hyprctl monitors all
|
hyprctl monitors all
|
||||||
```
|
```
|
||||||
|
|
||||||
Monitors are positioned on a virtual "layout". The `position` is the position of
|
Monitors are positioned on a virtual "layout". The `position` is the position,
|
||||||
said display in the layout. (calculated from the top-left corner)
|
in pixels, of said display in the layout. (calculated from the top-left corner)
|
||||||
|
|
||||||
For example:
|
For example:
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
monitor=DP-1, 1920x1080, 0x0, 1
|
monitor = DP-1, 1920x1080, 0x0, 1
|
||||||
monitor=DP-2, 1920x1080, 1920x0, 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
|
```ini
|
||||||
monitor=DP-1, 1920x1080, 1920x0, 1
|
monitor = DP-1, 1920x1080, 1920x0, 1
|
||||||
monitor=DP-2, 1920x1080, 0x0, 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
|
The `position` may contain _negative_ values, so the above example could also be
|
||||||
written as
|
written as
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
monitor=DP-1, 1920x1080, 0x0, 1
|
monitor = DP-1, 1920x1080, 0x0, 1
|
||||||
monitor=DP-2, 1920x1080, -1920x0, 1
|
monitor = DP-2, 1920x1080, -1920x0, 1
|
||||||
```
|
```
|
||||||
|
|
||||||
Hyprland uses an inverse Y cartesian system. Thus, a negative y coordinate
|
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:
|
For example:
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
monitor=DP-1, 1920x1080, 0x0, 1
|
monitor = DP-1, 1920x1080, 0x0, 1
|
||||||
monitor=DP-2, 1920x1080, 0x-1080, 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
|
```ini
|
||||||
monitor=DP-1, 1920x1080, 0x0, 1
|
monitor = DP-1, 1920x1080, 0x0, 1
|
||||||
monitor=DP-2, 1920x1080, 0x1080, 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 >}}
|
{{< 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
|
Leaving the name empty will define a fallback rule to use when no other rules
|
||||||
match.
|
match.
|
||||||
|
|
||||||
You can use `preferred` as a resolution to use the display's preferred size,
|
There are a few special values for the resolutions:
|
||||||
or you can use `highres` or `highrr` to get the best possible resolution or refresh rate for your monitor.
|
- `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
|
***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`,
|
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
|
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:
|
Recommended rule for quickly plugging in random monitors:
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
monitor=,preferred,auto,1
|
monitor = , preferred, auto, 1
|
||||||
```
|
```
|
||||||
|
|
||||||
Will make any monitor that was not specified with an explicit rule automatically
|
This will make any monitor that was not specified with an explicit rule
|
||||||
placed on the right of the other(s) with its preferred resolution.
|
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
|
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
|
`hyprctl monitors` for more details). If the output of `hyprctl monitors` looks
|
||||||
like the following:
|
like the following:
|
||||||
|
|
||||||
```
|
```yaml
|
||||||
Monitor eDP-1 (ID 0):
|
Monitor eDP-1 (ID 0):
|
||||||
1920x1080@60.00100 at 0x0
|
1920x1080@60.00100 at 0x0
|
||||||
description: Chimei Innolux Corporation 0x150C (eDP-1)
|
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
|
then the `description` value up to, but not including the portname `(eDP-1)` can
|
||||||
the monitor:
|
be used to specify the monitor:
|
||||||
|
|
||||||
```
|
```ini
|
||||||
monitor=desc:Chimei Innolux Corporation 0x150C,preferred,auto,1.5
|
monitor = desc:Chimei Innolux Corporation 0x150C, preferred, auto, 1.5
|
||||||
```
|
```
|
||||||
|
|
||||||
Remember to remove the `(portname)`!
|
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,
|
You can set up a custom modeline by changing the resolution field to a modeline,
|
||||||
for example:
|
for example:
|
||||||
|
|
||||||
```
|
```ini
|
||||||
monitor = DP-1, modeline 1071.101 3840 3848 3880 3920 2160 2263 2271 2277 +hsync -vsync, 0x0, 1
|
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
|
To disable a monitor, use
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
monitor=name,disable
|
monitor = name, disable
|
||||||
```
|
```
|
||||||
|
|
||||||
{{< callout >}}
|
{{< 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:
|
If your workflow requires a custom reserved area, you can add it with:
|
||||||
|
|
||||||
```ini
|
```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
|
Where `TOP` `BOTTOM` `LEFT` `RIGHT` are integers, i.e the number in pixels of
|
||||||
to add. This does stack on top of the calculated one (e.g. bars), but you may
|
the reserved area to add. This does stack on top of the calculated reserved area
|
||||||
only use one of these rules per monitor in the config.
|
(e.g. bars), but you may only use one of these rules per monitor in the config.
|
||||||
|
|
||||||
## Extra args
|
## Extra args
|
||||||
|
|
||||||
You can combine extra arguments at the end of the monitor rule, examples:
|
You can combine extra arguments at the end of the monitor rule, examples:
|
||||||
|
|
||||||
```ini
|
```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
|
### 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:
|
monitor rule, examples:
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
monitor=DP-3,1920x1080@60,0x0,1,mirror,DP-2
|
monitor = DP-3, 1920x1080@60, 0x0, 1, mirror, DP-2
|
||||||
monitor=,preferred,auto,1,mirror,DP-1
|
monitor = , preferred, auto, 1, mirror, DP-1
|
||||||
```
|
```
|
||||||
|
|
||||||
Please remember that mirroring displays will not "re-render" everything for your
|
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
|
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 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
|
### 10 bit support
|
||||||
|
|
||||||
If you want to enable 10 bit support for your display, add a `,bitdepth,10` at
|
If you want to enable 10 bit support for your display, add a `, bitdepth, 10` at
|
||||||
the end of the monitor rule, e.g.:
|
the end of the monitor rule, e.g:
|
||||||
|
|
||||||
```ini
|
```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.
|
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
|
### 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).
|
[variables page](../Variables).
|
||||||
|
|
||||||
## Rotating
|
## 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.:
|
rule, where `X` corresponds to a transform number, e.g.:
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
monitor=eDP-1,2880x1800@90,0x0,1,transform,1
|
monitor = eDP-1, 2880x1800@90, 0x0, 1, transform, 1
|
||||||
```
|
```
|
||||||
|
|
||||||
Transform list:
|
Transform list:
|
||||||
|
|
||||||
```ini
|
```
|
||||||
normal (no transforms) -> 0
|
0 -> normal (no transforms)
|
||||||
90 degrees -> 1
|
1 -> 90 degrees
|
||||||
180 degrees -> 2
|
2 -> 180 degrees
|
||||||
270 degrees -> 3
|
3 -> 270 degrees
|
||||||
flipped -> 4
|
4 -> flipped
|
||||||
flipped + 90 degrees -> 5
|
5 -> flipped + 90 degrees
|
||||||
flipped + 180 degrees -> 6
|
6 -> flipped + 180 degrees
|
||||||
flipped + 270 degrees -> 7
|
7 -> flipped + 270 degrees
|
||||||
```
|
```
|
||||||
|
|
||||||
## Default workspace
|
## Default workspace
|
||||||
|
|
|
@ -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.
|
of sorts) you can just use a submap with only a keybind to exit it.
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
bind=MOD,KEY,submap,clean
|
bind = MOD, KEY, submap, clean
|
||||||
submap=clean
|
submap = clean
|
||||||
bind=MOD,KEY,submap,reset
|
bind = MOD, KEY, submap, reset
|
||||||
submap=reset
|
submap = reset
|
||||||
```
|
```
|
||||||
|
|
||||||
## Remap Caps-Lock to Ctrl
|
## Remap Caps-Lock to Ctrl
|
||||||
|
@ -114,11 +114,11 @@ To use Shimeji programs like
|
||||||
following rules:
|
following rules:
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
windowrule=float, com-group_finity-mascot-Main
|
windowrule = float, com-group_finity-mascot-Main
|
||||||
windowrule=noblur, com-group_finity-mascot-Main
|
windowrule = noblur, com-group_finity-mascot-Main
|
||||||
windowrule=nofocus, com-group_finity-mascot-Main
|
windowrule = nofocus, com-group_finity-mascot-Main
|
||||||
windowrule=noshadow, com-group_finity-mascot-Main
|
windowrule = noshadow, com-group_finity-mascot-Main
|
||||||
windowrule=noborder, com-group_finity-mascot-Main
|
windowrule = noborder, com-group_finity-mascot-Main
|
||||||
```
|
```
|
||||||
|
|
||||||
{{< callout type=info >}}
|
{{< callout type=info >}}
|
||||||
|
|
|
@ -4,14 +4,7 @@ title: Using hyprctl
|
||||||
---
|
---
|
||||||
|
|
||||||
`hyprctl` is a utility for controlling some parts of the compositor from a CLI
|
`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
|
or a script. It should automatically be installed along with Hyprland.
|
||||||
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`.
|
|
||||||
|
|
||||||
{{< callout type=warning >}}
|
{{< callout type=warning >}}
|
||||||
|
|
||||||
|
@ -27,12 +20,13 @@ For live event handling, see the [socket2](../../IPC/).
|
||||||
|
|
||||||
### dispatch
|
### 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
|
To pass an argument starting with `-` or `--`, such as command line options
|
||||||
`exec` programs, pass `--` as an option. This will disable any subsequent
|
to `exec` programs, pass `--` as an option. This will disable any subsequent
|
||||||
parsing of options by _hyprctl_.
|
parsing of options by _hyprctl_.
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
@ -106,8 +100,9 @@ or
|
||||||
hyprctl output remove [name]
|
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
|
Where `[backend]` is the name of the backend and `(name)` is an optional name
|
||||||
specified, the default naming scheme will be used (`HEADLESS-2`, `WL-1`, etc.)
|
for the output. If `(name)` is not specified, the default naming scheme will be
|
||||||
|
used (`HEADLESS-2`, `WL-1`, etc.)
|
||||||
|
|
||||||
{{< callout type=info >}}
|
{{< callout type=info >}}
|
||||||
|
|
||||||
|
@ -116,9 +111,12 @@ specified, the default naming scheme will be used (`HEADLESS-2`, `WL-1`, etc.)
|
||||||
{{< /callout >}}
|
{{< /callout >}}
|
||||||
|
|
||||||
Available backends:
|
Available backends:
|
||||||
- `wayland`: Creates an output as a Wayland window. This will only work if you're already running Hyprland with the Wayland backend.
|
- `wayland`: Creates an output as a Wayland window. This will only work if
|
||||||
- `headless`: Creates a headless monitor output. If you're running a VNC/RDP/Sunshine server, you should use this.
|
you're already running Hyprland with the Wayland backend.
|
||||||
- `auto`: Picks a backend for you. For example, if you're running Hyprland from the TTY, `headless` will be chosen.
|
- `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":
|
For example, to create a headless output named "test":
|
||||||
|
|
||||||
|
@ -140,8 +138,8 @@ For example, if you set:
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
device {
|
device {
|
||||||
name=my-epic-keyboard-v1
|
name = my-epic-keyboard-v1
|
||||||
kb_layout=us,pl,de
|
kb_layout = us,pl,de
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -163,7 +161,7 @@ hyprctl switchxkblayout at-translated-set-2-keyboard next
|
||||||
|
|
||||||
{{< callout type=info >}}
|
{{< 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
|
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
|
parameters have to match. Alternatively, a single parameter can be specified for
|
||||||
it to apply to all three.
|
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 >}}
|
{{< 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 >}}
|
{{< /callout >}}
|
||||||
|
|
||||||
|
|
|
@ -30,8 +30,8 @@ windowrule=RULE,WINDOW
|
||||||
### Examples
|
### Examples
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
windowrule=float,^(kitty)$
|
windowrule = float, ^(kitty)$
|
||||||
windowrule=move 0 0,title:^(Firefox)(.*)$
|
windowrule = move 0 0, title:^(Firefox)(.*)$
|
||||||
```
|
```
|
||||||
|
|
||||||
## Window Rules V2
|
## 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:
|
for multiple values like so:
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
windowrulev2 = float,class:(kitty),title:(kitty)
|
windowrulev2 = float, class:(kitty), title:(kitty)
|
||||||
```
|
```
|
||||||
|
|
||||||
{{< callout type=info >}}
|
{{< 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.
|
powerful regex is.
|
||||||
|
|
||||||
For example, a window rule of:
|
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
|
_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
|
could be multiple browser windows or other applications that contain the string
|
||||||
for any reason.
|
for any reason.
|
||||||
|
@ -67,7 +67,7 @@ terminals.
|
||||||
|
|
||||||
For now, the supported fields for V2 are:
|
For now, the supported fields for V2 are:
|
||||||
|
|
||||||
```ini
|
```
|
||||||
class - class regex
|
class - class regex
|
||||||
title - title regex
|
title - title regex
|
||||||
initialclass - initialClass 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). |
|
| immediate \[on\] | forces the window to allow to be torn. See [the Tearing page](../Tearing). |
|
||||||
| xray \[on\] | sets blur xray mode for the window |
|
| 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.
|
- `set` \[`always`\] - Open window as a group.
|
||||||
- `new` - Shorthand of `barred set`.
|
- `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`
|
By default, `set` and `lock` only affect new windows once. The `always`
|
||||||
qualifier makes them always effective.
|
qualifier makes them always effective.
|
||||||
|
|
||||||
{{< /callout >}}
|
|
||||||
|
|
||||||
### Tags
|
### Tags
|
||||||
|
|
||||||
Window may have several tags, either static or dynamic, dynamic tag will have a suffix of `*`.
|
Window may have several tags, either static or dynamic, dynamic tag will have a
|
||||||
You may check window tags with `hyprctl clients`.
|
suffix of `*`. You may check window tags with `hyprctl clients`.
|
||||||
|
|
||||||
Use `tagwindow` dispatcher to add a static tag to a window:
|
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 # add tag to current window
|
||||||
hyprctl dispatch tagwindow -- -code # remove tag from current window (use `--` to protect the leading `-`)
|
hyprctl dispatch tagwindow -- -code # remove tag from current window (use `--` to protect the leading `-`)
|
||||||
hyprctl dispatch tagwindow code # toggle the tag of current window
|
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
|
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
|
The `tag` rule can only manipulate dynamic tags, and the `tagwindow` dispatcher
|
||||||
(as once the dispatcher is called, dynamic tags will be cleared).
|
only work with static tags (as once the dispatcher is called, dynamic tags will
|
||||||
|
be cleared).
|
||||||
|
|
||||||
|
|
||||||
### Example Rules
|
### Example Rules
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
windowrule = move 100 100,^(kitty)$ # moves kitty to 100 100
|
windowrule = move 100 100, ^(kitty)$ # moves kitty to 100 100
|
||||||
windowrule = animation popin,^(kitty)$ # sets the animation style for kitty
|
windowrule = animation popin, ^(kitty)$ # sets the animation style for kitty
|
||||||
windowrule = noblur,^(firefox)$ # disables blur for firefox
|
windowrule = noblur, ^(firefox)$ # disables blur for firefox
|
||||||
windowrule = move cursor -50% -50%,^(kitty)$ # moves kitty to the center of the cursor
|
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(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
|
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 = 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
|
windowrule = rounding 10, ^(kitty)$ # set rounding to 10 for kitty
|
||||||
windowrulev2 = stayfocused, class:^(pinentry-) # fix pinentry losing focus
|
windowrulev2 = stayfocused, class:^(pinentry-) # fix pinentry losing focus
|
||||||
```
|
```
|
||||||
|
|
||||||
### Notes
|
### Notes
|
||||||
|
|
||||||
Rules that are marked as _Dynamic_ will be reevaluated if the matching property
|
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
|
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
|
`bordercolor` of a window when it is floating, then the `bordercolor` will
|
||||||
the requested color when it is set to floating, and revert to the default color
|
change to the requested color when it is set to floating, and revert to the
|
||||||
when it is tiled again.
|
default color when it is tiled again.
|
||||||
|
|
||||||
Rules will be processed from top to bottom, where the _last_ match will take
|
Rules will be processed from top to bottom, where the _last_ match will take
|
||||||
precedence. i.e.
|
precedence. i.e.
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
windowrulev2 = opacity 0.8 0.8,class:^(kitty)$
|
windowrulev2 = opacity 0.8 0.8, class:^(kitty)$
|
||||||
windowrulev2 = opacity 0.5 0.5,floating:1
|
windowrulev2 = opacity 0.5 0.5, floating:1
|
||||||
```
|
```
|
||||||
|
|
||||||
Here, all non-fullscreen kitty windows will have `opacity 0.8`, except if they are floating.
|
Here, all non-fullscreen kitty windows will have `opacity 0.8`, except if
|
||||||
Otherwise, they will have `opacity 0.5`. The rest of the non-fullscreen floating windows will have `opacity 0.5`.
|
they are floating. Otherwise, they will have `opacity 0.5`. The rest of the
|
||||||
|
non-fullscreen floating windows will have `opacity 0.5`.
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
windowrulev2 = opacity 0.5 0.5,floating:1
|
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 >}}
|
{{< callout type=info >}}
|
||||||
|
|
||||||
Opacity is a PRODUCT of all opacities by default. For example, setting `activeopacity` to 0.5
|
Opacity is a PRODUCT of all opacities by default. For example, setting
|
||||||
and `opacity` to 0.5 will result in a total opacity of 0.25. You are allowed
|
`activeopacity` to 0.5 and `opacity` to 0.5 will result in a total opacity of
|
||||||
to set opacities over 1, but any opacity product over 1 will cause graphical
|
0.25. You are allowed to set opacities over 1, but any opacity product over 1
|
||||||
glitches. For example, using `0.5 * 2 = 1` is fine, but `0.5 * 4 = 2` will cause
|
will cause graphical glitches. For example, using `0.5 * 2 = 1` is fine, but
|
||||||
graphical glitches. You can put `override` after an opacity value to override it to an exact value
|
`0.5 * 4 = 2` will cause graphical glitches. You can put `override` after an
|
||||||
rather than a multiplier. For example, to set active and inactive opacity to 0.8,
|
opacity value to override it to an exact value rather than a multiplier. For
|
||||||
and make fullscreen windows fully opaque regardless of other opacity rules:
|
example, to set active and inactive opacity to 0.8, and make fullscreen windows
|
||||||
|
fully opaque regardless of other opacity rules:
|
||||||
|
|
||||||
```ini
|
```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 >}}
|
{{< /callout >}}
|
||||||
|
@ -313,8 +315,9 @@ layerrule = rule, namespace
|
||||||
layerrule = rule, address
|
layerrule = rule, address
|
||||||
```
|
```
|
||||||
|
|
||||||
where `rule` is the rule and `namespace` is the namespace regex (find namespaces
|
where `rule` is the rule and `namespace` is the namespace regex (find
|
||||||
in `hyprctl layers`) or `address` is an address in the form of `address:0x[hex]`
|
namespaces in `hyprctl layers`) or `address` is an address in the form of
|
||||||
|
`address:0x[hex]`.
|
||||||
|
|
||||||
### Rules
|
### Rules
|
||||||
|
|
||||||
|
|
|
@ -3,34 +3,40 @@ weight: 8
|
||||||
title: Workspace Rules
|
title: Workspace Rules
|
||||||
---
|
---
|
||||||
|
|
||||||
## Workspace Rules
|
|
||||||
|
|
||||||
You can set workspace rules to achieve workspace-specific behaviors. For
|
You can set workspace rules to achieve workspace-specific behaviors. For
|
||||||
instance, you can define a workspace where all windows are drawn without borders
|
instance, you can define a workspace where all windows are drawn without borders
|
||||||
or gaps.
|
or gaps.
|
||||||
|
|
||||||
For layout-specific rules, see the specific layout page. For example:
|
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
|
### Workspace selectors
|
||||||
|
|
||||||
Workspaces that have already been created can be targeted by workspace selectors,
|
Workspaces that have already been created can be targeted by workspace
|
||||||
e.g. `r[2-4] w[t1]`
|
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:
|
Props:
|
||||||
- `r[A-B]` - ID range from A to B inclusive
|
- `r[A-B]` - ID range from A to B inclusive
|
||||||
- `s[bool]` - Whether the workspace is special or not
|
- `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
|
- `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.
|
- `w[(flags)A-B]`, `w[(flags)X]` - Prop for window counts on the workspace.
|
||||||
- `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.
|
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
|
### Syntax
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
workspace=WORKSPACE,RULES
|
workspace = WORKSPACE, RULES
|
||||||
```
|
```
|
||||||
|
|
||||||
- WORKSPACE is a valid workspace identifier (see
|
- WORKSPACE is a valid workspace identifier (see
|
||||||
|
@ -42,9 +48,9 @@ workspace=WORKSPACE,RULES
|
||||||
### Examples
|
### Examples
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
workspace=name:myworkspace,gapsin:0,gapsout:0
|
workspace = name:myworkspace, gapsin:0, gapsout:0
|
||||||
workspace=3,rounding:false,bordersize:0
|
workspace = 3, rounding:false, bordersize:0
|
||||||
workspace=w[tg1-4],shadow:false
|
workspace = w[tg1-4], shadow:false
|
||||||
```
|
```
|
||||||
|
|
||||||
## Rules
|
## Rules
|
||||||
|
|
|
@ -20,7 +20,7 @@ properly. To do this, each toolkit has its own mechanism.
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
# change monitor to high resolution, the last argument is the scale factor
|
# change monitor to high resolution, the last argument is the scale factor
|
||||||
monitor=,highres,auto,2
|
monitor = , highres, auto, 2
|
||||||
|
|
||||||
# unscale XWayland
|
# unscale XWayland
|
||||||
xwayland {
|
xwayland {
|
||||||
|
|
|
@ -4,3 +4,79 @@ title: Configuring
|
||||||
sidebar:
|
sidebar:
|
||||||
open: true
|
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.
|
||||||
|
|
Loading…
Reference in a new issue