From 84ff3aa1798d41a37bda019dc3caea692e9104ed Mon Sep 17 00:00:00 2001 From: JoniVR Date: Sat, 26 May 2018 21:09:06 +0200 Subject: [PATCH] fix dock not autohiding --- Intellidock.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Intellidock.sh b/Intellidock.sh index affa141..7045ef3 100755 --- a/Intellidock.sh +++ b/Intellidock.sh @@ -54,17 +54,19 @@ then if [ $check_dock == "Yes" ] then echo "Clammshellmode: Yes, autohide: off." + osascript -e "tell application \"System Events\" to set the autohide of the dock preferences to false" + if [ "$1" == "-n" ] then - osascript -e "tell application \"System Events\" to set the autohide of the dock preferences to false" osascript -e 'display notification "Device in closed-lid mode, Dock autohide: off." with title "Intellidock"' fi # If not in clamshell mode, enable autohide dock else echo "Clamshellmode: No, autohide: on." + osascript -e "tell application \"System Events\" to set the autohide of the dock preferences to true" + if [ "$1" == "-n" ] then - osascript -e "tell application \"System Events\" to set the autohide of the dock preferences to true" osascript -e 'display notification "Device lid opened, Dock autohide: on." with title "Intellidock"' fi fi