multi monitor switching ... #265
coacharnold1
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
|
Wow, this is a fantastic solution for the 'unified workspace' feel in Hyprland! Using offsets (1, 11, 21) for different monitors is a really clever way to work around the one-monitor-per-workspace limitation. I love how you've even included the jq dependency and the focus restoration logic—that really makes the transition feel seamless. Have you noticed any significant latency with the 0.05s sleeps, or does it feel snappy enough for daily use? Thanks for sharing this with the community! |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I Used the AI to do this a little better fro my taste .... please use it if you like it .... working great for me ...
Unified Workspace Switching for Multi-Monitor Hyprland
Overview
This solution allows all monitors to switch workspaces together as a unified desktop, similar to GNOME/KDE behavior, while working within Hyprland's constraint that a workspace can only exist on one monitor at a time.
How It Works
Instead of trying to show the same workspace on multiple monitors (which Hyprland doesn't support), we use workspace ranges per monitor and switch them all simultaneously:
When you press
Super + 2, the script switches:This creates 4 unified "virtual desktops" across all monitors.
Features
Requirements
jq(for JSON parsing)Install jq if needed:
Installation
1. Create the switching script
Create
~/.config/hypr/scripts/SwitchAllMonitors.sh:Important: Replace
MONITOR1,MONITOR2,MONITOR3with your actual monitor names.Find your monitor names:
Make the script executable:
chmod +x ~/.config/hypr/scripts/SwitchAllMonitors.sh2. Configure workspace assignments
Add to
~/.config/hypr/workspaces.conf:Replace monitor names with your actual monitors from the previous step.
3. Add keybindings
Add to
~/.config/hypr/UserConfigs/UserKeybinds.conf:4. Reload Hyprland
Usage
Customization
Change number of workspaces
To use 6 workspaces instead of 4:
In
SwitchAllMonitors.sh, change the validation:Add workspaces 5-6 to
workspaces.conf:Add keybindings for Super+5 and Super+6
Add more monitors
For a 4th monitor, use workspace range 31-34 (add 30):
In the script, add:
ws4=$((workspace + 30))Add the switching commands:
Add workspace assignments to
workspaces.confFor 2 monitors only
Simply remove all references to the 3rd monitor from the script and configs, and use only workspace ranges 1-4 and 11-14.
Troubleshooting
Monitors don't all switch
jqis installed0.05to0.1)Old workspaces causing conflicts
If you have pre-existing workspaces on wrong monitors:
Script not found
Ensure the script path in keybindings matches where you created it:
ls -la ~/.config/hypr/scripts/SwitchAllMonitors.shCredits
Created for multi-monitor unified workspace switching in Hyprland.
Compatible with JaKooLit's Hyprland dotfiles.
License
Feel free to use, modify, and share!
Beta Was this translation helpful? Give feedback.
All reactions