Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add script/setup #11

Merged
merged 13 commits into from
Jan 30, 2017
Merged

Add script/setup #11

merged 13 commits into from
Jan 30, 2017

Conversation

bkeepers
Copy link

@bkeepers bkeepers commented Jan 29, 2017

This is an attempt to fix the TODO in the README for adding script/setup. This works on my machine, but there's still some cleanup:

  • Update docs in README
  • Detect if homebrew is installed
  • Make idempotent


# Enable accessibility - https://github.com/jacobsalmela/tccutil
# FIXME Doesn't work with SIP https://github.com/jacobsalmela/tccutil/issues/18
# sudo tccutil -e org.hammerspoon.Hammerspoon
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MikeMcQuaid do you know any tricks to programmatically enable Accessibility?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not, sorry.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problem, thanks.

@@ -0,0 +1,6 @@
cask_args appdir: '/Applications'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the default now so can be dropped.

ln -sf $PWD/hammerspoon ~/.hammerspoon

# Prepare custom settings for navigating between words in iTerm2
cat $PWD/inputrc >> ~/.inputrc

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pedantry: may want to check the contents aren't already present to avoid appending multiple times.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 done in be820cf

@bkeepers bkeepers changed the title WIP: Add script/setup Add script/setup Jan 29, 2017
Copy link
Owner

@jasonrudolph jasonrudolph left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work, @bkeepers! 😻

I noticed just one small issue related to ~/.inputrc. Would you mind taking a look?

ln -sfn $PWD/hammerspoon ~/.hammerspoon

# Prepare custom settings for navigating between words in iTerm2
grep -q forward-word ~/.inputrc || cat $PWD/inputrc >> ~/.inputrc
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If ~/.inputrc doesn't exist, this line fails with the following error:

grep: /Users/me/.inputrc: No such file or directory

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Fixed by adding -s flag:

     -s, --no-messages
             Silent mode.  Nonexistent and unreadable files are ignored (i.e.
             their error messages are suppressed).

@jasonrudolph jasonrudolph merged commit 120d0f6 into jasonrudolph:master Jan 30, 2017
@jasonrudolph
Copy link
Owner

Thanks, @bkeepers! 🍻

@bkeepers bkeepers deleted the setup branch March 11, 2018 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants