update: slightly WIP update with cool features
This commit is contained in:
Executable
+19
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
# Get current monitor
|
||||
current_monitor=$(hyprctl monitors -j | jq -r '.[] | select(.focused == true) | .name')
|
||||
|
||||
# Fallback
|
||||
if [ -z "$current_monitor" ]; then
|
||||
current_monitor=$(hyprctl monitors -j | jq -r '.[0].name')
|
||||
fi
|
||||
|
||||
# Set workspaces
|
||||
count=1
|
||||
while IFS= read -r mon; do
|
||||
ws=$((count * 100))
|
||||
hyprctl --batch "dispatch focusmonitor $mon; dispatch workspace $ws"
|
||||
count=$((count + 1))
|
||||
done < <(hyprctl monitors -j | jq -r '.[].name')
|
||||
|
||||
# Return focus
|
||||
hyprctl dispatch focusmonitor "$current_monitor"
|
||||
Reference in New Issue
Block a user