baskerville / bspwm

A tiling window manager based on binary space partitioning
BSD 2-Clause "Simplified" License
7.7k stars 416 forks source link

[Feature request] Workspace possibilities #1176

Open olafsl opened 4 years ago

olafsl commented 4 years ago

Hey,

I have a couple of features that i'm "missing" right now, concerning the manipulation of workspaces. I don't know if this is my curious ways or if others would be interested in this as well.

Instead of a semi-static list of workspaces, I see my workspaces as a dynamic list. When I start my computer, I only need one workspace (for each monitor) to start with. When I find that I need more, I would like to create them on the fly, and when I'm done with one, remove them just as easily. This is allready possible and pretty straightforward. However, what I would also like to be able to do, is group workspaces together, switch either between groups or inside a group, and manipulate groups as a whole.

For example; I have 4 workspaces, WS 1 and 2 are concerning something i'm working on, WS 3 is some social media, WS 4 is mail. In this case, I would group 1 and 2 together, and group 3 and 4 together. I've found that switching inside the group, between different workspaces, is a fundamentally different action than switching towards my "distractions"-group, and they require different keybinds. When I want to google something, I open a new workspace, which will be in the first group, because it's part of the same task. When I'm done with it, I close the workspace again.

Furthermore: I would like to be able to lock certain groups away, for a while. For example, when I start to work on something else, I dont necessarily want to close everything down. I just want to place it "on hold" untill im ready to continue working on it, and not be bothered in the mean time.

I have found it's very hard to set this up with the "static" list of workspaces available now, I've found it unavoidable to end up hard-coding certain functions to certain workspaces. This is not desirable however, since the amound of workspaces I use for a certain function constantly varies. I've now written a python-program on top which makes it work more or less the way I want to, but thats more of a temporary hack than a permanent solution.

I dont know if my explanation makes enough sense, and I have no clue at all whether anybody else would be interested in this as well, or if it's just me. I have been tempted to start looking in the code-base myself, but I'm not experienced in C, and just diving in seems like a daunting task.

What do you all think? Is this feasible, do you think more people would use this, and how difficult would it be to implement? I'm not quite sure about some design features concerning how this would work with multiple monitors either.

Thanks!

jallbrit commented 4 years ago

what I would also like to be able to do, is group workspaces together, switch either between groups or inside a group, and manipulate groups as a whole.

I definitely understand what you're getting at. Since bspwm doesn't support tabs or stacks of windows, you only get 1 layer of windows per desktop, so projects often span 2 or 3 or more of my desktops. This is manageable with multiple monitors, but on a single laptop screen, it's tough to work on more than 3 projects at a time without using an absurd amount of desktops (workspaces). "Grouping" desktops into projects you're working on makes a lot of sense to me.

Perhaps an easy way to accomplish this would be the ability to create/destroy virtual monitors on the fly? Currently, you can add/remove as many desktops as you want to each monitor, but it doesn't seem possible to create virtual monitors. Perhaps you could use virtual monitors to "group" desktops.

I have found it's very hard to set this up with the "static" list of workspaces available now, I've found it unavoidable to end up hard-coding certain functions to certain workspaces. This is not desirable however, since the amound of workspaces I use for a certain function constantly varies. I've now written a python-program on top which makes it work more or less the way I want to, but thats more of a temporary hack than a permanent solution.

It's nice to see you've found a method that works for you. I will also suggest taking a look at a bash script I wrote called desknamer.sh that will automatically look at the category of the application in your desktop, and give the desktop a name that corresponds with that category. For example, a desktop with Firefox will use the Firefox logo for it's name. This makes navigating workspaces much easier, as I can look at my bar and see where my programs are instantly. I literally cannot imagine using bspwm without this script. I have way too many desktops and applications open to know where anything is, and "statically" naming desktops is not efficient because my windows are constantly moving.

olafsl commented 4 years ago

I think that virtual monitors can indeed be a solution. It will probably still take a bunch of scripts to make it work exactly as I want, but that's doable, and I wouldn't have the need to build another full application on top.

desknamer.sh looks nice! I think you had more or less the same problem as me, just looked at it in a whole different light. I do not think it will be my go-to solution, however. Too often I either stack many applications in the same workspace (I like having my iirsi, whatsapp, telegram and discord, or somethings like this, in the same workspace) and have too many different workspaces with just terminals or just browser windows. Currently the names of my workspaces are just automatically generated from the greek letters, but I don't really use their names. I "scroll" sideways through them to find what I need. This might sounds less convenient (and it is when you put too many workspaces in a single group. :p) but if every group has just a handful of workspaces, this works great. This method clearly is not perfect, but it's the best I could come up with.

jallbrit commented 4 years ago

Somehow I missed this, but virtual monitors already exist:

bspc wm --add-monitor <name> WxH+X+Y

Perhaps you could write a script to utilize these virtual monitors to create "bundles" of workspaces, and use hotkeys to switch out your current monitor with whatever virtual monitor contains the tasks you want. Keep us posted!

smekkley commented 3 years ago

MacOS has a feature that creates a temporary workspace when you maximize the window. It's really nice and you can also add one more window to the workspace in a split manner.

smekkley commented 3 years ago

Indeed, everything was possible with bspc scripting. I have now dynamic workspace like Mac/Gnome but better.
This project is quite ingenious, so little code on the WM side, yet it provides flexibility through bspc as if every use case is covered.

Hugo-loio commented 1 year ago

I would also be interested in a feature like this. Did anyone manage to find a solution with virtual monitors?