nwg-piotr / nwg-displays

Output management utility for sway and Hyprland.
MIT License
334 stars 22 forks source link

A field in the workspaces window to add extra rules #59

Closed saipavanc closed 1 month ago

saipavanc commented 1 month ago

Thank you so much for your work on this application. Just the one I was looking for. Though for the workspaces section, I was wondering if it were possible to add an extra field, to enable more flags. image

For example, in my case I like to use persistent workspaces on my default monitor. An option to add that would be great!

nwg-piotr commented 1 month ago

Couldn't you just add your extra rules to the main config file?

saipavanc commented 1 month ago

Oh are you saying, if I will do something like:

workspace = 1, persistent:true
workspace = 2, persistent:true
workspace = 3, persistent:true

source = ~/.config/hypr/workspaces.conf
source = ~/.config/hypr/monitors.conf

The the rules from workspaces.conf will add to the existing rules? I thought the rules would get overwritten

nwg-piotr commented 1 month ago

We just include some lines from the workspaces.conf file to the hyprland.conf file. You're free to add whatever afterwards.

saipavanc commented 3 weeks ago

I just tried using nwg-shell. I installed everything, and setup persistent workspaces. I setup binds in hyprland config such that I can switch to those workspaces using split-workspaces. But when I use nwg-shell, I am unable to switch to the empty persistent workspaces even though they show up in the hyprland workspace pager. The same command works just fine with my old config. I checked the same by executing the command from the terminal, that works too. But through the keybind it does not, and only happens with nwg-shell. Any idea why that might happen?

nwg-piotr commented 3 weeks ago

I have no idea what persistent workspaces are.

saipavanc commented 3 weeks ago

Here is a link which explains persistent workspaces: https://github.com/hyprwm/Hyprland/issues/658. The workspaces have an option persistent:true, which lets the workspace live even when it is empty. Hope this makes it clear.

saipavanc commented 3 weeks ago

I think I found the issue, it seems that I am able to change the workspace, but the workspace pager is not getting updated when the workspace is empty and is not next to an occupied workspace. I can try to change the hyprland_workspaces.py and submit a PR, what do you think? It should not affect the functionality in anyway, and makes sure that when persistent workspaces are used, the pager is updated correctly.

nwg-piotr commented 3 weeks ago

Sure, go ahead. Remember to describe your changes.