diff options
author | Urbain Vaes <urbain@vaes.uk> | 2016-01-12 17:02:33 +0000 |
---|---|---|
committer | Urbain Vaes <urbain@vaes.uk> | 2016-01-12 17:02:33 +0000 |
commit | 8133488df21bc199a27826f530a4d6330ba1c11b (patch) | |
tree | fb5afa6bf778c5e4ac28d8cb0f068916f430ee60 /bin/workspace | |
parent | 987018b2f5b9be0a075aa82ff1cdb171a8cfec15 (diff) |
Improve workspace script
Diffstat (limited to 'bin/workspace')
-rwxr-xr-x | bin/workspace | 6 |
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:") |