From 03e9e435dcd6260b106b5c4dac27c09f058d3ca1 Mon Sep 17 00:00:00 2001 From: Daniel Barber Date: Tue, 16 Apr 2019 14:10:52 -0400 Subject: [PATCH] Setup chunkwm --- lib/chunkwm.sh | 14 ++++++++++++++ setup.sh | 8 ++++++++ 2 files changed, 22 insertions(+) create mode 100755 lib/chunkwm.sh diff --git a/lib/chunkwm.sh b/lib/chunkwm.sh new file mode 100755 index 0000000..045edaf --- /dev/null +++ b/lib/chunkwm.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +# Ask the user to generate a code signing key for `chunkwm` +echo "Please generate a code signing certificate called 'chunkwm-cert' in Keychain Access" +read -r -p "Press any key to continue... " -n 1 + +# We need to code sign chunkwm and skhd in order for them to be added to the +# accessibility allowed list. +codesign -fs "chunkwm-cert" $(which chunkwm) +codesign -fs "chunkwm-cert" $(which skhd) + +# Start chunkwm +brew services start chunkwm +brew services start skhd diff --git a/setup.sh b/setup.sh index 2e5c45b..288747e 100755 --- a/setup.sh +++ b/setup.sh @@ -22,6 +22,10 @@ if [ ! -f "$HOME/.ssh/id_ed25519.pub" ]; then read -r -p "Press any key to continue... " -n 1 fi +if ! ssh-add -L -q > /dev/null ; then + ssh-add +fi + # Install Homebrew step "Installing Homebrew" if ! type brew > /dev/null; then @@ -44,6 +48,10 @@ fi step "Installing Homebrew bundle" brew bundle --file="$MAC_SETUP_DIR/Brewfile" +# Setup `chunkwm` +step "Setting up ChunkWM" +"$MAC_SETUP_DIR/lib/chunkwm.sh" + # Install Mac App Store apps step "Installing App Store apps" "$MAC_SETUP_DIR/lib/mas.sh"