You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I created a solution to have a Keybind which takes you to the closest empty workspace. If there is no empty one available it opens a new one. I don't know if there is a better or native solution from hyprland but this is the best I came up with and it works and exactly fits my needs.
This is the Script (~/.config/hypr/nextempty.sh):
#!/usr/bin/env bash
# ~/.config/hypr/nextempty.sh
# Read in all Workspaces as JSON
workspaces=$(hyprctl workspaces -j)
# Collect IDs of all existing Workspaces
ids=$(echo "$workspaces" | jq -r '.[].id')
# Search for lowest positive ID, that does not exist
target=1
while echo "$ids" | grep -qx "$target"; do
target=$((target + 1))
done
# Switch workspace
hyprctl dispatch workspace "$target"
This ist the keybind (for ~/.config/hypr/bindings.conf)
chmod +x ~/.config/hypr/nextempty.sh
If you want to use SUPER, D too you need to disable the Docker Binding
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I created a solution to have a Keybind which takes you to the closest empty workspace. If there is no empty one available it opens a new one. I don't know if there is a better or native solution from hyprland but this is the best I came up with and it works and exactly fits my needs.
This is the Script (~/.config/hypr/nextempty.sh):
This ist the keybind (for ~/.config/hypr/bindings.conf)
chmod +x ~/.config/hypr/nextempty.sh
If you want to use SUPER, D too you need to disable the Docker Binding
Disclaimer: ChatGPT helped me with this solution
Beta Was this translation helpful? Give feedback.
All reactions