Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jasper-clarke/hypr-ws-switcher
A super simple workspace switching script for those with multiple monitors.
https://github.com/jasper-clarke/hypr-ws-switcher
hyprland hyprland-plugin script
Last synced: about 1 month ago
JSON representation
A super simple workspace switching script for those with multiple monitors.
- Host: GitHub
- URL: https://github.com/jasper-clarke/hypr-ws-switcher
- Owner: jasper-clarke
- Created: 2024-02-13T22:17:27.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-04-29T22:11:26.000Z (8 months ago)
- Last Synced: 2024-10-19T12:11:19.604Z (about 2 months ago)
- Topics: hyprland, hyprland-plugin, script
- Language: Shell
- Homepage:
- Size: 13.7 KB
- Stars: 9
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-hyprland - hypr-ws-switcher
README
# hypr-ws-switcher
A super simple workspace switching script for those with multiple monitors.## Usage
Place the script anywhere and change the `first` and `second` variables (or `third` aswell if you have the extra screens) to the ID's of your monitors in `hyprctl monitors`.
Then change `ws_per_monitor` to the amount of workspaces you have set for each monitor.As an example if you have 3 monitors per workspace your hyprland config your look something like this:
```conf
workspace = 1, monitor:DP-2, default:true
workspace = 2, monitor:DP-2
workspace = 3, monitor:DP-2workspace = 4, monitor:DP-1
workspace = 5, monitor:DP-1
workspace = 6, monitor:DP-1
```
Now just set your binds up like below. *In the example below the script was added the the path as `ws-switch`**Use the second argument `switch` for changing to the workspace and use `move` to move the active window to that workspace.*
```conf
bind = SUPER, 1, exec, ws-switch 1 switch
bind = SUPER, 2, exec, ws-switch 2 switch
bind = SUPER, 3, exec, ws-switch 3 switchbind = SUPER SHIFT, 1, exec, ws-switch 1 move
bind = SUPER SHIFT, 2, exec, ws-switch 2 move
bind = SUPER SHIFT, 3, exec, ws-switch 3 move
```If you have more than 3 workspaces per monitor than just simply increase the amount of, binds, workspaces and the `ws_per_monitor` variable. And simply do the inverse if you have less workspaces per monitor assigned.
## More About
The script works by detecting the monitor assigned to your active workspace and then depending on what monitor it is, it multiply the workspace number to match the assigned one and then dispatch the monitor.