Hyprland
Hyprland copied to clipboard
Feature to remove/destroy persistent workspaces
Description
My workflow involves creating a number of persistent workspaces for each monitor. Whenever I disconnect a monitor, I would like to remove those workspaces again. This appears to be impossible at the moment.
The way to do this I have in mind is just a simple dispatcher to destroy a workspace. Alternatively, it might also be a possibility to change the "persistent" property of a workspace after the initial setup. I tried this too, but it did not seem to do anything for now.
hi, I just added the feature to refresh workspace persistance after renaming a workspace. so if your workspace was made persistent by a workspace rule with name selector, and you rename it, it well become non persistent.
Hey, that's nice to hear! I could not get it working though. Do you have an example of how to create and remove a persistent workspace? I tried this:
hyprctl keyword workspace 3,monitor:DP-2,persistent:true
# and then to remove:
hyprctl keyword workspace 3,monitor:DP-2,persistent:false
Unfortunately workspace rules cannot be updated/deleted yet; that is also something I'd like to try and implement. I was referring to the renaming of the workspace itself, like this:
hyprctl keyword "workspace=n[s:a], persistent:true"
hyprctl dispatch workspace "name:abc" # suppose the workspace id is -1337
hyprctl dispatch renameworkspace -1337 def # rename it to "def" -> not matching the rule anymore
You see, the rule refer to the workspace by its name (the start of it actually), so when it's not matching anymore the workspace becomes non persistent, and if it's empty it will be removed.
Hello there!
This issue has been closed, as we are moving from issues to discussions. More about this can be found here and in #9854.
Firstly, please make sure this issue is still relevant in latest Hyprland. If so, we ask you to open a discussion (please read the discussion guidelines first, in the pinned post)
Thank you for your understanding!