add java as cask.

This commit is contained in:
Ivan Malison 2014-10-23 15:42:28 -07:00
parent 7988eb7f6a
commit a2646b035a
3 changed files with 269 additions and 261 deletions

View File

@ -6,12 +6,16 @@ var grid = slate.op("grid", {
"1920x1080": {"width": 8, "height": 6}
}
});
slate.bindAll({
"esc:cmd": hint,
"space:alt": grid
"space:alt": grid,
"tab:cmd": slate.op("switch")
});
slate.configAll({
windowHintsIgnoreHiddenWindows: false,
windowHintsShowIcons: true,
windowHintsSpread: true
windowHintsSpread: true,
switchShowTitles: true
});

View File

@ -1,4 +1,4 @@
function osx_config() {
# Ask for the administrator password upfront
sudo -v
@ -265,9 +265,9 @@ function osx_config() {
# 10: Put display to sleep
# 11: Launchpad
# Top right screen corner → Desktop
defaults write com.apple.dock wvous-tr-corner -int 4
defaults write com.apple.dock wvous-tr-corner -int 0
defaults write com.apple.dock wvous-tr-modifier -int 0
defaults write com.apple.dock wvous-bl-corner -int 5
defaults write com.apple.dock wvous-bl-corner -int 0
defaults write com.apple.dock wvous-bl-modifier -int 0
###############################################################################
@ -324,4 +324,3 @@ function osx_config() {
defaults write org.m0k.transmission WarningDonate -bool false
# Hide the legal disclaimer
defaults write org.m0k.transmission WarningLegal -bool false
}

View File

@ -12,19 +12,23 @@ def all(ctx):
brew_install(ctx)
brew_cask(ctx)
setup_cocoa_emacs(ctx)
enable_access_for_assistive_devices(ctx)
osx_config(ctx)
macvim_install = ("macvim --override-system-vim --custom-system-icons "
"--with-features=huge --enable-rubyinterp "
"--enable-pythoninterp --enable-perlinterp --enable-cscope")
ESSENTIAL = (
"emacs --cocoa --srgb --with-x", "tmux", "python --with-brewed-openssl", "htop", "zsh", "make",
"macvim --override-system-vim --custom-system-icons --with-features=huge "
"--enable-rubyinterp --enable-pythoninterp --enable-perlinterp --enable-cscope"
"emacs --cocoa --srgb --with-x", "tmux", "python --with-brewed-openssl",
"htop", "zsh", "make", macvim_install
)
BASICS = (
"findutils", "coreutils", "binutils", "diffutils", "ed --default-names",
"gawk", "gnu-indent --default-names", "gnu-sed --default-names",
"gnu-tar --default-names", "gnu-which --default-names", "gnutls --default-names",
"grep --default-names", "gzip", "watch", "wdiff --with-gettext", "wget --enable-iri"
"gnu-tar --default-names", "gnu-which --default-names",
"gnutls --default-names", "grep --default-names", "gzip", "watch",
"wdiff --with-gettext", "wget --enable-iri"
)
SHOULD_INSTALL = (
"nmap", "readline", "netcat", "reattach-to-user-namespace", "daemonize",
@ -34,15 +38,15 @@ SHOULD_INSTALL = (
MISC = ("file-formula", "less", "openssh --with-brewed-openssl",
"perl518", "rsync", "svn", "unzip", "docker", "boot2docker", "pandoc",
"mercurial")
CASKS = ('caffeine', 'flux', 'google-chrome', 'iterm2', 'spotify',
'vlc', 'virtualbox', 'xquartz', 'synergy', 'slate', 'seil')
CASKS = ('caffeine', 'flux', 'google-chrome', 'iterm2', 'spotify', 'synergy',
'virtualbox', 'xquartz', 'slate', 'java', 'vlc', 'seil',)
@ctask
def osx_config(ctx):
ctx.run('source {0}; osx_config'.format(
ctx.run('sudo {0}'.format(
os.path.join(util.RESOURCES_DIRECTORY, 'osx.sh')
))
), pty=True)
@ctask
@ -81,25 +85,26 @@ def setup_cocoa_emacs(ctx):
APPS_NEEDING_ASSISTIVE_DEVICE_ACCESS = ('Slate', 'Synergy', 'iTerm')
@ctask
def enable_access_for_assitive_devices(ctx):
def enable_access_for_assistive_devices(ctx):
for app in APPS_NEEDING_ASSISTIVE_DEVICE_ACCESS:
app_string = '/Applications/{0}.app'.format(app)
user_application = os.path.expanduser('~' + app_string)
if os.path.exists(user_application):
ctx.run(
'source ~/.zshrc && '
'enable_access_for_assitive_devices "{0}"'.format(
'zsh -c "source ~/.zshrc && '
'enable_access_for_assistive_devices \"{0}\""'.format(
user_application
)
)
if os.path.exists(app_string):
ctx.run(
'source ~/.zshrc && '
'enable_access_for_assitive_devices "{0}"'.format(app_string)
'zsh -c "source ~/.zshrc && '
'enable_access_for_assistive_devices \"{0}\""'.format(
app_string
)
)
@ctask
def get_command_line_tools(ctx):
if not command_exists('gcc'):
if not util.command_exists('gcc'):
ctx.run('xcode-select --install')