Skip to content

[BUG] Invalid rule found when toggling scratchpads #191

@DaitiDay

Description

@DaitiDay

Pyprland version
2.4.3

Describe the bug
I have 3 scratchpads setup as follow in pyprland.conf:

[pyprland]
plugins = ["scratchpads"]

[scratchpads.music]
command = "pidof spotify || spotify"
animation = "fromTop"
class = "Spotify"
size = "80% 80%"
position = "10% 85px"
multi = false
unfocus = "hide"
pinned = false

[scratchpads.yazi]
command = "kitty --class files -e yazi"
animation = "fromTop"
class = "files"
size = "80% 80%"
position = "10% 85px"
multi = false
unfocus = "hide"
pinned = false

[scratchpads.term]
command = "kitty --class terminal"
animation = "fromTop"
class = "terminal"
size = "80% 80%"
position = "10% 85px"
multi = false
unfocus = "hide"
pinned = false

In hyprland.conf I toggle them as follow:

bind = $mainMod, space, exec, pypr toggle term
windowrule = bordercolor $red, class:terminal
windowrule = float, class:terminal
windowrule = dimaround 1, class:terminal

bind = $mainMod, s, exec, pypr toggle music
windowrule = bordercolor $green, float, dimaround 1, class:Spotify

bind = $mainMod, e, exec, pypr toggle yazi
windowrule = bordercolor $yellow, float, dimaround 1, class:files

Right now 1 out of 3 scratchpads is working as intended (floating, dimming everything else, with the given window border). The one working changes each reboot (can't say if there is a logic behind it), the other 2 are tiled (but still toggle-able)

If I toggle the working scartchpad on, then launch hyprctl reload the rule are applied as specified in the hyprland.conf.

I set exec-once = /usr/local/bin/pypr --debug /tmp/pypr.log to check for errors as suggested in the decumentation. Checking the log file every time I toggle a workspace there is an error like the following:

[ERROR] scratchpads :: FAILED b'Invalid rule found: unset,^(terminal)$, Invalid value: ^(terminal)$' :: ipc.py:166

To Reproduce
Steps to reproduce the behavior:

  1. Toggle a scratchpad
  2. Get the error

Expected behavior
Toggling a scratchpad applies the rules and toggles the scratchpad.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions