diff --git a/pages/Configuring/Dispatchers.md b/pages/Configuring/Dispatchers.md index 272229b..4faf46e 100644 --- a/pages/Configuring/Dispatchers.md +++ b/pages/Configuring/Dispatchers.md @@ -81,6 +81,7 @@ layout pages (See the sidebar). | global | Executes a Global Shortcut using the GlobalShortcuts portal. See [here](../Binds/#global-keybinds) | name | | submap | Change the current mapping group. See [Submaps](../Binds/#submaps) | `reset` or name | | event | Emits a custom event to socket2 in the form of `custom>>yourdata` | the data to send | +| setprop | Sets a window property | `window property value` | {{< callout type=warning >}} @@ -184,10 +185,7 @@ bind = SUPER, C, movetoworkspace, special 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)). +not work. The syntax is: @@ -200,3 +198,33 @@ For example: ```ini bind = SUPER, E, exec, [workspace 2 silent; float; move 0 0] kitty ``` + +### setprop + +Prop List: + +| prop | comment | +| --- | --- | +| alpha | float 0.0 - 1.0 | +| alphaoverride | 0/1, makes the next setting be override instead of multiply | +| alphainactive | float 0.0 - 1.0 | +| alphainactiveoverride | 0/1, makes the next setting be override instead of multiply | +| alphafullscreen | float 0.0 - 1.0 | +| alphafullscreenoverride | 0/1, makes the next setting be override instead of multiply | +| animationstyle | string, cannot be locked | +| activebordercolor | gradient, -1 means not set | +| inactivebordercolor | gradient, -1 means not set | +| maxsize | vec2 (`x y`) | +| minsize | vec2 (`x y`) | + +Additional properties can be found in the [Window Rules](../Window-Rules#dynamic-rules) section. + +For example: + +```sh +address:0x13371337 noanim 1 +address:0x13371337 nomaxsize 0 +address:0x13371337 opaque toggle +address:0x13371337 immediate unset +``` + diff --git a/pages/Configuring/Using-hyprctl.md b/pages/Configuring/Using-hyprctl.md index 43a5586..a17b004 100644 --- a/pages/Configuring/Using-hyprctl.md +++ b/pages/Configuring/Using-hyprctl.md @@ -194,76 +194,6 @@ To disable: ```sh hyprctl seterror disable ``` - -### setprop - -Sets a window prop. Can be locked by adding `lock` at the end. If `lock` is not -added, will be unlocked. Locking means a dynamic windowrule _cannot_ override -this setting. - -Usage: - -```sh -hyprctl setprop [lock] -``` - -Regex supports different modes. The supported modes are: - -```ini -class - class -title - title -initialclass - initialClass -initialtitle - initialTitle -active - active window -address - address prefixed with 0x -pid - process ID -floating - first floating window on the current workspace -tiled - first tiled window on the current workspace -``` - -If no mode is specified `class` is used by default. - -{{< callout type=info >}} - -To get more information about a window, you can use `hyprctl clients`. - -{{< /callout >}} - -{{< callout type=warning >}} - -Please beware that `hyprctl clients` will display the fields as **initialClass** -and **initialTitle** while the regex mode uses `initialclass` and -`initialtitle`. - -{{< /callout >}} - -Prop List: - -| prop | comment | -| --- | --- | -| alpha | float 0.0 - 1.0 | -| alphaoverride | 0/1, makes the next setting be override instead of multiply | -| alphainactive | float 0.0 - 1.0 | -| alphainactiveoverride | 0/1, makes the next setting be override instead of multiply | -| alphafullscreen | float 0.0 - 1.0 | -| alphafullscreenoverride | 0/1, makes the next setting be override instead of multiply | -| animationstyle | string, cannot be locked | -| activebordercolor | gradient, -1 means not set | -| inactivebordercolor | gradient, -1 means not set | -| maxsize | vec2 (`x y`) | -| minsize | vec2 (`x y`) | - -Additional properties can be found in the [Window Rules](../Window-Rules#dynamic-rules) section. - -For example: - -```sh -hyprctl setprop address:0x13371337 noanim 1 -hyprctl setprop address:0x13371337 nomaxsize 0 -hyprctl setprop address:0x13371337 opaque toggle -hyprctl setprop address:0x13371337 immediate unset -``` - ### notify Sends a notification using the built-in Hyprland notification system. diff --git a/pages/Configuring/Window-Rules.md b/pages/Configuring/Window-Rules.md index 285be95..27a1471 100644 --- a/pages/Configuring/Window-Rules.md +++ b/pages/Configuring/Window-Rules.md @@ -133,7 +133,7 @@ Dynamic rules are re-evaluated every time a property changes. | maxsize \[x\] \[y\] | sets the maximum size (x,y -> int) | | minsize \[x\] \[y\] | sets the minimum size (x,y -> int) | -The following rules can also be set with [`hyprctl setprop`](../Using-hyprctl#setprop): +The following rules can also be set with [`setprop`](../Dispatchers#setprop): | Rule | Description | | ---- | ----------- | @@ -164,10 +164,10 @@ The following rules can also be set with [`hyprctl setprop`](../Using-hyprctl#se 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, +When using `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 +When using `setprop`, \[int\] can also be `unset` to unset previous values. ### `group` window rule options