changed workspaces.sh to use window name instead of id
This commit is contained in:
parent
02426e41e6
commit
1a6e0f68f7
1 changed files with 4 additions and 4 deletions
|
@ -20,12 +20,12 @@ if ! [[ $new_workspace =~ ^-?[0-9]+$ ]]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
while read -r i a f;do
|
||||
workspace[$a]=$i
|
||||
while read -r n a f;do
|
||||
workspace[$a]=$n
|
||||
if [[ $f == true ]]; then
|
||||
active=$i
|
||||
active=$n
|
||||
fi
|
||||
done < <(hyprctl monitors -j | jq -r '.[]|"\(.id) \(.activeWorkspace.id) \(.focused)"')
|
||||
done < <(hyprctl monitors -j | jq -r '.[]|"\(.name) \(.activeWorkspace.id) \(.focused)"')
|
||||
|
||||
if [[ ${workspace[$new_workspace]} ]]; then
|
||||
hyprctl dispatch swapactiveworkspaces $active ${workspace[$new_workspace]}
|
||||
|
|
Loading…
Add table
Reference in a new issue