diff options
| author | Jokler <jokler.contact@gmail.com> | 2019-05-22 17:38:58 +0200 |
|---|---|---|
| committer | Jokler <jokler.contact@gmail.com> | 2019-05-22 17:38:58 +0200 |
| commit | 0b0e59d9dda5571b69e3883b6a3ae356dbae828e (patch) | |
| tree | dc3dee94262a424d7567bb6385e15417630276e3 /scripts/rofi-workspaces | |
| parent | ff207603f32d48594901b2f312c8c8b224d3171b (diff) | |
| download | dotfiles-0b0e59d9dda5571b69e3883b6a3ae356dbae828e.tar.gz dotfiles-0b0e59d9dda5571b69e3883b6a3ae356dbae828e.zip | |
Scripts: Make some scripts POSIX shell compliant
Diffstat (limited to 'scripts/rofi-workspaces')
| -rwxr-xr-x | scripts/rofi-workspaces | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/rofi-workspaces b/scripts/rofi-workspaces index a93190f..e59f4f5 100755 --- a/scripts/rofi-workspaces +++ b/scripts/rofi-workspaces @@ -1,12 +1,12 @@ #!/bin/bash moveto=0 -if [[ "$1" == "--move" ]]; then +if [ "$1" = "--move" ]; then moveto=1 shift fi -function get_workspaces () { +get_workspaces() { workspace_json="$(i3-msg -t get_workspaces)" IFS=',' read -ra split <<< "$workspace_json" @@ -20,7 +20,7 @@ function get_workspaces () { done } -selection=$(echo "$(get_workspaces)" | rofi -dmenu "$@") +selection=$(get_workspaces | rofi -dmenu "$@") if [[ $moveto -eq 0 ]]; then i3-msg workspace "$selection" else |
