summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUrbain Vaes <urbain@vaes.uk>2019-03-10 19:23:57 +0100
committerUrbain Vaes <urbain@vaes.uk>2019-03-11 16:06:02 +0100
commitc3672309ea0e3c75ee23e0e272b07e15a5ff2d33 (patch)
tree0ca93ecdaa5fe2fed2bad4878edad434c0131d8b
parentb265b484c6a5f6d5b9d04efa4fb6dc0d433866de (diff)
[i3] Make 'workspace gw' work with number 10
-rwxr-xr-xbin/.local/bin/workspace2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/.local/bin/workspace b/bin/.local/bin/workspace
index 522ce64..1d82071 100755
--- a/bin/.local/bin/workspace
+++ b/bin/.local/bin/workspace
@@ -41,7 +41,7 @@ act_on_workspace() {
[[ $1 = 'n' ]] && new_number=$(( (11+focused_number+1) % 11 ))
[[ $1 = 'p' ]] && new_number=$(( (11+focused_number-1) % 11 ))
- next=$(echo "${workspaces}" | awk '$1=='$new_number' {print $2}')
+ next=$(echo "${workspaces}" | sort -n | awk '$1=='$new_number' {print $2}')
echo $next
i3-msg rename workspace to "${new_number}":"${focused_name}"