refactor
This commit is contained in:
parent
8bc0b6a51b
commit
237b3aed3b
2 changed files with 129 additions and 7 deletions
|
@ -5,7 +5,6 @@ repo: https://github.com/hyprwm/Hyprland
|
|||
arch-wiki: https://wiki.archlinux.org/title/Hyprland
|
||||
---
|
||||
# hyprland
|
||||
#wip
|
||||
A dynamic tiling Wayland compositor based on wlroots that doesn't sacrifice on its looks.
|
||||
|
||||
![Screenshot][Screenshot]
|
||||
|
@ -508,8 +507,8 @@ windowrule=RULE,WINDOW
|
|||
|
||||
- `RULE` is a [rule](https://wiki.hyprland.org/Configuring/Window-Rules/#rules) (and a param if applicable)
|
||||
- `WINDOW` is a [RegEx](https://en.wikipedia.org/wiki/Regular_expression), either:
|
||||
- plain RegEx (for matching a window class);
|
||||
- `title:` followed by a regex (for matching a window’s title)
|
||||
- plain [RegEx](../../tools/Regex.md) (for matching a window class);
|
||||
- `title:` followed by a [regex](../../tools/Regex.md) (for matching a window’s title)
|
||||
|
||||
#### Rules
|
||||
| Rule | Description | Dynamic |
|
||||
|
@ -605,8 +604,96 @@ To check if `hyprctl` is installed, simply execute it by issuing `hyprctl` i
|
|||
|
||||
If it’s not, go to the repo root and `/hyprctl`. Issue a `make all` and then `sudo cp ./hyprctl /usr/bin`.
|
||||
|
||||
#### Commands
|
||||
#todo
|
||||
#### Dispatch
|
||||
issue a `dispatch` to call a keybind dispatcher with an arg.
|
||||
|
||||
An arg 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 parsing of options by _hyprctl_.
|
||||
|
||||
Examples:
|
||||
```sh
|
||||
hyprctl dispatch exec kitty
|
||||
hyprctl dispatch -- exec kitty --single-instance
|
||||
hyprctl dispatch pseudo x
|
||||
```
|
||||
|
||||
Returns: `ok` on success, an error message on fail.
|
||||
|
||||
#### Keyword
|
||||
issue a `keyword` to call a config keyword dynamically.
|
||||
|
||||
Examples:
|
||||
```sh
|
||||
hyprctl keyword bind SUPER,O,pseudo
|
||||
hyprctl keyword general:border_size 10
|
||||
hyprctl keyword monitor DP-3,1920x1080@144,0x0,1
|
||||
```
|
||||
|
||||
Returns: `ok` on success, an error message on fail.
|
||||
|
||||
#### Reload
|
||||
issue a `reload` to force reload the config.
|
||||
|
||||
#### output
|
||||
Allows you to add and remove fake outputs to your preferred backend.
|
||||
|
||||
params: `create` or `remove` and `backend` or `name` respectively.
|
||||
|
||||
For _create_:
|
||||
pass a backend name: `wayland`, `x11`, `headless` or `auto`. On a _real_ hyprland session, if you’re looking for a VNC / RDP type thing, it’s 99% going to be `headless`.
|
||||
|
||||
For _remove_:
|
||||
pass the output’s name, as found in `hyprctl monitors`. Please be aware you are _not_ allowed to remove real displays with this command.
|
||||
|
||||
e.g.:
|
||||
```shell
|
||||
# will create a 1920x1080 headless display, for example to use with RDP.
|
||||
hyprctl output create headless
|
||||
|
||||
# will remove the above display, provided its name was HEADLESS-1
|
||||
hyprctl output remove HEADLESS-1
|
||||
```
|
||||
|
||||
#### Info
|
||||
These commands let you gather information about your Hyprland session. Hyprctl can output [JSON](../../files/JSON.md) with the `-j` flag.
|
||||
|
||||
| Command | Description |
|
||||
| ------------------- | -------------------------------------------------------------------------------------------- |
|
||||
| version | prints the hyprland version, meaning flags, commit and branch of build |
|
||||
| monitors | lists active outputs with their properties, `monitors all` lists active and inactive outputs |
|
||||
| workspaces | lists all workspaces with their properties |
|
||||
| activeworkspace | gets the active workspace and its properties |
|
||||
| workspacerules | gets the list of defined workspace rules |
|
||||
| clients | lists all windows with their properties |
|
||||
| devices | lists all connected keyboards and mice |
|
||||
| binds | lists all registered binds |
|
||||
| activewindow | gets the active window name and its properties |
|
||||
| layers | lists all the layers |
|
||||
| splash | prints the current random splash |
|
||||
| getoption \[option] | gets the config option status (values) |
|
||||
| cursorpos | gets the current cursor pos in global layout coordinates |
|
||||
| animations | gets the current config info about animations and beziers |
|
||||
| instances | lists all running instances of hyprland with their info |
|
||||
| layouts | lists all layouts available |
|
||||
|
||||
For the getoption command, the option name should be written as `section:option`, e.g.:
|
||||
```sh
|
||||
hyprctl getoption general:border_size
|
||||
|
||||
# For nested sections:
|
||||
hyprctl getoption input:touchpad:disable_while_typing
|
||||
```
|
||||
|
||||
#### Batch
|
||||
You can also use `--batch` to specify a batch of commands to execute
|
||||
|
||||
e.g.
|
||||
```sh
|
||||
hyprctl --batch "keyword general:border_size 2 ; keyword general:gaps_out 20"
|
||||
```
|
||||
|
||||
`;` separates the commands
|
||||
|
||||
### Multi GPU
|
||||
If your host machine uses multiple GPUs, you may want to primarily use one GPU for rendering all the elements for Hyprland including windows, animations, and another for hardware acceleration for certain applications, etc.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue