From 8133488df21bc199a27826f530a4d6330ba1c11b Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Tue, 12 Jan 2016 17:02:33 +0000 Subject: Improve workspace script --- bin/workspace | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'bin/workspace') 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:") -- cgit v1.2.3