summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/workspace6
1 files changed, 5 insertions, 1 deletions
diff --git a/bin/workspace b/bin/workspace
index 02c2b6f..a22511e 100755
--- a/bin/workspace
+++ b/bin/workspace
@@ -1,11 +1,15 @@
#!/bin/zsh
# Command to use
-[[ $1 = 'n' ]] && cmd="workspace" || cmd="move container to workspace"
+[[ $1 = 'n' ]] && cmd="workspace"
+[[ $1 = 'm' ]] && cmd="move container to workspace"
# List of workspaces
workspaces=$(i3-msg -t get_workspaces | grep -Po '"name":.*?[^\\]"' | sed 's/"name":"\([^"]\+\)"/\1/g')
+# Keep only the ones containing :
+workspaces=$(echo $workspaces | sed '/:/!d')
+
# Get desired workspace
target=$(echo $workspaces | dmenu -i -sf green -p "Go to workspace:")