From 0b0e59d9dda5571b69e3883b6a3ae356dbae828e Mon Sep 17 00:00:00 2001 From: Jokler Date: Wed, 22 May 2019 17:38:58 +0200 Subject: Scripts: Make some scripts POSIX shell compliant --- scripts/rofi-workspaces | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts/rofi-workspaces') 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 -- cgit v1.2.3-70-g09d2