summaryrefslogtreecommitdiffstats
path: root/scripts/rofi-workspaces
diff options
context:
space:
mode:
authorJokler <jokler.contact@gmail.com>2019-05-22 17:38:58 +0200
committerJokler <jokler.contact@gmail.com>2019-05-22 17:38:58 +0200
commit0b0e59d9dda5571b69e3883b6a3ae356dbae828e (patch)
treedc3dee94262a424d7567bb6385e15417630276e3 /scripts/rofi-workspaces
parentff207603f32d48594901b2f312c8c8b224d3171b (diff)
downloaddotfiles-0b0e59d9dda5571b69e3883b6a3ae356dbae828e.tar.gz
dotfiles-0b0e59d9dda5571b69e3883b6a3ae356dbae828e.zip
Scripts: Make some scripts POSIX shell compliant
Diffstat (limited to 'scripts/rofi-workspaces')
-rwxr-xr-xscripts/rofi-workspaces6
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