summaryrefslogtreecommitdiff
path: root/bin/workspace
diff options
context:
space:
mode:
authorUrbain Vaes <urbain@vaes.uk>2016-01-12 17:02:33 +0000
committerUrbain Vaes <urbain@vaes.uk>2016-01-12 17:02:33 +0000
commit8133488df21bc199a27826f530a4d6330ba1c11b (patch)
treefb5afa6bf778c5e4ac28d8cb0f068916f430ee60 /bin/workspace
parent987018b2f5b9be0a075aa82ff1cdb171a8cfec15 (diff)
Improve workspace script
Diffstat (limited to 'bin/workspace')
-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:")