From 7c83b3d1839711e6266fab2cd64f694c88cea7e9 Mon Sep 17 00:00:00 2001 From: David Runge Date: Fri, 3 Nov 2017 18:20:52 +0100 Subject: bin/setup_screens: Fixing if statements. --- bin/setup_screens | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'bin') diff --git a/bin/setup_screens b/bin/setup_screens index 995dab6..1a84bba 100755 --- a/bin/setup_screens +++ b/bin/setup_screens @@ -78,14 +78,14 @@ function set_configuration() if [ -n "$action" ]; then case "$action" in "open") - if [ $(get_configuration_fingerprint "docked-open") = "$fingerprint" ]; then + if [ $(get_configuration_fingerprint "docked-open") == "$fingerprint" ]; then echo "Loading docked-open." state=1 autorandr -l docked-open fi ;; "close") - if [ $(get_configuration_fingerprint "docked-closed") = "$fingerprint" ]; then + if [ $(get_configuration_fingerprint "docked-closed") == "$fingerprint" ]; then echo "Loading docked-closed." state=1 autorandr -l docked-closed @@ -96,14 +96,14 @@ function set_configuration() # check the lid state case "$lid_state" in "open") - if [ $(get_configuration_fingerprint "docked-open") = "$fingerprint" ]; then + if [[ $(get_configuration_fingerprint "docked-open") == "$fingerprint" ]]; then echo "Loading docked-open." state=1 autorandr -l docked-open fi ;; "closed") - if [ $(get_configuration_fingerprint "docked-closed") = "$fingerprint" ]; then + if [[ $(get_configuration_fingerprint "docked-closed") == "$fingerprint" ]]; then echo "Loading docked-closed." state=1 autorandr -l docked-closed @@ -118,7 +118,7 @@ function set_configuration() # else if not docked else if [ "$action" = "open" ]; then - if [ $(get_configuration_fingerprint "external") = "$fingerprint" ]; then + if [[ $(get_configuration_fingerprint "external") == "$fingerprint" ]]; then echo "Loading external." state=1 autorandr -l external @@ -127,7 +127,7 @@ function set_configuration() fi # if the screen still has not been setup, try using internal if [ $state -ne 1 ]; then - if [ $(get_configuration_fingerprint "internal") = "$fingerprint" ]; then + if [[ $(get_configuration_fingerprint "internal") == "$fingerprint" ]]; then echo "Loading internal." autorandr -l internal fi -- cgit v1.2.3-70-g09d2