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

Working (on my machine) branch #79

Merged
merged 2 commits into from Sep 8, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
21 changes: 4 additions & 17 deletions README.md
@@ -1,12 +1,10 @@
# Maximum Awesome
# Maximum Awesome (Experimental) Linux Port

Config files for vim and tmux, lovingly tended by a small subculture of
peace-loving hippies. Built for Mac OS X.
** Still very experimental **
Linux (actually just Ubuntu) port of Maximum Awesome from (https://github.com/square/maximum-awesome).

## What's in it?

* [MacVim](https://code.google.com/p/macvim/) (independent or for use in a terminal)
* [iTerm 2](http://www.iterm2.com/)
* [tmux](http://tmux.sourceforge.net/)
* Awesome syntax highlighting with the [Solarized color scheme](http://ethanschoonover.com/solarized)

Expand Down Expand Up @@ -44,17 +42,6 @@ peace-loving hippies. Built for Mac OS X.
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

Any contributors to the master maximum-awesome repository must sign the
[Individual Contributor License Agreement (CLA)][cla]. It's a short form that
covers our bases and makes sure you're eligible to contribute.

[cla]: https://spreadsheets.google.com/spreadsheet/viewform?formkey=dDViT2xzUHAwRkI3X3k5Z0lQM091OGc6MQ&ndplr=1

When you have a change you'd like to see in the master repository, [send a pull
request](https://github.com/square/maximum-awesome/pulls). Before we merge your
request, we'll make sure you're in the list of people who have signed a CLA.

## Acknowledgements

Thanks to the vimsters at Square who put this together. Thanks to Tim Pope for
his awesome vim plugins.
Thanks to the owners of the original maximum-awesome repo (https://github.com/square/maximum-awesome).
130 changes: 50 additions & 80 deletions Rakefile
@@ -1,9 +1,4 @@
def brew_install(package, *options)
`brew list #{package}`
return if $?.success?

sh "brew install #{package} #{options.join ' '}"
end
require 'tmpdir'

def step(description)
description = "-- #{description} "
Expand Down Expand Up @@ -50,86 +45,71 @@ def link_file(original_filename, symlink_filename)
end

namespace :install do
desc 'Update or Install Brew'
task :brew do
step 'Homebrew'
unless system('which brew > /dev/null || ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"')
raise "Homebrew must be installed before continuing."
end

desc 'Apt-get Update'
task :update do
step 'apt-get update'
sh 'sudo apt-get update'
end

desc 'Install The Silver Searcher'
task :the_silver_searcher do
step 'the_silver_searcher'
brew_install 'the_silver_searcher'
desc 'Install Vim'
task :vim do
step 'vim'
sh 'sudo apt-get install vim'
end

desc 'Install iTerm'
task :iterm do
step 'iterm2'
unless app? 'iTerm'
system <<-SHELL
curl -L -o iterm.zip http://iterm2.googlecode.com/files/iTerm2-1_0_0_20120203.zip && \
unzip iterm.zip && \
mv iTerm.app /Applications && \
rm iterm.zip
SHELL
end
desc 'Install tmux'
task :tmux do
step 'tmux'
sh 'sudo apt-get install tmux'
end

desc 'Install ctags'
task :ctags do
step 'ctags'
brew_install 'ctags'
sh 'sudo apt-get install ctags'
end

desc 'Install reattach-to-user-namespace'
task :reattach_to_user_namespace do
step 'reattach-to-user-namespace'
brew_install 'reattach-to-user-namespace'
# https://github.com/ggreer/the_silver_searcher
desc 'Install The Silver Searcher'
task :the_silver_searcher do
step 'the_silver_searcher'
sh 'sudo apt-get install build-essential automake pkg-config libpcre3-dev zlib1g-dev liblzma-dev'
sh 'git clone https://github.com/ggreer/the_silver_searcher.git'
Dir.chdir 'the_silver_searcher' do
sh './build.sh'
sh 'sudo make install'
end
end

desc 'Install tmux'
task :tmux do
step 'tmux'
brew_install 'tmux'
end
# instructions from http://www.webupd8.org/2011/04/solarized-must-have-color-paletter-for.html
desc 'Install Solarized and fix ls'
task :solarized, :arg1 do |t, args|
args[:arg1] = "dark" unless ["dark", "light"].include? args[:arg1]
color = ["dark", "light"].include?(args[:arg1]) ? args[:arg1] : "dark"

desc 'Install MacVim'
task :macvim do
step 'MacVim'
unless app? 'MacVim'
system <<-SHELL
curl -L -o macvim.tbz https://github.com/downloads/b4winckler/macvim/MacVim-snapshot-64.tbz && \
bunzip2 macvim.tbz && tar xf macvim.tar && \
mv MacVim-snapshot-64/MacVim.app /Applications && \
rm -rf macvim.tbz macvim.tar MacVim-snapshot-64
SHELL
system ''
step 'solarized'
sh 'git clone https://github.com/sigurdga/gnome-terminal-colors-solarized.git' unless File.exist? 'gnome-terminal-colors-solarized'
Dir.chdir 'gnome-terminal-colors-solarized' do
sh "./solarize #{color}"
end

bin_vim = File.expand_path('~/bin/vim')
FileUtils.mkdir_p(File.dirname(bin_vim))
unless File.executable?(bin_vim)
File.open(bin_vim, 'w', 0744) do |io|
io << <<-SHELL
#!/bin/bash
exec /Applications/MacVim.app/Contents/MacOS/Vim "$@"
SHELL
end
step 'fix ls-colors'
Dir.chdir do
sh "wget --no-check-certificate https://raw.github.com/seebi/dircolors-solarized/master/dircolors.ansi-#{color}"
sh "mv dircolors.ansi-#{color} .dircolors"
sh 'eval `dircolors .dircolors`'
end
end
end

desc 'Install these config files.'
task :default do
Rake::Task['install:brew'].invoke
Rake::Task['install:the_silver_searcher'].invoke
Rake::Task['install:iterm'].invoke
Rake::Task['install:ctags'].invoke
Rake::Task['install:reattach_to_user_namespace'].invoke
Rake::Task['install:update'].invoke
Rake::Task['install:vim'].invoke
Rake::Task['install:tmux'].invoke
Rake::Task['install:macvim'].invoke
Rake::Task['install:ctags'].invoke
Rake::Task['install:the_silver_searcher'].invoke

step 'git submodules'
sh 'git submodule update --init'
Expand All @@ -145,22 +125,12 @@ task :default do
cp File.expand_path('vimrc.local'), File.expand_path('~/.vimrc.local'), :verbose => true
end

step 'iterm2 colorschemes'
colorschemes = `defaults read com.googlecode.iterm2 'Custom Color Presets'`
dark = colorschemes !~ /Solarized Dark/
light = colorschemes !~ /Solarized Light/
sh('open', '-a', '/Applications/iTerm.app', File.expand_path('iterm2-colors-solarized/Solarized Dark.itermcolors')) if dark
sh('open', '-a', '/Applications/iTerm.app', File.expand_path('iterm2-colors-solarized/Solarized Light.itermcolors')) if light

step 'iterm2 profiles'
puts
puts " Your turn!"
puts
puts " Go and manually set up Solarized Light and Dark profiles in iTerm2."
puts " (You can do this in 'Preferences' -> 'Profiles' by adding a new profile,"
puts " then clicking the 'Colors' tab, 'Load Presets...' and choosing a Solarized option.)"
puts " Also be sure to set Terminal Type to 'xterm-256color' in the 'Terminal' tab."
puts
puts " Enjoy!"
step 'solarized dark or light'
puts
puts " You're almost done! Inside of the maximum-awesome-linux directory, do: "
puts " rake install:solarized['dark'] "
puts " or "
puts " rake install:solarized['light']"

puts " You may need to close your terminal and re-open it for it to take effect."
end
63 changes: 0 additions & 63 deletions iterm2-colors-solarized/README.md

This file was deleted.