diff options
Diffstat (limited to 'i3-auto-arrange')
-rwxr-xr-x | i3-auto-arrange | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/i3-auto-arrange b/i3-auto-arrange new file mode 100755 index 000000000000..c21713c19435 --- /dev/null +++ b/i3-auto-arrange @@ -0,0 +1,15 @@ +#usr/bin/env zsh + +workspaces=$(i3-msg -t get_workspaces) +num=$(echo $workspaces | jq length) + +for ((i=0;i<$num;i++)) +do + current=$(echo $workspaces | jq ".[$i].num") + normal=$(($i + 1)) + + if (($current != $normal)) + then + i3-msg -q rename workspace "$current" to "$normal" + fi +done |