From 22ca6abe940df4afbe4982837249d7b0ad54daaa Mon Sep 17 00:00:00 2001 From: Morgan Wattiez Date: Fri, 16 Aug 2019 14:52:59 +0200 Subject: [PATCH] avoid checking the mouse everytime --- dot_scripts/bootstrap.sh | 1 - dot_scripts/{resume.sh => mouse_bluetooth.sh} | 1 - dot_zsh_functions | 7 +++++++ dot_zshrc | 10 ++++------ 4 files changed, 11 insertions(+), 8 deletions(-) rename dot_scripts/{resume.sh => mouse_bluetooth.sh} (99%) diff --git a/dot_scripts/bootstrap.sh b/dot_scripts/bootstrap.sh index 3fe032d..9dbdb7a 100755 --- a/dot_scripts/bootstrap.sh +++ b/dot_scripts/bootstrap.sh @@ -59,7 +59,6 @@ case "$(uname -s)" in ln -snf ~/.config/Code/User/settings.json "~/Library/Application Support/Code/User/settings.json" ln -snf "~/Library/Mobile Documents/com~apple~CloudDocs/Mackup/Library/Application Support/Code/User/snippets" "~/Library/Application Support/Code/User/snippets" ln -snf "~/Library/Mobile Documents/com~apple~CloudDocs/Mackup/.mackup.cfg" ~/.mackup.cfg - echo 'Install Docker Desktop for Mac OS X' ~/.scripts/install_docker_for_mac.sh ;; esac diff --git a/dot_scripts/resume.sh b/dot_scripts/mouse_bluetooth.sh similarity index 99% rename from dot_scripts/resume.sh rename to dot_scripts/mouse_bluetooth.sh index 5200662..0d86eff 100755 --- a/dot_scripts/resume.sh +++ b/dot_scripts/mouse_bluetooth.sh @@ -2,4 +2,3 @@ scriptfile=./connectmouse.applescript parentdir=$(dirname -- "$0") osascript "${parentdir}/${scriptfile}" - diff --git a/dot_zsh_functions b/dot_zsh_functions index 43d65d5..e05f081 100644 --- a/dot_zsh_functions +++ b/dot_zsh_functions @@ -110,3 +110,10 @@ function biggerthan() { function cd() { builtin cd "$@" && ls -latr } +function mouse() { + case "$(uname -s)" in + Darwin) + sh ~/.scripts/mouse_bluetooth.sh + ;; + esac +} diff --git a/dot_zshrc b/dot_zshrc index cd98392..22f74c8 100644 --- a/dot_zshrc +++ b/dot_zshrc @@ -100,12 +100,10 @@ eval "$(fasd --init auto)" istherenewissues case "$(uname -s)" in - Darwin) - ~/.scripts/install_docker_for_mac.sh - unlink "$HOME/Library/Application Support/Code/User/settings.json" - ln -s "$HOME/.config/Code/User/settings.json" "$HOME/Library/Application Support/Code/User/settings.json" - sh ~/.scripts/resume.sh - ;; + Darwin) + unlink "$HOME/Library/Application Support/Code/User/settings.json" + ln -s "$HOME/.config/Code/User/settings.json" "$HOME/Library/Application Support/Code/User/settings.json" + ;; esac #THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!! https://github.com/sdkman/sdkman-cli/issues/613