def run(self): with self.task_lock(): if not self._already_installed(): yield Chown(self.installation_root, get_username()) yield Gitclone("https://github.com/Homebrew/brew.git", self.installation_root) if self.package and self.package not in self._installed_packages(): extra_options = "" if self.force_bottle: extra_options = "--force-bottle" yield Script("brew install %s %s" % (extra_options, bash_quote(self.package))) if self.cask_package: if self.cask_package not in self._cask_installed_packages(): yield Script("brew cask install %s" % bash_quote(self.cask_package)) if self.tap and self.tap not in self._taps(): yield Script("brew tap %s" % bash_quote(self.tap))
def main(): """ A fully-functional example of a typical user's OS X configuration. """ # Do not create .DS_Store on network shares yield Defaults("com.apple.desktopservices", "DSDontWriteNetworkStores", True) # Disable autocorrect yield Defaults("NSGlobalDomain", "NSAutomaticSpellingCorrectionEnabled", False) # Disables keyboard press-and-hold for accented character entry yield Defaults("NSGlobalDomain", "ApplePressAndHoldEnabled", False) # Expand the Save panel by default yield Defaults("NSGlobalDomain", "NSNavPanelExpandedStateForSaveMode", True) # Sets the delay before held keys repeat # yield Defaults("NSGlobalDomain", "InitialKeyRepeat", 15) # Sets the repeat rate for held keys # yield Defaults("NSGlobalDomain", "KeyRepeat", 2) # Minimize windows to dock icon yield Defaults("com.apple.dock", "minimize-to-application", True) # Put the dock on the bottom yield Defaults("com.apple.dock", "orientation", "bottom") # Change icon size yield Defaults("com.apple.dock", "tilesize", 52) # Auto-hide the dock # yield Defaults("com.apple.dock", "autohide", 0) # Fast updates for Activity Monitor (every second) yield Defaults("com.apple.ActivityMonitor", "UpdatePeriod", 1) # Dark interface yield Defaults("Apple Global Domain", "AppleInterfaceStyle", "Dark") # Finder show all file extensions yield Defaults("Apple Global Domain", "AppleShowAllExtensions", 1) # Only show scrollbars when scrolling yield Defaults("Apple Global Domain", "AppleShowScrollBars", "WhenScrolling") # Set ask for password delay to 0 yield Defaults("com.apple.screensaver", "askForPasswordDelay", 0) # Turn off Apple Airplay status bar icon yield Defaults("com.apple.airplay", "showInMenuBarIfPresent", 0) yield Link("Bok/Configuration", expanduser("~/Configuration")) if exists(expanduser("~/Bok/Configuration")): # Avoid creating a dead links if not exists(expanduser("~/.atom")): mkdir(expanduser("~/.atom")) for atom_path in ["config.cson", "keymap.cson", "snippets.cson", "styles.less"]: yield Link("../Configuration/atom/" + atom_path, expanduser("~/.atom/" + atom_path)) yield Link("Configuration/bcrc", expanduser("~/.bcrc")) yield Link("Configuration/gitconfig", expanduser("~/.gitconfig")) yield Link("Configuration/gitignore", expanduser("~/.gitignore")) yield Link("Configuration/zshconfig", expanduser("~/.zshconfig")) if not exists(expanduser("~/.ssh")): mkdir(expanduser("~/.ssh")) if not exists(expanduser("~/.ssh/ctl")): mkdir(expanduser("~/.ssh/ctl")) yield Link("../Configuration/ssh/known_hosts", expanduser("~/.ssh/known_hosts")) yield Link("../Configuration/ssh/config", expanduser("~/.ssh/config")) # yield Link("Configuration/pydistutils.cfg", expanduser("~/.pydistutils.cfg")) # if exists(expanduser("~/.gradle")): # yield Link("../Configuration/gradle.properties", expanduser("~/.gradle/gradle.properties")) yield Chown("/etc/hosts", get_username(), group="staff") # Basic packages yield Homebrew(tap="homebrew/core") yield Homebrew(tap="caskroom/cask") yield Homebrew(tap="homebrew/fuse") yield Homebrew(tap="homebrew/x11") yield Homebrew(tap="homebrew/science") yield Homebrew(tap="rogerhub/sman") # yield Homebrew("gcc", force_bottle=True) # yield Homebrew("awscli") # yield Homebrew("fswatch", force_bottle=True) # yield Homebrew("go", force_bottle=True) # yield Homebrew("ctags", force_bottle=True) # yield Homebrew("the_silver_searcher", force_bottle=True) # yield Homebrew("ant", force_bottle=True) # yield Homebrew("wget", force_bottle=True) yield Homebrew("pstree", force_bottle=True) yield Homebrew("duplicity", force_bottle=True) yield Homebrew("mcrypt", force_bottle=True) # yield Homebrew("iperf") yield Homebrew("mtr", force_bottle=True) yield Homebrew("unrar", force_bottle=True) # yield Homebrew("htop-osx", force_bottle=True) yield Homebrew("wakeonlan") yield Homebrew("openssl", force_bottle=True) yield Homebrew("imagemagick", force_bottle=True) # yield Homebrew("gettext", force_bottle=True) yield Homebrew("python", force_bottle=True) yield Homebrew("python3", force_bottle=True) # yield Homebrew("node", force_bottle=True) yield Homebrew("hping") yield Homebrew("ffmpeg", force_bottle=True) # yield Homebrew("clang-format", force_bottle=True) yield Homebrew("git", force_bottle=True) # yield Homebrew("webp", force_bottle=True) yield Homebrew("nmap", force_bottle=True) yield Homebrew("nasm", force_bottle=True) # yield Homebrew("doctl", force_bottle=True) yield Homebrew("source-highlight", force_bottle=True) # yield Homebrew("lftp", force_bottle=True) yield Homebrew("arping", force_bottle=True) # Fuse-related packages yield Homebrew(cask_package="osxfuse") yield Homebrew("sshfs") yield Homebrew("fuse-zip", force_bottle=True) # Java-related packages # yield Homebrew(cask_package="java") # yield Homebrew("maven", force_bottle=True) # yield Homebrew("scala", force_bottle=True) # yield Homebrew("gradle") # X11-related packages # yield Homebrew(cask_package="xquartz") # yield Homebrew("rdesktop", force_bottle=True) # Cask packages yield Homebrew(cask_package="google-chrome") yield Homebrew(cask_package="gnucash") # yield Homebrew(cask_package="google-hangouts") yield Homebrew(cask_package="vlc") yield Homebrew(cask_package="calibre") # yield Homebrew(cask_package="caffeine") yield Homebrew(cask_package="vmware-fusion") yield Homebrew(cask_package="dropbox") yield Homebrew(cask_package="spotify") yield Homebrew(cask_package="logitech-options") # yield Homebrew(cask_package="google-cloud-sdk") yield Homebrew(cask_package="atom") # yield Homebrew(cask_package="wireshark") yield Homebrew(cask_package="1password") yield Homebrew(cask_package="handbrake") yield Homebrew(cask_package="sman")