2022-09-24 20:04:35 +02:00
# Table of contents
2022-10-23 16:35:39 +02:00
2022-09-24 20:04:35 +02:00
{{< toc > }}
2022-09-24 15:32:40 +02:00
Please keep in mind some layout-specific dispatchers will be listed in the
layout pages (See the sidebar).
2022-10-23 16:35:39 +02:00
# Parameter explanation
2022-09-24 15:32:40 +02:00
| Param type | Description |
| ---------- | ----------- |
| window | a window. Any of the following: Class regex, `title:` and a title regex, `pid:` and the pid, `address:` and the address |
| workspace | see below. |
| direction | `l` `r` `u` `d` left right up down |
2022-11-10 13:22:49 +01:00
| monitor | One of: direction, ID, name, `current` , relative (e.g. `+1` or `-1` ) |
2022-12-17 23:37:55 +01:00
| resizeparams | Pixel delta vec2 (e.g. `10 -10` ) or `exact` followed by exact vec2 (e.g. `exact 1280 720` ) |
| floatvalue | a relative float delta (e.g `-0.2` or `+0.2` ) or `exact` followed by a the exact float value (e.g. `exact 0.5` ) |
2022-09-24 15:32:40 +02:00
| workspaceopt | see below. |
2022-10-23 16:35:39 +02:00
# List of Dispatchers
2022-09-24 15:32:40 +02:00
| Dispatcher | Description | Params |
| ---------- | ----------- | ------ |
2022-11-10 14:41:48 +01:00
| exec | executes a shell command | command (supports rules, see below) |
2023-02-19 15:01:03 +01:00
| execr | executes a raw shell command (will not append any additional envvars like `exec` does, does not support rules) | command |
2022-09-24 15:32:40 +02:00
| pass | passes the key (with mods) to a specified window. Can be used as a workaround to global keybinds not working on Wayland. | window |
| killactive | closes (not kills) the active window | none |
| closewindow | closes a specified window | window |
| workspace | changes the workspace | workspace |
| movetoworkspace | moves the focused window to a workspace | workspace OR `workspace,window` for a specific window |
| movetoworkspacesilent | same as above, but doesnt switch to the workspace | workspace OR `workspace,window` for a specific window |
| togglefloating | toggles the current window's floating state | left empty / `active` for current, or `window` for a specific window |
| fullscreen | toggles the focused window's fullscreen state | 0 - fullscreen (takes your entire screen), 1 - maximize (keeps gaps and bar(s)) |
2023-01-01 16:55:10 +01:00
| fakefullscreen | toggles the focused window's internal fullscreen state without altering the geometry | none |
2022-10-05 11:32:48 +02:00
| dpms | sets all monitors' DPMS status. Do not use with a keybind directly. | `on` or `off` , for specific monitor add monitor name after a space |
2023-01-08 18:37:33 +01:00
| pin | pins a window (i.e. show it on all workspaces) *note: floating only* | left empty / `active` for current, or `window` for a specific window |
2022-09-24 15:32:40 +02:00
| movefocus | moves the focus in a direction | direction |
| movewindow | moves the active window in a direction or to a monitor | direction or `mon:` and a monitor |
2022-11-30 10:25:33 +01:00
| centerwindow | center the active window *note: floating only* | none |
2022-09-24 15:32:40 +02:00
| resizeactive | resizes the active window | resizeparams |
| moveactive | moves the active window | resizeparams |
| resizewindowpixel | resizes a selected window | `resizeparams,window` , e.g. `100 100,^(kitty)$` |
| movewindowpixel | moves a selected window | `resizeparams,window` |
| cyclenext | focuses the next window on a workspace | none (for next) or `prev` (for previous) |
| swapnext | swaps the focused window with the next window on a workspace | none (for next) or `prev` (for previous) |
| focuswindow | focuses the first window matching | window |
| focusmonitor | focuses a monitor | monitor |
2022-12-17 23:37:55 +01:00
| splitratio | changes the split ratio | floatvalue |
2022-11-23 10:57:24 +01:00
| toggleopaque | toggles the current window to always be opaque. Will override the `opaque` window rules. | none |
2022-09-24 15:32:40 +02:00
| movecursortocorner | moves the cursor to the corner of the active window | direction, 0 - 3, bottom left - 0, bottom right - 1, top right - 2, top left - 3 |
| workspaceopt | toggles a workspace option for the active workspace. | workspaceopt |
2023-01-09 14:11:20 +01:00
| renameworkspace | rename a workspace | `id name` , e.g. `2 work` |
2022-09-24 15:32:40 +02:00
| exit | exits the compositor with no questions asked. | none |
| forcerendererreload | forces the renderer to reload all resources and outputs | none |
| movecurrentworkspacetomonitor | Moves the active workspace to a monitor | monitor |
| moveworkspacetomonitor | Moves a workspace to a monitor | workspace and a monitor separated by a space |
| swapactiveworkspaces | Swaps the active workspaces between two monitors | two monitors separated by a space |
2022-10-14 15:23:04 +02:00
| bringactivetotop | Brings the current window to the top of the stack | none |
2022-11-27 23:45:15 +01:00
| togglespecialworkspace | toggles a special workspace on/off | none (for the first) or name for named (name has to be a special workspace's name) |
2023-01-21 11:19:17 +01:00
| focusurgentorlast | Focuses the urgent window or the last window | none |
2023-02-22 16:06:05 +01:00
| togglegroup | toggles the current active window into a group | none |
| changegroupactive | switches to the next window in a group. | b - back, f - forward. |
2023-02-22 09:54:53 +01:00
| focuscurrentorlast | Switch focus from current to previously focused window | none |
2023-02-21 13:14:59 +01:00
| lockgroups | Locks the groups (groups will not accept new windows) | `lock` for locking, `unlock` for unlocking |
2022-09-24 15:32:40 +02:00
{{< hint type = warning > }}
it is NOT recommended to set DPMS with a keybind directly, as it
might cause undefined behavior. Instead, consider something like
2022-10-23 16:35:39 +02:00
```ini
2022-09-24 15:32:40 +02:00
bind = MOD,KEY,exec,sleep 1 & & hyprctl dispatch dpms off
```
2022-10-23 16:35:39 +02:00
2022-09-24 15:32:40 +02:00
{{< / hint > }}
2022-09-24 20:04:35 +02:00
2023-02-22 16:06:05 +01:00
## Grouped (tabbed) windows
Hyprland allows you to make a group from the current active window with the `togglegroup` bind dispatcher.
A group is like i3wm’ s “tabbed” container. It takes the space of one window, and you can change the window to the next one in the tabbed “group” with the `changegroupactive` bind dispatcher.
The new group’ s border colors are configurable with the appropriate `col.` settings in the general config section.
You can lock a group with the `lockgroups` bind dispatcher in order to stop new windows from entering groups.
2022-09-24 20:04:35 +02:00
# Workspaces
2022-11-23 15:12:23 +01:00
You have eight choices:
2022-09-24 20:04:35 +02:00
- ID: e.g. `1` , `2` , or `3`
- Relative ID: e.g. `+1` , `-3` or `+100`
- Relative workspace on monitor: e.g. `m+1` , `m-1` or `m+3`
- Relative open workspace: e.g. `e+1` or `e-10`
- Name: e.g. `name:Web` , `name:Anime` or `name:Better anime`
- Previous workspace: `previous`
2022-11-23 15:12:23 +01:00
- First available empty workspace: `empty`
2022-11-27 23:45:15 +01:00
- Special Workspace: `special` or `special:name` for named special workspaces.
2022-09-24 20:04:35 +02:00
{{< hint type = warning > }}
`special` is supported ONLY on
`movetoworkspace` . Any other dispatcher will result in undocumented behavior.
{{< / hint > }}
2022-11-10 13:17:08 +01:00
{{< hint type = important > }}
Numerical workspaces (e.g. `1` , `2` , `127634934729` ) are allowed
**ONLY** between 1 and 9223372036854775806 (inclusive)
Neither `0` nor negative numbers are allowed.
{{< / hint > }}
2022-10-23 16:35:39 +02:00
# Special Workspace
2022-09-24 20:04:35 +02:00
2022-11-27 23:45:15 +01:00
A special workspace is what is called a "scratchpad" in some other places. A
2022-09-24 20:04:35 +02:00
workspace that you can toggle on/off on any monitor.
{{< hint > }}
2022-11-27 23:45:15 +01:00
You cannot have floating windows in a Special workspace. Making a window floating
2022-10-23 16:35:39 +02:00
will send it to the currently active _real_ workspace.
2022-11-27 23:45:15 +01:00
You can define multiple named special workspaces, but the amount of those is limited to 97 at a time.
2022-09-24 20:04:35 +02:00
{{< / hint > }}
2022-10-23 16:35:39 +02:00
# Workspace options
```txt
2022-09-24 20:04:35 +02:00
allfloat -> makes all new windows floating (also floats/unfloats windows on toggle)
allpseudo -> makes all new windows pseudo (also pseudos/unpseudos on toggle)
```
2022-11-10 14:41:48 +01:00
# 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. If your process e.g. forks and then
the fork opens a window, this will not work.
The syntax is:
```
bind = mod, key, exec, [rules...] command
```
For example:
```
bind = SUPER, E, exec, [workspace 2 silent;float;noanim] kitty
```