glzr-io / glazewm

GlazeWM is a tiling window manager for Windows inspired by i3 and Polybar.
GNU General Public License v3.0
4.02k stars 123 forks source link

Set of Workspaces Per Monitor #582

Open GhoulBoii opened 3 months ago

GhoulBoii commented 3 months ago

I would like an option to use the workspaces feature like it is used in suckless dwm.

In dwm, you can assign a set of workspaces per monitor and you can switch your focus between the monitors to access those workspaces. For example, monitor 1 can have 1-5 workspaces which you can access with super+{1,5} and then you can switch to monitor 2 with super+. to the second monitor to access another set of 1-5 workspaces.

I have searched the configs and couldn't find anything to get this behaviour.

FrostyNick commented 3 months ago

I found info about it here: https://github.com/glzr-io/glazewm#workspaces-configuration

For example to force workspaces 6-10 to second monitor:

workspaces:
  - name: "1"
  - name: "2"
  - name: "3"
  - name: "4"
  - name: "5"
  - name: "6"
    bind_to_monitor: 2
  - name: "7"
    bind_to_monitor: 2
  - name: "8"
    bind_to_monitor: 2
  - name: "9"
    bind_to_monitor: 2
  - name: "10"
    bind_to_monitor: 2

I don't have a second monitor, but I've tested display_names and would assume that it works the same in this case too.

GhoulBoii commented 3 months ago

Thanks for the response. I did go through that config but that didn't suit what I wanted. I want to have 1-5 workspaces be activated by 1-5 keys on both of my monitors. For example, on monitor 1, I want 1-5 to activate 1-5 workspaces and if i switch to the second monitor, I want the same to happen. Switching between the monitors should happen with another key.

FrostyNick commented 2 months ago

This might be what you're looking for (from auto-generated config file):

keybindings:
  # ...
  # Move focused workspace to a monitor in a given direction.
  - command: "move workspace left"
    binding: "Alt+A"
  - command: "move workspace right"
    binding: "Alt+F"
  - command: "move workspace up"
    binding: "Alt+D"
  - command: "move workspace down"
    binding: "Alt+S"

Not to be mistaken with move to workspace which switches workspaces instead of monitor if I'm not mistaken.

GhoulBoii commented 2 months ago

This might be what you're looking for (from auto-generated config file):

keybindings:
  # ...
  # Move focused workspace to a monitor in a given direction.
  - command: "move workspace left"
    binding: "Alt+A"
  - command: "move workspace right"
    binding: "Alt+F"
  - command: "move workspace up"
    binding: "Alt+D"
  - command: "move workspace down"
    binding: "Alt+S"

Not to be mistaken with move to workspace which switches workspaces instead of monitor if I'm not mistaken.

This seems like a good solution but the problem is that if I have multiple windows then the whole workspace containing the windows get transferred over. This behaviour is i3wm like. I would rather have more importance given to the windows than the workspaces when working in a multi monitor setup.

mischavandenburg commented 1 month ago

This might be what you're looking for (from auto-generated config file):

keybindings:
  # ...
  # Move focused workspace to a monitor in a given direction.
  - command: "move workspace left"
    binding: "Alt+A"
  - command: "move workspace right"
    binding: "Alt+F"
  - command: "move workspace up"
    binding: "Alt+D"
  - command: "move workspace down"
    binding: "Alt+S"

Not to be mistaken with move to workspace which switches workspaces instead of monitor if I'm not mistaken.

Thank you this is exactly what I needed