From 6752584739ae5a02271caf151ad938718c8e6731 Mon Sep 17 00:00:00 2001 From: Mathias Bynens Date: Mon, 5 Sep 2011 20:08:58 +0200 Subject: [PATCH] Initial commit. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Whitespace cleanup. Add installation instructions. Add update instructions. Typo. Add TRACE and OPTIONS aliases. Add a note about the `.osx` file. Add `undopush` alias. Fix a typo in the fix for the ancient UTF-8 bug in QuickLook. Remove the disturbing ".dmg" Mounting Verification Add some more goodies to .osx. Avoid creating .DS_Store files on network volumes. Enable Safari’s debug menu. Added "lsd" to list only directories Tweak README. Tweak README. Disable Resume system-wide. Thanks to nspragmatic on Hacker News. http://news.ycombinator.com/item?id=2974911 Enable full keyboard access for all controls (e.g. enable Tab in modal dialogs). Show a warning and ask for user confirmation before running the bootstrapper. Fixes #8. Added enable-spring-load-actions-on-all-items -bool true Ignore duplicate history entries. Comment tweak. Make sure rsync output starts on a new line. added stuff for ssh tab completion Better tab completion for SSH hostnames based on ~/.ssh/config. Add aliases to show/hide hidden files in Finder. Closes #15. Posix path in finder title, sheet speed, hidden application's icons are transparent Minor cleanup. Fix typo. Add tab completion for `defaults read|write NSGlobalDomain`. Useful when looking for new ~/.osx additions. Reload dotfiles after updating through the bootstrapper. Check if ~/.ssh/config exists before grepping it. Add aliases to hide/show all desktop icons. Add aliases to hide/show all desktop icons. Enable AirDrop over Ethernet and on unsupported Macs running OS X Lion. Added HISTIGNORE to ignore certain commands in history Show indicator lights for open applications in the Dock, and don’t animate opening applications from the Dock. (These can be set through System Preferences → Dock as well.) Disable the “Are you sure you want to open this application?” dialog. Always show scrollbars. Use `NSGlobalDomain` instead of `-g`. Require password immediately after sleep or screen saver begins. (Can also be set via System Preferences → Security & Privacy → General.) Map bottom right Trackpad corner to secondary click (right-click). Add `emptytrash` alias. Add `emptytrash` alias. Show all filename extensions in Finder. (Can be set via Finder → Preferences too.) Thanks for the pointer, @Lri! https://github.com/mathiasbynens/dotfiles/issues/5#issuecomment-2162323 Allow quitting Finder via ⌘ + Q; doing so will also hide desktop icons. Enable tap to click (Trackpad). Typo. Set a blazingly fast keyboard repeat rate. Show remaining battery time; hide percentage. Automatically hide and show the Dock. Only use UTF-8 in Terminal.app. Empty Trash securely by default. Disable the warning when changing a file extension. Disable the warning before emptying the Trash. Add PlistBuddy alias, because sometimes `defaults` just doesn’t cut it. Add PlistBuddy alias, because sometimes `defaults` just doesn’t cut it. Show item info below desktop icons. Disable the Ping sidebar in iTunes. Disable Ping entirely. Use full PlistBuddy path instead of the alias, so `.osx` can be used stand-alone. Check if `tmutil` is available before using it. (It’s not available on Snow Leopard.) Only reset Launchpad when it’s actually available. Fixes #24. The fix for the UTF-8 bug in QuickLook causes problems when saving files in Adobe Illustrator CS5, so comment it out. Enable subpixel font rendering on non-Apple LCDs Minor tweaks. Fix .gitconfig formatting (use tabs instead of spaces). Typo. Add `json` function. Example usage: `json http://fronteers.nl/congres/2011/attendees.json` make it possible for bootstap.sh to be executed from wherever Undid some silly mistakes and made the script more simplerder Typo. Add a more convenient `whois` alias. Add a more convenient `whois` alias. Make the `json()` function more generic by allowing any JSON string instead of just JSON URLs. Add a link to @janmoesen’s tilde repository. Sexier file sourcing. Add .vimrc, heavily based on the one @gf3 uses. Fixes #4. Link to the issue tracker for suggestions. .vimrc: Make tabs as wide as two spaces. Looks like `IncludeDebugMenu` was replaced by `IncludeInternalDebugMenu` recently. Don’t source .bash_profile when PS1 is not set (for non-interactive shells). Stolen from @janmoesen’s https://github.com/janmoesen/tilde/blob/master/.bashrc: Use `hd` alias for canonical hex dump. Thanks, @janmoesen! Use `hd` alias for canonical hex dump. Thanks, @janmoesen! Steal some `.inputrc` goodies from @janmoesen/tilde. Steal some nifty aliases from @janmoesen/tilde. Prefer US English and use UTF-8. Use double quotes more consistently. Remove the green checkmark icons in Dropbox. Clarify Dropbox icon comment. Add `cleanup` alias, which recursively deletes `.DS_Store` files. Useful for cleaning up external HDDs after copying over some folders. Make `cleanup` list the files it deletes. Kind of like how `rm -v` works. .vimrc: add `set wildmenu` for better command-line completion. Thanks, @alrra! Removing duplicate `set mark-symlinked-directories on` settings. Removing duplicate `set mark-symlinked-directories on` settings. Add some more commands to `$HISTIGNORE`. Add a link to cowboy/dotfiles .vimrc: Centralize backups, swapfiles and undo history Move disabled QuickLook fix to the bottom Add `escape` function which escapes UTF-8 characters into their 3-byte format Example: $ escape "♥♡♥" \xE2\x99\xA5\xE2\x99\xA1\xE2\x99\xA5 $ echo -e "\xE2\x99\xA5\xE2\x99\xA1\xE2\x99\xA5" ♥♡♥ Add `unidecode` function Example: $ unidecode "\x{1D306}" 𝌆 Use tabs instead of double-space indents Allow piping to the `json` function Make `emptytrash` empty the trash for mounted external volumes too The downside is that this requires `sudo`. Closes #32. Create .vim/{backups,swaps,undo} directories if they don’t exist Allow running bootstrap.sh with a --force or -f option This avoids the confirmation prompt. Replace the `server` alias with a function that optionally takes an argument specifying the port number Inspired by @padolsey’s https://gist.github.com/1525217#gistcomment-71652. Remove old `server` alias Ref. 958517dcf4210aefffcafa3cc41f4ebb4edd5e36 `server`: Use parameter expansion instead of a fake ternary `server`: Use parameter expansion instead of a fake ternary README: Document the -f/--force option for bootstrap.sh `server` function: Set the default Content-Type to `text/plain` instead of `application/octet-stream` Hat tip to @cowboy: https://github.com/cowboy/dotfiles/blob/2874a86d207883a18e5e4c01219f9adb42d82c09/bin/serve#L26-43 `server` function: Set the default Content-Type to `text/plain` instead of `application/octet-stream` Hat tip to @cowboy: https://github.com/cowboy/dotfiles/blob/2874a86d207883a18e5e4c01219f9adb42d82c09/bin/serve#L26-43 README: Add Git-less installation instructions Closes #35. Use `tar -z` explicitly Ref. #35. Serve unknown file types as UTF-8, as suggested by @janmoesen Include .vim directory and subdirectories README: List files while untarring Better `json` function Ref. 9b0af44766d2a2cc61ae0142ac3ec9f0bed75674 `.osx`: Restart the `SystemUIServer` and suppress `kill` output. .gitignore: Add more OS-specific hidden files `server` function: Serve everything as UTF-8 Even though this is not technically correct for binary files, it doesn’t actually break anything. `server` function: Serve everything as UTF-8 Even though this is not technically correct for binary files, it doesn’t actually break anything. .osx: Enable iTunes track notifications in the Dock Screenshot: http://www.maclife.com/article/howtos/5_ways_customize_dock_terminal README: Clarify that it doesn’t matter where the repository is cloned, and document ~/.extra README: Tweak the part about ~/.extra .bash_prompt: Add screenshot URL .bash_profile: Be sure to source `.bash_prompt` first, in case it sets the PATH and subsequent dotfiles rely on it .aliases: Use `sudo` to empty local trash as well nerfing .vimrc's setrelativenumber and undodir options in case of older vim version .vimrc: Tabs, not spaces Add `urlencode` alias Via http://twatlr.com/thread/166830178226540544. Add .gvimrc and gVim-specific color scheme .aliases: Make `emptytrash` clear Apple System Logs This results in a faster shell launch. I just deleted 5.1 MB of logs and my shell startup time went from about 3 seconds to 3 milliseconds (or so it feels). Shift the '-type f' argument before the '-name' argument in `find` to make it more efficient. .vimrc: Add some goodies found in @alrra’s dotfiles .vimrc: Add some goodies found in @alrra’s dotfiles .osx: Make ⌘ + F focus the search input in iTunes Move `undopush` alias to `.gitconfig`, as suggested by @necolas Also, add some other Git aliases while we’re at it. .gitconfig: Add comments .gitconfig: Add `go` and `ca` aliases .gitattributes: Add a comment explaining what `* text=auto` does .gitconfig: Add `c` alias which clones a repository including all submodules .gitconfig: Add `d` alias .osx: Enable snap-to-grid for desktop icons Ref. #5 .osx: Enable snap-to-grid for desktop icons Ref. #5 .osx: Tweak some more hidden preferences Thanks to @Lri! Ref. #5. .bash_profile: Tweaks * Append to the Bash history file, rather than overwriting it * Autocorrect typos in path names when using `cd` README: Add @necolas and @tejr .inputrc: Don’t prompt when autocompleting unless there are over 500 possible completions See http://blog.sanctum.geek.nz/lazier-tab-completion/. .gitconfig: Use `origin` as the default remote on the `master` branch Apparently there are cases where this is not the default: http://stackoverflow.com/q/658885/96656 Hat tip to @cowboy. .osx: Disable the “reopen windows when logging back in” option .osx: Disable the “reopen windows when logging back in” option .functions: Add `gurl` function for gzip-enabled `curl` Inspired by @bluesmoon: http://twitter.com/bluesmoon/status/179982379098710017 .wgetrc: Initial commit Disclaimer: most of these settings have been stolen from @janmoesen’s extremely well-commented .wgetrc. .screenrc: Initial commit Inspired by @janmoesen’s .screenrc. .wgetrc: Remove the `iri` command It’s enabled by default on builds that support it, and setting in other builds throws an error. .wgetrc: Remove the `local_encoding` setting for now Is it possible to conditionally configure a wget setting, only if it’s supported by the current wget build? http://unix.stackexchange.com/q/34730/6040 .functions: Add `dataurl` function Based on @lri’s http://lri.me/profile. .brew: Initial commit Make .brew executable .functions: Alias `diff` to `git diff` when available .aliases: Enable sudo with aliases @janmoesen explains it here: https://github.com/janmoesen/tilde/commit/805e8117fd0fb429055d280509e14be8427c226b http://www.gnu.org/software/bash/manual/bashref.html#Aliases says: “If the last character of the alias value is a space or tab character, then the next command word following the alias is also checked for alias expansion.” .aliases: Add `update` alias Added codepoint function Added newline after codepoint .functions: Minor comment tweaks .osx: Show status bar in Finder .osx: Show status bar in Finder .osx: Copy email addresses as `foo@example.com` instead of `Foo Bar ` in Mail.app Thanks to @zmoazeni for the suggestion. .osx: Fix typo in the Dock spring loading tweak TextMate is awesome, but it would be nice to have a SublimeText alias, too. .osx: Remove the auto-hiding Dock delay .osx: Enable the debug menu in iCal and Address Book Thanks to @3vincent. See issue #5: https://github.com/mathiasbynens/dotfiles/issues/5#issuecomment-4896967 .exports: Highlight (color-code) section titles in manual pages Added default to add a spacer to the dock. .osx: Disable the “add spacer to Dock” commands by default Added line to add text selection to QuickLook Created another entry for the ability to select text when viewing a document in QuickLook .osx: Minor tweaks .osx: Group commands by type .bash_profile: Add tab completion for `killall SystemUIServer` .osx: Make Trackpad settings more robust Fixes #48. .osx: Add hot corners .osx: Cleanup .osx: Add “focus follows mouse” commands for Terminal.app and X11 apps I disabled (commented) these settings by default as I think it’s confusing that “focus follows mouse” works only for some apps. I’d rather have consistent, less confusing behavior across all apps, even if it’s not as useful. .osx: Prevent Time Machine from prompting to use new hard drives as backup volume .aliases: More generally useful shortcuts .aliases: More generally useful shortcuts .aliases: Better organization .osx: `killall` all affected apps .bash_profile: Add `killall` tab completion for common apps .brew: Add `exiv2` and `imagemagick` (disabled by default) I have some others in my `brew ls` that I’ll probably add soon. .brew: Disable `exiv2` and `imagemagick` by default .gitconfig: Make `git ca` remove deleted files, too remove dupe config from .inputrc (compare lines 7-8) Fix error thrown when Reseting Launchpad in some conditions When multiple *.db files existed in ~/Library/Application Support/Dock/ , [ -e ~/Library/Application\ Support/Dock/*.db ] would throw an error. adding screenshot location and file format .osx: Clean up after commit 5b36bee8676dc8e800f68e3a559e102dcefcae36 Icon size of 48 pixels for dock items .osx: Set the icon size of Dock items to 36 pixels Comment out change of "Open windows on startup", OSX 10.7.4 introduces this by default .osx: Remove the “disable reopen windows when logging back in” command This behavior was fixed in OS X 10.7.4, and the previous solution was a hack anyway. Maximum set volume is 7, not 10 See: http://docs.info.apple.com/article.html?path=AppleScript/2.1/en/as213.ht ml .aliases: Make `ips` show IPv6 addresses as well .gitconfig: Add `credit` alias to quickly change the author of the latest commit Inspired by @holman’s https://github.com/holman/dotfiles/blob/master/bin/git-credit. .gitconfig: Add `credit` alias to quickly change the author of the latest commit Inspired by @holman’s https://github.com/holman/dotfiles/blob/master/bin/git-credit. Update .inputrc .functions: Add `gz` function to get gzipped file size .gitconfig: Add `tags`, `branches` and `remotes` aliases .gitconfig: Show the diff when writing a commit message Thanks to @miketaylr: http://twitter.com/miketaylr/status/209688450868326400 .gitconfig: Tweak `ca` alias Thanks to @necolas! https://github.com/mathiasbynens/dotfiles/commit/15d4c9583d66be40a497706134b637e8c1f10ae6#commitcomment-1416521 .vimrc: Use the OS clipboard by default Add .hushlogin The mere presence of this file in the home directory disables the system copyright notice, the date and time of the last login, the message of the day as well as other information that may otherwise appear on login. See `man login`. .aliases: Add `....` and `.....` .aliases: Add `h` (`history`) and `j` (`jobs`) .bash_profile: Add tab completion for many more commands .vimrc: Explicitly allow the use of backspace in insert mode .vimrc: Fix typo in comment .gitignore: Ignore compiled Python files .hgignore: Initial commit .bash_profile: Load `.extra` last, allowing it to override any previous settings .bash_profile: Load `.extra` last, allowing it to override any previous settings .osx: Set language and text formats .osx: Disable “natural” (Lion-style) scrolling .osx: Fix typo .osx: Enable swipe between pages with three fingers Ref. #80. Thanks to @Lri for the help. .osx: Group commands in categories .osx: Minor formatting tweak .aliases: Update to `stat` v8.17 (GNU coreutils) .osx: Enable the debug menu in Disk Utility .osx: Enable the debug menu in Disk Utility .osx: Disable automatic termination of inactive apps .osx: Speed up Mission Control animations Note that I don’t completely disable the animation, as that results in a very unpleasant effect. .brew: Install a recent version of `grep` .brew: Install GNU core utilities (those that come with OS X are outdated) .osx: Explicitly enable swipe between pages Ref #80. README: Mention `.brew` Ref. #83. .osx: Make iTunes arrows go to your library by default (rather than the iTunes Store) .osx: Disable the iTunes arrow links completely Enable some Bash 4 features when possible: - `autocd` - Recursive globbing Remove the feature tests for Bash 4 features and just fail silently Hat tip: @svnpenn. .bash_prompt: Tweak `$PS2` .osx: Show hidden files by default in Finder I’ve had the `show` and `hide` aliases for ages, but since I use `show` as the default setting, it makes sense to include it in `.osx` as well. .vimrc: Respect modeline by default .vimrc: Enable per-directory `.vimrc` files Ref. #86. Thanks to @necolas for the suggestion. .osx: Increase sound quality for Bluetooth headphones/headsets This has the same effect as setting Bluetooth Explorer → Utilities → Special Options → Minimum bitpool to `40`. See http://scott.dier.name/2009/10/osx-snow-leopard-a2dp.html. .osx: Increase sound quality for Bluetooth headphones/headsets This has the same effect as setting Bluetooth Explorer → Utilities → Special Options → Minimum bitpool to `40`. See http://scott.dier.name/2009/10/osx-snow-leopard-a2dp.html. .brew: Install PHP 5.4 .aliases: Support colorized output for `ls` 8.17 only (GNU coreutils) .aliases: Detect which `ls` flavor is in use and use the appropriate flag for colorized output Thanks to @divya for making me do this ;) .aliases: Optimize the way we detect the `ls` flavor Follow-up to 4169a34df1783b6b0727a527b867cefecaa069b5. Thanks to @janmoesen! .aliases: Optimize the `ls` flavor detection even further Ref. #89. .osx: Hide the useless Time Machine and Volume icons Fun fact — this is what the OS X Mountain Lion menu bar looks like with all the menu extras (/System/Library/CoreServices/Menu Extras) enabled: http://i.imgur.com/DHTuw.png .osx: Hide the useless Time Machine and Volume icons Fun fact — this is what the OS X Mountain Lion menu bar looks like with all the menu extras (/System/Library/CoreServices/Menu Extras) enabled: http://i.imgur.com/DHTuw.png .osx: Comment out the line that enables the 2D Dock I’ll try out the new frost glass Mountain Lion Dock for a while. .osx: Add Twitter.app settings .aliases: Make `update` update `npm` and its installed packages as well .bash_profile: Source `~/.extra` before the other dotfiles This is needed in case `$PATH` is expanded in `~/.extra`. .osx: Show icons for hard drives, servers, and removable media on the desktop .osx: Add more Finder settings for icons on the desktop and in icon views .osx: Set computer name .osx: Don’t show Dashboard as a Space .osx: Group windows by application in Mission Control .osx: Hide Safari’s bookmarks bar by default .functions: Attempt to make `server` open the browser *after* the server has started .osx: Use the Pro theme by default in Terminal.app .osx: Enable the Develop Menu and the Web Inspector in Safari .osx: Add commented out command to disable smooth scrolling This is only really useful on older Macs that mess up the animation. .brew: Install GNU Find Utilities, `g`-prefixed Thanks to @jacobj and @olov for the suggestion. .aliases: Add `lscleanup` alias that cleans up LaunchServices This removes duplicates in the “Open With” menu. .osx: Enable HiDPI display modes without using Quartz Debug .aliases: Add `ios` alias to launch iOS Simulator .functions: Add `unquarantine` which force-removes a downloaded app or file from the quarantine Thanks to @jasomill on Hacker News: http://news.ycombinator.com/item?id=4307379. .brew: Fix typo Thanks to @oschrenk for the heads up on https://github.com/mathiasbynens/dotfiles/commit/8a79072feb638ab964f4ba6385551be4e7ae3edf#commitcomment-164452. .osx: Use a modified version of the Pro theme in Terminal.app .osx: Allow hitting the Backspace key to go to the previous page in Safari’s history .brew: Remove outdated versions from the cellar .osx: Don’t group windows by application in Mission Control This makes it use the old Exposé behavior instead. .aliases: Add `mergepdf` alias that concatenates PDF files Credit goes to Fritz Stelluto: http://blog.gotofritz.net/howto/joining-pdf-files-in-os-x-from-the-command-line/. .functions: Add `note` and `remind` `note` quickly adds a note to Notes.app, and `remind` adds a reminder to — you guessed it — Reminders.app. Both applications are available on OS X 10.8. Note that in order for `note` to work, iCloud sync must be enabled for Notes.app. .osx: Explain how to use the ⌘ + F iTunes hack with other system languages Thanks to @renaudleo for this discovery. .aliases: Make `fs` work with both GNU `stat` and OS X `stat` .osx: Add the keyboard shortcut ⌘ + Enter to send an email in Mail.app .osx: Reveal IP address, hostname, OS version, etc. when clicking the clock in the login window .osx: Ask for the administrator password upfront Use @cowboy’s `sudo` keep-alive snippet (https://gist.github.com/3118588) to continuously update the existing `sudo` time stamp until `.osx` has finished running. .osx: Kill the affected applications by their new OS X 10.8 names as well E.g. by killing both iCal and Calendar we support pre-OS X 10.8 and OS X 10.8 itself. .osx: Add a note about the iTunes track notifications in OS X 10.8 .functions: Rename `md` to `mkd` now that OS X 10.8 has an utility named `md` .osx: Remove the iTunes track notifications tweak It crashes the Dock in OS X 10.7.4 and doesn’t work in OS X 10.8 anyway. Ref. https://github.com/mathiasbynens/dotfiles/commit/45c1bced7371b93a49f884bc6fe868571fe94402#commitcomment-1671603. .osx: Add a note saying that the iCal debug menu tweak doesn’t work in OS X 10.8 Ref. #113. .osx: Update some iTunes tweaks to work with iTunes 10.6.3 Ref. #114. Thanks to @mourawaldson for the heads-up! .aliases: Use `command -v` instead of `type -t` `type -t` is not as portable (i.e., not in POSIX) as `command -v`, and `command -v` also takes aliases and functions into account. Ref. #109. .bash_profile: Source `~/.path` before and `~/.extra` after all the other dotfiles .bash_profile: Fix typo Only source `~/.extra` once. .functions: Make `dataurl` more generic .functions: Add `phpserver` Ref. #116. .bash_profile: Update `killall` Tab completion for OS X 10.8 README: Add example `~/.path` file .osx: Use list view in all Finder windows by default http://superuser.com/questions/320955/forcing-lion-finder-to-open-in-list-view#comment345957_320955 .osx: Use list view in all Finder windows by default http://superuser.com/questions/320955/forcing-lion-finder-to-open-in-list-view#comment345957_320955 bin: Add `subl` symbolic link .bash_profile: Add `~/bin` to the `$PATH` Just like before, the `$PATH` can still safely be extended by adding `~/.path`. .exports: Append `ls` with an argument to the `$HISTFILE` .osx: Set NetBIOS name .osx: Set the timezone .osx: Enable advanced image options in Disk Utility’s debug menu .osx: When performing a search, search the current folder by default in Finder .osx: Enable access for assistive devices .osx: Enable scroll to zoom .osx: Add energy saver settings .osx: Automatically illuminate built-in MacBook keyboard in low light .brew: Install Bash 4 .osx: Drop the energy saver preferences bin: Update Bash symlink .osx: Disable the Genius sidebar in iTunes .osx: Disable radio stations in iTunes .osx: Set Safari’s home page to `about:blank` .osx: Add energy saver preferences README: Credit Chris Gerke (@cgerke) README: Credit Chris Gerke (@cgerke) .osx: Automatically quit printer app once the print jobs complete .osx: Disable the crash reporter (commented) .osx: Set Help Viewer windows to non-floating mode .osx: Add TextEdit settings .osx: Add Transmission.app settings .osx: Add SizeUp.app preferences README: Credit @ptb .osx: Use `sudo` to set the NetBIOS name .osx: Use `sudo` to set the NetBIOS name .osx: Hide `systemsetup` output when setting the timezone .osx: Improve categorization .osx: Save to disk (not to iCloud) by default README: Credit Lauri .osx: Tweak formatting .aliases: Add `badge` This rings the terminal bell, and — when using Terminal.app — puts a badge on its Dock icon. Screenshot: http://i.imgur.com/OtYdu.png .osx: Prevent Safari from opening ‘safe’ files automatically after downloading Ref. #123. .functions: Optimize `dataurl` Thanks to @lri: https://github.com/fin1te/dotfiles/commit/b8ce15ee91bc8658c27599347c376c30c6bfa1e1#commitcomment-1749202 .functions: Add `fs` …and remove the `fs` alias from `.aliases`. Ref. #125. README: Link to @matijs/dotfiles instead of @matijs/homedir .aliases: Make `flush` kill `mDNSResponder` as well Ref. #126 and http://support.apple.com/kb/HT5343. .osx: Add iPhone Simulator.app to Launchpad .aliases: Remove `ios` .gitconfig: Add `reb` alias Stolen from https://github.com/porada/dotfiles/commit/05162b585b2e9cd6a92f12e1c61e1f5687104a17. .aliases: Add `gurl` for Gzip-enabled `curl` Ref. 1b3ed7a646de7a652f0596985af976a438e32aca. .osx: Check for software updates daily .osx: Enable the WebKit Developer Tools in the Mac App Store More info here: http://osxdaily.com/2011/09/07/enable-element-inspector-mac-app-store/ Ref. #129. .functions: Tweak `fs` .gitconfig: Tweak `diff` aliases .gitconfig: Explain `diff`-related aliases .osx: Correct symlink for iOS Simulator Ref. #135. .osx: Restart Dashboard .aliases: Add `dt` .aliases: Add `dt` .osx: Consistency tweaks .aliases: Alias `sha1sum` if needed Ref. #141. .aliases: Add `dl` Ref. #142. .aliases: Make `update` update Ruby gems as well .osx: Allow installing user scripts via GitHub or gists .osx: Allow installing user scripts via Userscripts.org .aliases: Make `update` run `brew cleanup` Thanks to @patrickkettner for the suggestion on Twitter: http://twitter.com/patrickkettner/statuses/254387082791903232 .osx: Add Mac App Store section - Move existing command to new section - Add debug menu command Ref. #150. README: Recommend sourcing the bootstrapper Thanks to @svnpenn and @nvartolomei in https://github.com/mathiasbynens/dotfiles/commit/a77f4872f26d681a35cface9d6bcb4ad55fec752#commitcomment-2100022, and thanks to @janmoesen for the BASH_SOURCE pointer. .osx: Add command to remove all Dock icons .bash_prompt: Use `tput setaf 0` for white Using `tput setaf 0` instead of `tput setaf 256` makes sure that `WHITE` is white instead of the previous color. Thanks to @rudolph9 for reporting this in #153. bin: Update to Bash 4.2.39 .gitconfig: Set `push.default = simple` This will be the default in Git v2. .bash_prompt: Fix `parse_git_dirty` for Git v1.8.0+ Git 1.8.0+ says “nothing to commit (working directory clean)”. Older Git versions return “nothing to commit (working directory clean)”. Thanks to @nicolahery in #143 for the suggestion. .aliases: Add `map` Ref. #157. .aliases: Add `map` Ref. #157. .functions: Make `gz` more awesome .aliases: Lowercase `com.apple.finder` Hat tip: @alrra. .osx: Show item info to the right of the icons on the desktop .functions: Add `calc` .bash_profile: Move the `LANG` & `LC_ALL` exports into `.exports` .osx: Remove the iTunes Ping settings Apple officially closed the iTunes Ping service on September 30th, 2012 (http://i.imgur.com/U7bHo.jpg). .osx: Document the various values for Hot Corners settings .osx: Clarify that the iTunes settings are for pre-iTunes 11 only README: Update Lauri Ranta’s hidden preferences URL The previous URL now 404s. bin: Update to Bash 4.2.42 .osx: Fix typo Ref. #183. .functions: Add `getcertnames` This function shows all the names (CNs and SANs) listed in the SSL certificate for a given domain. As always, improvements and other feedback is welcome! .functions: Add `getcertnames` This function shows all the names (CNs and SANs) listed in the SSL certificate for a given domain. As always, improvements and other feedback is welcome! .functions: Improve `getcertnames` Follow-up to 12bb9dac8ee7f4bcdf3e74fcbc0455a04be0211f. Many thanks to @dserodio! .osx: Tweak language settings comment Fixes #189. .osx: Show the path bar in Finder .osx: Add Notification Center value for hot corners Ref. #187. .bash_profile: Support hostname aliases defined in `~/.ssh/config` `~/.ssh/config` allows for the usage of hostname aliases, formatted as follows: Host first_alias second_alias third_alias HostName foo.example.com This change makes sure these aliases are parsed out individually and added to the autocomplete list. Ref. #178. .osx: Disable Notification Center This also removes the annoying menu bar icon. Ref. #168. Use newlines at EOF consistently .osx: Enable the MacBook Air SuperDrive on any Mac Ref. #146. .osx: Disable Dashboard Ref. #136. .osx: Configure spring loading for directories Ref. #133. .osx: Set highlight color to orange .osx: Set sidebar icon size to medium .osx: Fix typo .brew: Install Lua 5.2 I need this specific version to test the new `GotoStatement`s in Lua during http://mths.be/luamin development. .gitconfig: Remove the destructive `undopush` alias .osx: Set standby delay to 24 hours Hat tip: http://www.ewal.net/2012/09/09/slow-wake-for-macbook-pro-retina/ .osx: Set standby delay to 24 hours Hat tip: http://www.ewal.net/2012/09/09/slow-wake-for-macbook-pro-retina/ .bash_profile: Autocomplete Grunt commands Ref. https://github.com/gruntjs/grunt-cli#shell-tab-auto-completion .functions: Print trailing newlines when not piping the output Add .curlrc Closes #152. .aliases: Add `week` Thanks to @sindresorhus: https://twitter.com/sindresorhus/status/312206490880589824 .functions: Add `cdf` `cdf` changes the working directory to the top-most Finder window location. Thanks to @sindresorhus and @paulirish! .exports: Always enable colored `grep` output bootstrap.sh: Pull from the master branch explicitly .osx: Add possible values for AppleShowScrollBars Ref. #170. .osx: Add possible values for AppleShowScrollBars Ref. #170. Update shebangs If the user installs a custom Bash build, why not use it? Ref. #196 and #198. README: Add author field .functions: Add `targz` `targz some-directory` creates `some-directory.tar.gz`, where compression is handled by either `zopfli` (if available) or `gzip`. .functions: Avoid `rm` error message in `targz` when `gzip` is used .functions: Improve `targz` * Only use `zopfli` when it’s available and if the `.tar` file is smaller than 50 MB. * Use `pigz` instead of `gzip` when it’s available. * Always exclude `.DS_Store` files when creating a tarball. Closes #199. bootstrap.sh: Don’t make the home directory world-readable Fixes #159. .brew: Install native apps through homebrew-cask Closes #200. .brew: Add some more applications .osx: Update filename for Dropbox’s green checkmark icon README: Update contributors list Add @sindresorhus and @alrra because of their many contributions. Sort the list alphabetically. README: Update contributors list Add @sindresorhus and @alrra because of their many contributions. Sort the list alphabetically. README: Fix minor typo .functions: Tweak `targz` Trim the trailing slash from the path argument passed to `targz`. This fixes the annoying behavior where `targz foo/` created `foo/.tar.gz` instead of `foo.tar.gz`. Ref. #202. .gitconfig: Use `push.default = matching` I couldn’t get used to `simple`. .functions: Add `gi` This is an easy way to install Grunt plugins and add them as `devDependencies` to `package.json`. Example: gi contrib-watch contrib-uglify zopfli Closes #191. .functions: Improve `note` Give the Notes.app function the ability to add both `title` and `body`. Closes #203. .functions: Improve `httpcompression` and move it to its own file Closes #162. Dual license these dotfiles under MIT/GPL As requested by @lathan. Closes #205. .osx: Fix `ShowPathBar` typo Closes #204. .bash_profile: Try to grunt more quietly Ref. #209. .functions: Add `gitio` Closes #210. .osx: Don’t automatically rearrange Spaces Closes #213. .gitconfig: Tweak `l` alias Update to Bash v4.2.45 .osx: Update the GitHub fork link Closes #221. .osx: Update the GitHub fork link Closes #221. Remove GPL license The MIT license is GPL-compatible anyway, as per @sindresorhus. Ref. https://github.com/mathiasbynens/dotfiles/commit/a89e2f2d226de274c998b0b8de5fd4af2e0b444f#commitcomment-3485954. bootstrap.sh: Avoid `source` if there are no changes Closes #220. .aliases: Make Grunt print stack traces by default README: Tweak Git-free install command README: Tweak Git-free install command bin: Update `subl` symlink to `Sublime Text 3.app` .osx: Add Spotlight settings Closes #91 and #174. .bash_profile: Remove ‘autocomplete Grunt commands’ Closes #224. .brew: Install PHP 5.5 .gitattributes: Disable normalizing line endings globally Instead of removing `~/.gitattributes` completely, I decided to just comment out the `* text=auto` line. This makes it easier to temporarily re-enable the setting should I ever want to. Closes #149. .curlrc: Disguise as IE 9 on Windows 7 This matches the `.wgetrc` settings. .aliases: Add `timer` `timer` can be used as a stopwatch. Hat tip: https://twitter.com/tow8ie/status/360077953238962176 .gitconfig: Improve display of astral Unicode symbols in diffs Thanks to @holman for the tip: https://speakerdeck.com/holman/more-git-and-github-secrets?slide=38 .osx: Add GPGMail 2 settings http://support.gpgtools.org/kb/faq-gpgmail/gpgmail-2-hidden-settings .osx: Disable the sound effects on boot .aliases: Add `-F` to `ls` aliases Don’t do this for the default `ls`, though. Closes #234. bin: Point `subl` to the default ST3 location Sublime Text 3 does not use the `/Application/Sublime Text 3.app` folder by default. It uses `/Application/Sublime Text.app`. Closes #232. .gitconfig: Remove global remote branch This causes duplicate remotes to be created, potentially leading Git to throw errors when `push`ing. Closes #215. .gitconfig: Remove global remote branch This causes duplicate remotes to be created, potentially leading Git to throw errors when `push`ing. Closes #215. .aliases: Add `chromekill` to kill all Chrome tabs to free up memory Useful when you have a lot of tabs open (which I always do), but you don’t want to close them. Tabs in Chrome are just processes, so we just filter out the ones we want, and kill them. Closes #236. .osx: `~/.CFUserTextEncoding` can break several Adobe apps Ref. #237. .gitconfig: Add comment about `color.ui` in Git ≥ 1.8.4 Ref. #239. .gitconfig: Add note about whitespace defaults Closes #256. .functions: Add `m` to open stuff in TextMate Closes #253. .functions: Add `s` to open stuff in Sublime Text Closes #252. .functions: Add `v` to open stuff in Vim Closes #251. .bash_profile: Make sure only files get sourced Closes #250. .functions: Add `o` to `open` stuff Closes #245. Add `np` function to ease publishing node modules I use this to ease the publishing of npm modules. `np`, done ;) np = npm publish (and, `no problem`, (and `nutella party`)) Closes #261. .osx: Remove “Enable access for assistive devices” This feature doesn’t work anymore in OS X 10.9 Mavericks. The setting has moved to System Preferences → Security & Privacy → Accessibility, where you now have to check every app you want to allow access rather than enabling it globally. Closes #262. .osx: Remove “Enable access for assistive devices” This feature doesn’t work anymore in OS X 10.9 Mavericks. The setting has moved to System Preferences → Security & Privacy → Accessibility, where you now have to check every app you want to allow access rather than enabling it globally. Closes #262. .osx: Use plain text smileys in Messages Messages in OS X 10.9 Mavericks automatically substitutes e.g. `:)` with `😊`, with no way to disable this feature through the app’s preferences pane. After analyzing the `defaults read` output it turns out there is a hidden preference for it. .osx: Consistently specify the type for `dict-add` actions .functions: Add `tre` shorthand Closes #249. .osx: Disable smart quotes in Messages.app .osx: Disable continuous spell checking in Messages.app .brew: Move casks to their own file .osx: Add threaded email display settings for Mail.app .osx: Remove old iTunes commands They only applied to iTunes 10 and older anyway. .osx: Make coding style more consistent .osx: Disable inline attachments in Mail Thanks to Christophe Platteeuw via Twitter: https://twitter.com/cplatteeuw/status/393465401310318592 .osx: Disable automatic spell checking in Mail.app .osx: Stop iTunes from responding to the keyboard media keys Commented out, as I actually use these keys. Closes #265. .osx: Suppress error messages when running `~/.osx` twice Closes #266. .aliases: Improve `ips` Ref. #268 and #269. Make `.cask` executable Make `.cask` executable .osx: Minimize windows into their application’s icon Closes #271. init: Add iTerm colors Closes #274. init: Install Sublime Text settings Closes #275. .osx: Rename computer name .aliases: Lowercase `projects` dir .osx: Don’t prompt when quitting iTerm README: Update link to Lauri Ranta’s resources .osx: Add SSD-specific tweaks Source: http://forums.macrumors.com/showthread.php?t=1505922 .osx: Remove broken three-finger swipe commands If anyone knows how to make this work, please let me or @necolas know! Ref. #171. .osx: Don’t `kill` Dashboard `killall Dashboard` doesn’t actually do anything. To apply the changes for Dashboard, `killall Dock` is enough as Dock is Dashboard’s parent process. Closes #277. .aliases: Add `afk` to lock the screen Closes #258. README: Document the `.cask` file Closes #280. .osx: Disable smart quotes and dashes .aliases: Add `reload` `reload` invokes the shell as a login shell, which essentially reloads it. Closes #247. .aliases: Update RubyGems before updating installed gems Closes #282. .aliases: Add `npme` `npme` is like `npm` except it uses a registry located in Europe, causing it to be much faster for Europeans. See for more information. Closes #284. Use `Brewfile` now that Homebrew supports it https://github.com/mxcl/homebrew/blob/master/Library/Contributions/cmd/brew-bundle.rb https://coderwall.com/p/afmnbq .gitconfig: Make `git rebase` safer on OS X See . Closes #291. .aliases: Improve `lsd` Ref. #292. README: Use `Brewfile` instead of `.brew` Closes #294. .osx: Hide Safari’s sidebar in Top Sites by default Closes #296. .osx: Hide Safari’s sidebar in Top Sites by default Closes #296. .gitconfig: Add aliases to find branches/tags/commits Closes #304. bin: Make `httpcompression` prevent caching In some cases, intermediate proxies ignore the `Content-Encoding` header altogether. Sending `Cache-Control no-cache` as a request header solves this problem by forcing validation of the resources in the intermediate proxies, thereby, ensuring that every request is fetched from the origin server. Ref. alrra/dotfiles#2. Closes #308. init: Fix typo in Sublime Text settings .osx: Hide some menu bar icons in OS X 10.9 Mavericks Kudos to @kevinSuttle for finding the appropriate `plist` file! https://github.com/mathiasbynens/dotfiles/issues/305#issuecomment-30102827 Ref. #305. .osx: Delete some old commands that no longer work These commands only work on outdated versions of OS X. Ref. #305. .gitconfig: Add `dm` alias `git dm` deletes local branches that have been merged with master. Closes #309. init: Tweak Sublime Text settings .osx: Add Activity Monitor settings .osx: Add Finder ‘Get Info’ settings .osx: Display Bluetooth icon in menu bar README: Credit @kevinSuttle README: Credit @kevinSuttle .osx: Set Desktop as the default location for new Finder windows Closes #285. .aliases: Add `jsc` alias Useful for testing code in JavaScriptCore. Hat tip: https://twitter.com/RussB/status/420409644117262336 (via @rauschma) .functions: Make `np` remove `node_modules` This lets you catch cases where you forgot to add a dependency to `package.json`. Closes #321. .osx: Support multiple `systemuiserver` pref files Closes #319. .osx: Support multiple `systemuiserver` pref files Closes #319. Brewfile: Install `p7zip` (i.e. `7z` etc.) .osx: Kill `cfprefsd` after changing preferences As of OS X 10.9 this is necessary to make sure the changes persist. Closes #330. .osx: Kill `cfprefsd` after changing preferences As of OS X 10.9 this is necessary to make sure the changes persist. Closes #330. Brewfile: Install ImageMagick with WebP support .vimrc: Explicitly use the Molokai theme Brewfile: install `moreutils`, if only for `sponge` Hat tip: @chastell / http://talks.chastell.net/kodio-2014/#/21 Brewfile: install `pv` (pipe viewer) Hat tip: @chastell / http://talks.chastell.net/kodio-2014/#/39 .osx: Make Dock more transparent Closes #346. Brewfile: explicitly list non-default taps .functions: Add `a` alias for `atom` Closes #349. .osx: Remove old keyboard illumination settings These commands don’t have any effect anymore in OS X 10.9. Closes #327. .gitconfig: Explicitly disable `indent-with-non-tab` Don’t use `indent-with-non-tab`. This config flag is PERNICIOUS. If turned on, Git won’t tell you that you indented your code incorrectly. Instead, when it is pushing your changes to your remote repo, Git will silently convert any consecutive 8-space strings it sees into tab characters. This can be highly undesirable, especially if you collaborate with a team that expects the code to be indented using spaces instead of tabs. At the very least, the comment above this line should very clearly explain the fact that `indent-with-non-tab` does more than advertised in the `git-config man page (https://www.kernel.org/pub/software/scm/git/docs/git-config.html). Closes #351. .osx: Add missing value In order to properly overwrite the `key` of a `domain`, `defaults` needs to be provided with a valid `value` for the `key`: `defaults write ` Closes #350. .cask: Add Opera, Opera Developer and Opera Next Closes #348. .osx: Allow installing Chrome user scripts via GitHub Gist or Userscripts.org .osx: Change minimize/maximize window effect By default, OS X Mavericks uses the annoying `genie` effect whenever windows are minimized/maximized. This commit changes that preference and makes OS X use the more tolerable `scale` effect. Closes #355. Ref. #270. .osx: Remove “disable opening and closing window animations” Sadly, this doesn’t work anymore in OS X 10.9. Closes #270. .osx: Comment computer name settings It’s good to have these commands here as a reference, but it’s annoying when running `.osx` on multiple computers in the same network. .exports: Explicitly use UTF-8 even for `LANG` .osx: Add ExpandedStateFor* variants for OS X 10.9 Closes #361. .aliases: Use `en0` for `localip` .osx: Update iOS Simulator symlink Install casks via Caskfile `brew bundle` can now be used for casks as well. Closes #365. Install casks via Caskfile `brew bundle` can now be used for casks as well. Closes #365. Brewfile: Install GNU `sed` Brewfile: Install some more useful tools .functions: Make `gi` accept any number of arguments Closes #367. Brewfile: Install `xpdf`, if only for `pdfinfo` .osx: Don’t reset the desktop wallpaper when resetting Launchpad Files like `530142A0-6AEC-4921-A3A7-7C2B72FFF6E3.db` and `desktoppicture.db` exist in `~/Library/Application\ Support/Dock`, so let’s add a `-` with a wildcard `*` to both sides to ensure we don’t delete `desktoppicture.db` and reset the desktop wallpaper. Closes #370. Brewfile: Install `ucspi-tcp`, if only for `tcpserver` Brewfile: Install PHP 5.5 with GMP support .osx: Don’t show hidden files by default Most of the time I don’t need it, and when I do, I can temporarily enable it using the `show` alias, and revert it using the `hide` alias. Brewfile: Fix PHP 5.5 installation Thanks to @interputed for the heads up: https://github.com/mathiasbynens/dotfiles/commit/a76db30d6529e41138009fe3dc67f21ba782496e#commitcomment-6200104 Caskfile: Move `phinze/cask` to `caskroom/cask` Homebrew Cask has been moved to https://github.com/caskroom/homebrew-cask. Closes #375. Caskfile: Move `phinze/cask` to `caskroom/cask` Homebrew Cask has been moved to https://github.com/caskroom/homebrew-cask. Closes #375. .gitconfig: Make sure `go` never overrides branches Closes #357. Thanks to @yukideluxe! Brewfile: Install `hashpump` .bash_prompt: Speed up the Git commands for the prompt Fixes #227 and closes #380. .bash_profile: Enable tab completion for `git` and `g` Closes #197. .bash_profile: Enable tab completion for `git` and `g` Closes #197. Brewfile: add instructions on how to change the default shell to Bash 4 Brewfile: Install Node with npm Ref. https://github.com/Homebrew/homebrew/pull/28075. Closes #362. bootstrap.sh: Make `rsync` output numbers in a human-readable format Closes #383. Brewfile: Install BFG Repo-Cleaner .curlrc: Set connection timeout to 60 seconds This matches the setting in `.wgetrc`. Remove some things that I don’t use This commit drops some aliases, functions, and settings from the project that I wasn’t using at all. It also cleans up some of the remaining code. Remove some things that I don’t use This commit drops some aliases, functions, and settings from the project that I wasn’t using at all. It also cleans up some of the remaining code. Caskfile: Update Tor formula name Closes #388. .gitconfig: Improve configuration Closes #366. .osx: Add (commented-out) instructions on how to set the wallpaper Closes #356. .osx: Only install custom Terminal profile once Closes #336 and #337. .screenrc: Add some more settings Closes #334. .osx: Disable the Launchpad gesture Closes #316. Brewfile: Install a more recent version of `screen` Closes #295. .bash_profile: Enable Bash completion if `/etc/bash_completion` exists too This is useful on Linux. Ref. #278. .bash_profile: Enable Bash completion if `/etc/bash_completion` exists too This is useful on Linux. Ref. #278. Update Bash prompt to match the Solarized theme Screenshot: http://i.imgur.com/EkEtphC.png Enable Solarized Dark theme in Vim .gitconfig: Remove `push.default` This was causing issues on servers that don’t have an up-to-date Git installation. As a workaround, I decided to remove this from `.gitconfig` and add this to `~/.extra` for my laptop only: git config --global push.default simple .gitconfig: Tweak `diff` colors init: Use the Solarized Dark theme in Sublime Text .gitconfig: Add default Git `push.default` config Use the backwards-compatible `matching` setting by default. On machines with newer Git installations, it avoids the annoying Git warning, and it can be overriden to use `simple` instead in `~/.extra`. Closes #400. Add `.editorconfig` See . .bash_prompt: Avoid double-escaping ANSI codes Fixes #399 and closes #402. .bash_prompt: Avoid double-escaping ANSI codes Fixes #399 and closes #402. .bash_prompt: Add back escape sequences Fixes #403. .bash_prompt: Interpret escape sequences correctly in all cases Closes #407. .vimrc: Avoid creating backups when editing files in `/tmp` See http://vim.wikia.com/wiki/Editing_crontab. .aliases: Remove the now-broken `whois` alias Closes #397. .osx: Use `sudo` for `systemsetup` Closes #415. .osx: Disable the all-too-sensitive backswipe on Chrome Closes #416. Update URLs .vimrc: Treat `.md` files as Markdown `filetype` is set implicitly, without using setfiletype, because `*.md` is already associated with Modula-2 files and `setfiletype` doesn’t allow `filetype` to be set twice. `setlocal` is used to apply a new `filetype` value for each Markdown file as it is being added to the buffer. Fixes #418. Closes #419. .functions: Add SNI support in `getcertnames` Update URLs .functions: Improve `getcertnames` .gitconfig: Add alias to merge GitHub pull request Ref. https://help.github.com/articles/checking-out-pull-requests-locally Closes #422. Brewfile: add some CTF tools See https://github.com/ctfs/write-ups for more info. Brewfile: add binutils and cifer .osx: Disable transparency in the menu bar and elsewhere on Yosemite .osx: Remove a few commands that no longer have any effect in Yosemite Closes #436. .osx: Use the system-native print preview dialog in Chrome Closes #434. .aliases: Update `npm` the right way `npm install npm -g` is the new recommended way to update npm as specified in the npm-faq at https://github.com/npm/npm/blob/master/doc/misc/npm-faq.md. Closes #423. .osx: Don’t send Safari search queries to Apple .osx: Make Yosemite Safari more useful Use `brew.sh` instead of `Brewfile` Also, remove `Caskfile` since I didn’t use it. Closes #428. Use `brew.sh` instead of `Brewfile` Also, remove `Caskfile` since I didn’t use it. Closes #428. .bash_profile: Support multiple hosts in SSH completion Useful in cases such as: ``` Host vm1 vm2 vm3 vm4 Host localhost # ... ``` Simply adding a `-` to `tr` fixes this. Closes #437. .vimrc: Enable `g:solarized_termtrans` It improves the display in OS X Terminal.app. http://ethanschoonover.com/solarized/vim-colors-solarized Ref. #425. brew.sh: Use `--with-iri` for `wget` The older `--enable-iri` flag is deprecated. Closes #445. .exports: Remove `export HOMEBREW_CASK_OPTS` It’s not needed anymore now that the `Caskfile` has been removed. Closes #446. .aliases: Remove npmjs.eu reference See the deprecation notice: http://npmjs.eu/ Closes #448. .functions: Make `mkd` `cd` into the last directory in the list …rather than the first. Closes #447 and #450. brew.sh: Install Lua the new way Closes #453. .osx: Update `iOS Simulator.app` path The iOS Simulator app has been moved. Closes #452. brew.sh: Update `gnu-sed` option Closes #454. .osx: Disable Spotlight suggestions from Safari Safari has a “Spotlight Suggestions” setting that, if left enabled, will send a copy of all search queries to Apple. Closes #455. .osx: Add Yosemite’s search results for Spotlight Yosemite introduces new Spotlight search results, and if you don’t add it to `defaults write com.apple.spotlight orderedItems` it will be removed from the System Preferences → Spotlight → Search Results` list with no way to re-enable them through the System Preferences panel. Closes #456. Add .gdbinit .osx: Fix comment for menu bar items Closes #459. .osx: Use `-array` instead of `-array ""` Ref. #350. .osx: Remove “increase window resize speed” Sadly, this doesn’t work anymore in OS X 10.10. README: Tweak `~/.path` example README: Tweak `~/.path` example brew.sh: Install speedtest_cli Hat tip: @bramus – https://www.bram.us/2014/12/17/speedtest-cli/ .osx: Kill apps with `-HUP` to make sure they restart Note that a full system restart is needed after running `.osx` anyhow, but this small change improves the situation for those who don’t do that. Closes #469. .osx: Revert to plain `killall` without `-HUP` This reverts commit 07cd2632f56be58a5c1ba41a830e537e34f24e5f. Ref. #469. .gitconfig: Prevent showing files whose names contain non-ASCII symbols as unversioned http://michael-kuehnel.de/git/2014/11/21/git-mac-osx-and-german-umlaute.html Closes #460. brew.sh: Fix copy-paste typo Closes #472. .osx: Add back the “increase window resize speed” hack It didn’t work in OS X 10.10 anymore, but it seems OS X 10.10.1 does support it. Ref. 4471e2732faede1d9b242cb547de8005578b3d10. .curlrc: Remove `max-time` Don’t globally timeout cURL operations without knowing the size of the files being downloaded. Hat tip: @necolas. .exports: Set `HISTCONTROL` Omit duplicates and commands that begin with a space from history. .curlrc: Add back `connect-timeout` This was removed by mistake in 216a63328e9df1479c0f4790444afaccd16c80e5. Thanks to @alrra for spotting it! brew.sh: Install `openssh` This includes a more up-to-date `ssh` binary. brew.sh: Install font tools Thanks to @bramstein for creating these formulae! https://twitter.com/bram_stein/status/556357864038883328 bin: Point Bash symlink to `/usr/local/opt/bash/bin/bash` This is a link to whatever happens to be both in-the-cellar and linked. Ref. https://github.com/mathiasbynens/dotfiles/issues/479#issuecomment-71276285. Fixes #479. .gitconfig: Add `retag` bin: Update and improve `httpcompression` Simplify and improve the `httpcompression` script while also modifying it so that it accepts multiple URLs and checks if `cURL` is installed. Closes #491. .osx: Fix code that sets the custom terminal theme Fix the `.osx` script so that it correctly sets the custom terminal theme, and the change will be persistent. Closes #492. Install io.js & add aliases to switch to io/node * Install `io.js`. https://iojs.org/en/index.html * Add aliases to easily switch between `io.js` and `Node.js`. https://gist.github.com/phelma/ce4eeeedb8fb9a9e8e63 Install io.js & add aliases to switch to io/node * Install `io.js`. https://iojs.org/en/index.html * Add aliases to easily switch between `io.js` and `Node.js`. https://gist.github.com/phelma/ce4eeeedb8fb9a9e8e63 README: Fix @alrra’s name Closes #495. .osx: Add Spectacle.app settings Fixes #507. .osx: Disable swipe navigation in Chrome for mouse users Closes #508. brew.sh: Add `ssh-copy-id` `ssh-copy-id` allows one to easily set up passwordless SSH connections on a new machine. It does this by copying over your pubic key and setting the correct permissions. It becomes as simple as `ssh-copy-id user@hostname.example.com`. Probably safer than using manual or scripted methods. Ref. http://askubuntu.com/a/4833/42234. Closes #510. .aliases: Remove `use-iojs` and `use-node` in favor of nvm https://github.com/creationix/nvm brew.sh: Add aircrack-ng .gvimrc: Don’t blink cursor in normal mode Closes #43 and #473. .osx: Expand print dialog in Chrome & Opera by default https://github.com/mathiasbynens/dotfiles/pull/434#issuecomment-59643432 .osx: Expand print dialog in Chrome & Opera by default https://github.com/mathiasbynens/dotfiles/pull/434#issuecomment-59643432 brew.sh: Install git-lfs https://git-lfs.github.com/ brew.sh: Use bash-completion2 for improved Bash 4 completion Hat tip: @elyscape in https://github.com/mathiasbynens/dotfiles/commit/91be10dcee350465566a48cbe303686d2d989d6d#commitcomment-10654929. .osx: Update Spectacle.app keyboard shortcuts brew.sh: Install netpbm Add `--all` to `brew upgrade` Homebrew recently started to hint that everyone should update their workflows for `brew upgrade`: > brew upgrade with no arguments will change behaviour soon! It currently upgrades all formula but this will soon change to require `--all`. Please update any workflows, documentation and scripts! https://github.com/Homebrew/homebrew/commit/9032f165bec3d0c7452169093fab32578816043b Closes #531. .exports: Enable persistent REPL history for `node` This works as of io.js v2.0.0. https://github.com/iojs/io.js/blob/v2.0.0/CHANGELOG.md#2015-05-04-version-200-rvagg .gitconfig: Add `push.followTags` Thanks to @sindresorhus: https://twitter.com/sindresorhus/status/596347008975241216 .osx: Fix `/private` path Closes #529. brew.sh: Add `dark-mode` For toggling Dark Mode from the command-line. https://github.com/sindresorhus/dark-mode Closes #545. .gitconfig: Use `hexdump` to diff binary files README: Add warning Closes #530, #575, and #576. .aliases: Make `emptytrash` clear download history too See https://mths.be/bum for more details. Thanks to @nvartolomei for the suggestion in #177. .aliases: Make `emptytrash` clear download history too See https://mths.be/bum for more details. Thanks to @nvartolomei for the suggestion in #177. .exports: Add missing `export` commands Closes #585. .osx: Remove “enable text selection in Quick Look” As of OS X 10.11, it no longer has any effect. Closes #580. .exports: Update Node environment variables Thanks to @alrra for the heads up in https://github.com/mathiasbynens/dotfiles/commit/9d30bd673c72ed1cadb2720fe4fb44a8ce915a2b#commitcomment-13835031. .osx: Simplify `killall` redirection `&>` is the same as `2>&1`. Closes #589. .osx: Fix typo Fixes #592. .aliases: Enable colored `grep` output Note that `GREP_OPTIONS=--color=auto` is deprecated in GNU `grep`. Closes #467 and #590. .aliases: Enable colored `grep` output Note that `GREP_OPTIONS=--color=auto` is deprecated in GNU `grep`. Closes #467 and #590. .osx: Stop iTunes from automatically syncing connected devices Closes #593. .osx: Don’t enable “secure empty trash” This feature has been removed, sadly, so enabling has no effect anymore. https://support.apple.com/en-us/HT205267#CVE-2015-5901 Closes #596. .exports: Add `PYTHONIOENCODING` https://docs.python.org/2/using/cmdline.html#envvar-PYTHONIOENCODING .osx: Remove non-functional iTunes setting Ref. https://github.com/mathiasbynens/dotfiles/commit/cd88be0faec8b794e2ed6d145896f464125429b4#commitcomment-14145185. Thanks to @chdiza! .osx: Bypass t.co URLs in Tweetbot Hat tip: https://twitter.com/dermdaly/status/664065150329163777 .bash_prompt: Improve escape sequences Closes #598. See https://github.com/mathiasbynens/dotfiles/pull/598#issuecomment-157090316. .osx: Show only open applications in the Dock Closes #604. .gitconfig: Improve `mpr` command Change the `mpr` command so that it merges the specified pull request into the current branch¹, or if a branch name is specified², into the specified branch. ¹ git mpr ² git mpr Closes #607. .osx: Disable the over-the-top focus ring animation See http://arstechnica.com/apple/2014/10/os-x-10-10/5/ for an example. Closes #511. bin: Add Brotli and LZMA to `httpcompression` Closes #613. .osx: Prevent Photos from opening automatically Closes #608. .osx: Update Simulator paths for El Capitan Closes #616. brew.sh: Upgrade to PHP 5.6 (from 5.5) PHP 5.5 caused a segmentation fault when trying to run `arc`, the `anarcist` command. Ref. https://stackoverflow.com/a/33512066/96656. Closes #617. brew.sh: Add `testssl` https://github.com/drwetter/testssl.sh .functions: Improve `fs` Accept file names with a dash without interpreting them as a command-line flag. Found by running `shellcheck`. Closes #565. .osx: Show the `/Volumes` folder Closes #621. .bash_prompt: Improve title This will set the title of the current terminal tab to the name of the folder you are in rather than the whole path. Closes #623. .bash_prompt: Improve title This will set the title of the current terminal tab to the name of the folder you are in rather than the whole path. Closes #623. .bash_prompt: Improve terminal title Closes #625. bin: Remove `httpcompression` @alrra maintains it now. Hopefully it can be moved to its own repository and installed through npm/brew soon. See https://github.com/alrra/dotfiles/issues/18. .osx: Remove duplicate `disablelocal` setting This setting is already set under the “Time Machine” section. Closes #631. .gitconfig: Sign commits using GPG brew.sh: Install vbindiff Probably the best binary diff tool out there. brew.sh: Remove useless use of `sudo` Thanks to @jonnybarnes for spotting this. Closes #647. .bash_profile: Redirect all `which brew` output On RHEL6, `which brew` prints `/usr/bin/which: no brew in …` to stderr. Changing `> /dev/null` to `&>/dev/null` redirects both stdout and stderr to `/dev/null`, silencing the check completely. Closes #650. .functions: Update `gitio` to use HTTPS Looks like git.io recently enabled HTTPS. Because they’re now redirecting from HTTP to HTTPS the old script stopped working. Thanks to @sixertoy for spotting this: https://github.com/mathiasbynens/dotfiles/commit/4f48f250197668f2d961a71ef733b37675f810fa#commitcomment-17317282 Enable GitHub highlighting for Bash files Closes #662. Enable GitHub highlighting for Bash files Closes #662. .brew.sh: Automate switch to brew-installed Bash Closes #658. .osx: Fix ⌘ + Enter shortcut in Mail.app Removing `-string` and just passing the unescaped string value of the shortcut as a second param seems to solve the problem. Closes #603 and #661. .functions: Add file size output to `targz` Closes #670. Rename .osx to .macos Apple renamed OS X to macOS, so this repository must follow. .macos: Add some more Transmission options * Do not prompt for download confirmation on magnet links. * Activate the IP block list. Closes #679. .macos: Enable Secure Keyboard Entry in Terminal.app Closes #685. .macos: Make Safari config more robust/secure Closes #684. .macos: Auto-play videos when opened with QuickTime Player Closes #683. .macos: Extend Mac App Store configuration Closes #681. .macos: Remove `AllowBypassOfAutocompleteOff` This setting is ignored by Safari 7.0.3+. See https://discussions.apple.com/thread/6036813?start=0&tstart=0. Thanks to @chdiza for pointing this out! https://github.com/mathiasbynens/dotfiles/commit/4a4cdeab41f56cf795bf34b486fc033a54db148c#commitcomment-18177720 .macos: Fix the keyboard repeat rate command Closes #687. .aliases: Use `LSCOLORS` for BSD and `LS_COLORS` for GNU Closes #697. .aliases: Add `gem cleanup` to `update` alias This ensure that old gems are removed after `gem update`. Closes #705. .macos: Close System Preferences first Closes #706. .macos: Enable the Transmission blocklist Closes #708. .macos: Enable the Transmission blocklist Closes #708. .functions: Remove `calc` Instead, @alrra’s upstream version should be used. https://github.com/alrra/dotfiles/blob/2133bfed5d8bd2544cb3554e49657979acbb0c2f/src/shell/bash_functions#L5-L31 Hopefully it can be released as a standalone script, installable through brew or npm. Closes #703. .macos: Set keyboard repeat rate on macOS Sierra Unfortunately it seems the float trick (6b4d9617a059e3ece468e3a9150ea920cadb1fe2) no longer works in macOS Sierra. As @kirbysayshi pointed out, setting `KeyRepeat` to a float or zero value actually *disables* key repeat now (i.e. holding a key does nothing). It seems like setting it to `1` is the best we can do for now. Note that this is way slower than before. Ref. #687. .macos: Set keyboard repeat rate on macOS Sierra Unfortunately it seems the float trick (6b4d9617a059e3ece468e3a9150ea920cadb1fe2) no longer works in macOS Sierra. As @kirbysayshi pointed out, setting `KeyRepeat` to a float or zero value actually *disables* key repeat now (i.e. holding a key does nothing). It seems like setting it to `1` is the best we can do for now. Note that this is way slower than before. Ref. #687. .aliases: Update `pumpitup` According to the AppleScript reference, `set volume $NUMBER` is deprecated. https://developer.apple.com/library/content/documentation/AppleScript/Conceptual/AppleScriptLangGuide/reference/ASLR_cmds.html#//apple_ref/doc/uid/TP40000983-CH216-SW44 Closes #699. README: Update link to @tejr’s dotfiles .brew.sh: Remove pointless symlink The following is unnecessary: ln -s /usr/local/bin/gsha256sum /usr/local/bin/sha256sum …because the non-prefixed version is already in `$(brew --prefix coreutils)/libexec/gnubin`. https://github.com/Homebrew/brew/issues/1171#issuecomment-250906442 Closes #709. .macos: Keep folders on top when sorting files by name in Finder brew.sh: Remove no-op flag in `brew upgrade` The following warning message shows up when upgrading the Homebrew packages: > Warning: We decided to not change the behaviour of `brew upgrade` so `brew upgrade --all` is equivalent to `brew upgrade` without any other arguments (so the `--all` is a no-op and can be removed). Closes #710. .aliases: Add `path` Closes #718. .macos: Disable line marks in Terminal.app See https://github.com/alrra/dotfiles/issues/36. Thanks to @alrra for the suggestion! .aliases: Add `ifactive` This lists only the active network interfaces. Handy for quickly chopping down the wall-of-text that is `ifconfig`. Credit to g.rocket over at https://unix.stackexchange.com/a/108048/6040. Closes #722. .macos: Avoid creating `.DS_Store` on USB volumes Thanks to @Menubalk for the suggestion! Ref. https://github.com/mathiasbynens/dotfiles/pull/720. .macos: Remove unsupported user script settings This is sadly not possible anymore. Closes #729. --- .aliases | 157 ++++ .bash_profile | 48 + .bash_prompt | 122 +++ .bashrc | 1 + .curlrc | 8 + .editorconfig | 8 + .exports | 30 + .functions | 236 +++++ .gdbinit | 1 + .gitattributes | 3 + .gitconfig | 182 ++++ .gitignore | 14 + .gvimrc | 9 + .hgignore | 17 + .hushlogin | 4 + .inputrc | 40 + .macos | 922 +++++++++++++++++++ .osx | 1 + .screenrc | 8 + .vim/backups/.gitignore | 0 .vim/colors/solarized.vim | 969 ++++++++++++++++++++ .vim/swaps/.gitignore | 0 .vim/syntax/json.vim | 74 ++ .vim/undo/.gitignore | 0 .vimrc | 106 +++ .wgetrc | 38 + LICENSE-MIT.txt | 20 + README.md | 110 +++ bin/subl | 1 + bootstrap.sh | 27 + brew.sh | 105 +++ init/Preferences.sublime-settings | 41 + init/Solarized Dark xterm-256color.terminal | 160 ++++ init/Solarized Dark.itermcolors | 214 +++++ 34 files changed, 3676 insertions(+) create mode 100644 .aliases create mode 100644 .bash_profile create mode 100644 .bash_prompt create mode 100644 .bashrc create mode 100644 .curlrc create mode 100644 .editorconfig create mode 100644 .exports create mode 100644 .functions create mode 100644 .gdbinit create mode 100644 .gitattributes create mode 100644 .gitconfig create mode 100644 .gitignore create mode 100644 .gvimrc create mode 100644 .hgignore create mode 100644 .hushlogin create mode 100644 .inputrc create mode 100755 .macos create mode 100644 .osx create mode 100644 .screenrc create mode 100644 .vim/backups/.gitignore create mode 100644 .vim/colors/solarized.vim create mode 100644 .vim/swaps/.gitignore create mode 100644 .vim/syntax/json.vim create mode 100644 .vim/undo/.gitignore create mode 100644 .vimrc create mode 100644 .wgetrc create mode 100644 LICENSE-MIT.txt create mode 100644 README.md create mode 120000 bin/subl create mode 100755 bootstrap.sh create mode 100755 brew.sh create mode 100644 init/Preferences.sublime-settings create mode 100644 init/Solarized Dark xterm-256color.terminal create mode 100644 init/Solarized Dark.itermcolors diff --git a/.aliases b/.aliases new file mode 100644 index 0000000..16a55d8 --- /dev/null +++ b/.aliases @@ -0,0 +1,157 @@ +#!/usr/bin/env bash + +# Easier navigation: .., ..., ...., ....., ~ and - +alias ..="cd .." +alias ...="cd ../.." +alias ....="cd ../../.." +alias .....="cd ../../../.." +alias ~="cd ~" # `cd` is probably faster to type though +alias -- -="cd -" + +# Shortcuts +alias d="cd ~/Documents/Dropbox" +alias dl="cd ~/Downloads" +alias dt="cd ~/Desktop" +alias p="cd ~/projects" +alias g="git" +alias h="history" +alias j="jobs" + +# Detect which `ls` flavor is in use +if ls --color > /dev/null 2>&1; then # GNU `ls` + colorflag="--color" + export LS_COLORS='no=00:fi=00:di=01;31:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.ogg=01;35:*.mp3=01;35:*.wav=01;35:' +else # macOS `ls` + colorflag="-G" + export LSCOLORS='BxBxhxDxfxhxhxhxhxcxcx' +fi + +# List all files colorized in long format +alias l="ls -lF ${colorflag}" + +# List all files colorized in long format, including dot files +alias la="ls -laF ${colorflag}" + +# List only directories +alias lsd="ls -lF ${colorflag} | grep --color=never '^d'" + +# Always use color output for `ls` +alias ls="command ls ${colorflag}" + +# Always enable colored `grep` output +# Note: `GREP_OPTIONS="--color=auto"` is deprecated, hence the alias usage. +alias grep='grep --color=auto' +alias fgrep='fgrep --color=auto' +alias egrep='egrep --color=auto' + +# Enable aliases to be sudo’ed +alias sudo='sudo ' + +# Get week number +alias week='date +%V' + +# Stopwatch +alias timer='echo "Timer started. Stop with Ctrl-D." && date && time cat && date' + +# Get macOS Software Updates, and update installed Ruby gems, Homebrew, npm, and their installed packages +alias update='sudo softwareupdate -i -a; brew update; brew upgrade; brew cleanup; npm install npm -g; npm update -g; sudo gem update --system; sudo gem update; sudo gem cleanup' + +# IP addresses +alias ip="dig +short myip.opendns.com @resolver1.opendns.com" +alias localip="ipconfig getifaddr en0" +alias ips="ifconfig -a | grep -o 'inet6\? \(addr:\)\?\s\?\(\(\([0-9]\+\.\)\{3\}[0-9]\+\)\|[a-fA-F0-9:]\+\)' | awk '{ sub(/inet6? (addr:)? ?/, \"\"); print }'" + +# Show active network interfaces +alias ifactive="ifconfig | pcregrep -M -o '^[^\t:]+:([^\n]|\n\t)*status: active'" + +# Flush Directory Service cache +alias flush="dscacheutil -flushcache && killall -HUP mDNSResponder" + +# Clean up LaunchServices to remove duplicates in the “Open With” menu +alias lscleanup="/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user && killall Finder" + +# View HTTP traffic +alias sniff="sudo ngrep -d 'en1' -t '^(GET|POST) ' 'tcp and port 80'" +alias httpdump="sudo tcpdump -i en1 -n -s 0 -w - | grep -a -o -E \"Host\: .*|GET \/.*\"" + +# Canonical hex dump; some systems have this symlinked +command -v hd > /dev/null || alias hd="hexdump -C" + +# macOS has no `md5sum`, so use `md5` as a fallback +command -v md5sum > /dev/null || alias md5sum="md5" + +# macOS has no `sha1sum`, so use `shasum` as a fallback +command -v sha1sum > /dev/null || alias sha1sum="shasum" + +# JavaScriptCore REPL +jscbin="/System/Library/Frameworks/JavaScriptCore.framework/Versions/A/Resources/jsc"; +[ -e "${jscbin}" ] && alias jsc="${jscbin}"; +unset jscbin; + +# Trim new lines and copy to clipboard +alias c="tr -d '\n' | pbcopy" + +# Recursively delete `.DS_Store` files +alias cleanup="find . -type f -name '*.DS_Store' -ls -delete" + +# Empty the Trash on all mounted volumes and the main HDD. +# Also, clear Apple’s System Logs to improve shell startup speed. +# Finally, clear download history from quarantine. https://mths.be/bum +alias emptytrash="sudo rm -rfv /Volumes/*/.Trashes; sudo rm -rfv ~/.Trash; sudo rm -rfv /private/var/log/asl/*.asl; sqlite3 ~/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV* 'delete from LSQuarantineEvent'" + +# Show/hide hidden files in Finder +alias show="defaults write com.apple.finder AppleShowAllFiles -bool true && killall Finder" +alias hide="defaults write com.apple.finder AppleShowAllFiles -bool false && killall Finder" + +# Hide/show all desktop icons (useful when presenting) +alias hidedesktop="defaults write com.apple.finder CreateDesktop -bool false && killall Finder" +alias showdesktop="defaults write com.apple.finder CreateDesktop -bool true && killall Finder" + +# URL-encode strings +alias urlencode='python -c "import sys, urllib as ul; print ul.quote_plus(sys.argv[1]);"' + +# Merge PDF files +# Usage: `mergepdf -o output.pdf input{1,2,3}.pdf` +alias mergepdf='/System/Library/Automator/Combine\ PDF\ Pages.action/Contents/Resources/join.py' + +# Disable Spotlight +alias spotoff="sudo mdutil -a -i off" +# Enable Spotlight +alias spoton="sudo mdutil -a -i on" + +# PlistBuddy alias, because sometimes `defaults` just doesn’t cut it +alias plistbuddy="/usr/libexec/PlistBuddy" + +# Ring the terminal bell, and put a badge on Terminal.app’s Dock icon +# (useful when executing time-consuming commands) +alias badge="tput bel" + +# Intuitive map function +# For example, to list all directories that contain a certain file: +# find . -name .gitattributes | map dirname +alias map="xargs -n1" + +# One of @janmoesen’s ProTip™s +for method in GET HEAD POST PUT DELETE TRACE OPTIONS; do + alias "$method"="lwp-request -m '$method'" +done + +# Make Grunt print stack traces by default +command -v grunt > /dev/null && alias grunt="grunt --stack" + +# Stuff I never really use but cannot delete either because of http://xkcd.com/530/ +alias stfu="osascript -e 'set volume output muted true'" +alias pumpitup="osascript -e 'set volume output volume 100'" + +# Kill all the tabs in Chrome to free up memory +# [C] explained: http://www.commandlinefu.com/commands/view/402/exclude-grep-from-your-grepped-output-of-ps-alias-included-in-description +alias chromekill="ps ux | grep '[C]hrome Helper --type=renderer' | grep -v extension-process | tr -s ' ' | cut -d ' ' -f2 | xargs kill" + +# Lock the screen (when going AFK) +alias afk="/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend" + +# Reload the shell (i.e. invoke as a login shell) +alias reload="exec $SHELL -l" + +# Print each PATH entry on a separate line +alias path='echo -e ${PATH//:/\\n}' diff --git a/.bash_profile b/.bash_profile new file mode 100644 index 0000000..2971737 --- /dev/null +++ b/.bash_profile @@ -0,0 +1,48 @@ +# Add `~/bin` to the `$PATH` +export PATH="$HOME/bin:$PATH"; + +# Load the shell dotfiles, and then some: +# * ~/.path can be used to extend `$PATH`. +# * ~/.extra can be used for other settings you don’t want to commit. +for file in ~/.{path,bash_prompt,exports,aliases,functions,extra}; do + [ -r "$file" ] && [ -f "$file" ] && source "$file"; +done; +unset file; + +# Case-insensitive globbing (used in pathname expansion) +shopt -s nocaseglob; + +# Append to the Bash history file, rather than overwriting it +shopt -s histappend; + +# Autocorrect typos in path names when using `cd` +shopt -s cdspell; + +# Enable some Bash 4 features when possible: +# * `autocd`, e.g. `**/qux` will enter `./foo/bar/baz/qux` +# * Recursive globbing, e.g. `echo **/*.txt` +for option in autocd globstar; do + shopt -s "$option" 2> /dev/null; +done; + +# Add tab completion for many Bash commands +if which brew &> /dev/null && [ -f "$(brew --prefix)/share/bash-completion/bash_completion" ]; then + source "$(brew --prefix)/share/bash-completion/bash_completion"; +elif [ -f /etc/bash_completion ]; then + source /etc/bash_completion; +fi; + +# Enable tab completion for `g` by marking it as an alias for `git` +if type _git &> /dev/null && [ -f /usr/local/etc/bash_completion.d/git-completion.bash ]; then + complete -o default -o nospace -F _git g; +fi; + +# Add tab completion for SSH hostnames based on ~/.ssh/config, ignoring wildcards +[ -e "$HOME/.ssh/config" ] && complete -o "default" -o "nospace" -W "$(grep "^Host" ~/.ssh/config | grep -v "[?*]" | cut -d " " -f2- | tr ' ' '\n')" scp sftp ssh; + +# Add tab completion for `defaults read|write NSGlobalDomain` +# You could just use `-g` instead, but I like being explicit +complete -W "NSGlobalDomain" defaults; + +# Add `killall` tab completion for common apps +complete -o "nospace" -W "Contacts Calendar Dock Finder Mail Safari iTunes SystemUIServer Terminal Twitter" killall; diff --git a/.bash_prompt b/.bash_prompt new file mode 100644 index 0000000..3ff63eb --- /dev/null +++ b/.bash_prompt @@ -0,0 +1,122 @@ +#!/usr/bin/env bash + +# Shell prompt based on the Solarized Dark theme. +# Screenshot: http://i.imgur.com/EkEtphC.png +# Heavily inspired by @necolas’s prompt: https://github.com/necolas/dotfiles +# iTerm → Profiles → Text → use 13pt Monaco with 1.1 vertical spacing. + +if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then + export TERM='gnome-256color'; +elif infocmp xterm-256color >/dev/null 2>&1; then + export TERM='xterm-256color'; +fi; + +prompt_git() { + local s=''; + local branchName=''; + + # Check if the current directory is in a Git repository. + if [ $(git rev-parse --is-inside-work-tree &>/dev/null; echo "${?}") == '0' ]; then + + # check if the current directory is in .git before running git checks + if [ "$(git rev-parse --is-inside-git-dir 2> /dev/null)" == 'false' ]; then + + # Ensure the index is up to date. + git update-index --really-refresh -q &>/dev/null; + + # Check for uncommitted changes in the index. + if ! $(git diff --quiet --ignore-submodules --cached); then + s+='+'; + fi; + + # Check for unstaged changes. + if ! $(git diff-files --quiet --ignore-submodules --); then + s+='!'; + fi; + + # Check for untracked files. + if [ -n "$(git ls-files --others --exclude-standard)" ]; then + s+='?'; + fi; + + # Check for stashed files. + if $(git rev-parse --verify refs/stash &>/dev/null); then + s+='$'; + fi; + + fi; + + # Get the short symbolic ref. + # If HEAD isn’t a symbolic ref, get the short SHA for the latest commit + # Otherwise, just give up. + branchName="$(git symbolic-ref --quiet --short HEAD 2> /dev/null || \ + git rev-parse --short HEAD 2> /dev/null || \ + echo '(unknown)')"; + + [ -n "${s}" ] && s=" [${s}]"; + + echo -e "${1}${branchName}${2}${s}"; + else + return; + fi; +} + +if tput setaf 1 &> /dev/null; then + tput sgr0; # reset colors + bold=$(tput bold); + reset=$(tput sgr0); + # Solarized colors, taken from http://git.io/solarized-colors. + black=$(tput setaf 0); + blue=$(tput setaf 33); + cyan=$(tput setaf 37); + green=$(tput setaf 64); + orange=$(tput setaf 166); + purple=$(tput setaf 125); + red=$(tput setaf 124); + violet=$(tput setaf 61); + white=$(tput setaf 15); + yellow=$(tput setaf 136); +else + bold=''; + reset="\e[0m"; + black="\e[1;30m"; + blue="\e[1;34m"; + cyan="\e[1;36m"; + green="\e[1;32m"; + orange="\e[1;33m"; + purple="\e[1;35m"; + red="\e[1;31m"; + violet="\e[1;35m"; + white="\e[1;37m"; + yellow="\e[1;33m"; +fi; + +# Highlight the user name when logged in as root. +if [[ "${USER}" == "root" ]]; then + userStyle="${red}"; +else + userStyle="${orange}"; +fi; + +# Highlight the hostname when connected via SSH. +if [[ "${SSH_TTY}" ]]; then + hostStyle="${bold}${red}"; +else + hostStyle="${yellow}"; +fi; + +# Set the terminal title and prompt. +PS1="\[\033]0;\W\007\]"; # working directory base name +PS1+="\[${bold}\]\n"; # newline +PS1+="\[${userStyle}\]\u"; # username +PS1+="\[${white}\] at "; +PS1+="\[${hostStyle}\]\h"; # host +PS1+="\[${white}\] in "; +PS1+="\[${green}\]\w"; # working directory full path +PS1+="\$(prompt_git \"\[${white}\] on \[${violet}\]\" \"\[${blue}\]\")"; # Git repository details +PS1+="\n"; +PS1+="\[${white}\]\$ \[${reset}\]"; # `$` (and reset color) +export PS1; + +PS2="\[${yellow}\]→ \[${reset}\]"; +export PS2; diff --git a/.bashrc b/.bashrc new file mode 100644 index 0000000..1257002 --- /dev/null +++ b/.bashrc @@ -0,0 +1 @@ +[ -n "$PS1" ] && source ~/.bash_profile; diff --git a/.curlrc b/.curlrc new file mode 100644 index 0000000..481d94b --- /dev/null +++ b/.curlrc @@ -0,0 +1,8 @@ +# Disguise as IE 9 on Windows 7. +user-agent = "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)" + +# When following a redirect, automatically set the previous URL as referer. +referer = ";auto" + +# Wait 60 seconds before timing out. +connect-timeout = 60 diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..bec7553 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,8 @@ +root = true + +[*] +charset = utf-8 +indent_style = tab +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true diff --git a/.exports b/.exports new file mode 100644 index 0000000..adb45b1 --- /dev/null +++ b/.exports @@ -0,0 +1,30 @@ +#!/usr/bin/env bash + +# Make vim the default editor. +export EDITOR='vim'; + +# Enable persistent REPL history for `node`. +export NODE_REPL_HISTORY=~/.node_history; +# Allow 32³ entries; the default is 1000. +export NODE_REPL_HISTORY_SIZE='32768'; +# Use sloppy mode by default, matching web browsers. +export NODE_REPL_MODE='sloppy'; + +# Make Python use UTF-8 encoding for output to stdin, stdout, and stderr. +export PYTHONIOENCODING='UTF-8'; + +# Increase Bash history size. Allow 32³ entries; the default is 500. +export HISTSIZE='32768'; +export HISTFILESIZE="${HISTSIZE}"; +# Omit duplicates and commands that begin with a space from history. +export HISTCONTROL='ignoreboth'; + +# Prefer US English and use UTF-8. +export LANG='en_US.UTF-8'; +export LC_ALL='en_US.UTF-8'; + +# Highlight section titles in manual pages. +export LESS_TERMCAP_md="${yellow}"; + +# Don’t clear the screen after quitting a manual page. +export MANPAGER='less -X'; diff --git a/.functions b/.functions new file mode 100644 index 0000000..febd059 --- /dev/null +++ b/.functions @@ -0,0 +1,236 @@ +#!/usr/bin/env bash + +# Create a new directory and enter it +function mkd() { + mkdir -p "$@" && cd "$_"; +} + +# Change working directory to the top-most Finder window location +function cdf() { # short for `cdfinder` + cd "$(osascript -e 'tell app "Finder" to POSIX path of (insertion location as alias)')"; +} + +# Create a .tar.gz archive, using `zopfli`, `pigz` or `gzip` for compression +function targz() { + local tmpFile="${@%/}.tar"; + tar -cvf "${tmpFile}" --exclude=".DS_Store" "${@}" || return 1; + + size=$( + stat -f"%z" "${tmpFile}" 2> /dev/null; # macOS `stat` + stat -c"%s" "${tmpFile}" 2> /dev/null; # GNU `stat` + ); + + local cmd=""; + if (( size < 52428800 )) && hash zopfli 2> /dev/null; then + # the .tar file is smaller than 50 MB and Zopfli is available; use it + cmd="zopfli"; + else + if hash pigz 2> /dev/null; then + cmd="pigz"; + else + cmd="gzip"; + fi; + fi; + + echo "Compressing .tar ($((size / 1000)) kB) using \`${cmd}\`…"; + "${cmd}" -v "${tmpFile}" || return 1; + [ -f "${tmpFile}" ] && rm "${tmpFile}"; + + zippedSize=$( + stat -f"%z" "${tmpFile}.gz" 2> /dev/null; # macOS `stat` + stat -c"%s" "${tmpFile}.gz" 2> /dev/null; # GNU `stat` + ); + + echo "${tmpFile}.gz ($((zippedSize / 1000)) kB) created successfully."; +} + +# Determine size of a file or total size of a directory +function fs() { + if du -b /dev/null > /dev/null 2>&1; then + local arg=-sbh; + else + local arg=-sh; + fi + if [[ -n "$@" ]]; then + du $arg -- "$@"; + else + du $arg .[^.]* ./*; + fi; +} + +# Use Git’s colored diff when available +hash git &>/dev/null; +if [ $? -eq 0 ]; then + function diff() { + git diff --no-index --color-words "$@"; + } +fi; + +# Create a data URL from a file +function dataurl() { + local mimeType=$(file -b --mime-type "$1"); + if [[ $mimeType == text/* ]]; then + mimeType="${mimeType};charset=utf-8"; + fi + echo "data:${mimeType};base64,$(openssl base64 -in "$1" | tr -d '\n')"; +} + +# Create a git.io short URL +function gitio() { + if [ -z "${1}" -o -z "${2}" ]; then + echo "Usage: \`gitio slug url\`"; + return 1; + fi; + curl -i https://git.io/ -F "url=${2}" -F "code=${1}"; +} + +# Start an HTTP server from a directory, optionally specifying the port +function server() { + local port="${1:-8000}"; + sleep 1 && open "http://localhost:${port}/" & + # Set the default Content-Type to `text/plain` instead of `application/octet-stream` + # And serve everything as UTF-8 (although not technically correct, this doesn’t break anything for binary files) + python -c $'import SimpleHTTPServer;\nmap = SimpleHTTPServer.SimpleHTTPRequestHandler.extensions_map;\nmap[""] = "text/plain";\nfor key, value in map.items():\n\tmap[key] = value + ";charset=UTF-8";\nSimpleHTTPServer.test();' "$port"; +} + +# Start a PHP server from a directory, optionally specifying the port +# (Requires PHP 5.4.0+.) +function phpserver() { + local port="${1:-4000}"; + local ip=$(ipconfig getifaddr en1); + sleep 1 && open "http://${ip}:${port}/" & + php -S "${ip}:${port}"; +} + +# Compare original and gzipped file size +function gz() { + local origsize=$(wc -c < "$1"); + local gzipsize=$(gzip -c "$1" | wc -c); + local ratio=$(echo "$gzipsize * 100 / $origsize" | bc -l); + printf "orig: %d bytes\n" "$origsize"; + printf "gzip: %d bytes (%2.2f%%)\n" "$gzipsize" "$ratio"; +} + +# Syntax-highlight JSON strings or files +# Usage: `json '{"foo":42}'` or `echo '{"foo":42}' | json` +function json() { + if [ -t 0 ]; then # argument + python -mjson.tool <<< "$*" | pygmentize -l javascript; + else # pipe + python -mjson.tool | pygmentize -l javascript; + fi; +} + +# Run `dig` and display the most useful info +function digga() { + dig +nocmd "$1" any +multiline +noall +answer; +} + +# UTF-8-encode a string of Unicode symbols +function escape() { + printf "\\\x%s" $(printf "$@" | xxd -p -c1 -u); + # print a newline unless we’re piping the output to another program + if [ -t 1 ]; then + echo ""; # newline + fi; +} + +# Decode \x{ABCD}-style Unicode escape sequences +function unidecode() { + perl -e "binmode(STDOUT, ':utf8'); print \"$@\""; + # print a newline unless we’re piping the output to another program + if [ -t 1 ]; then + echo ""; # newline + fi; +} + +# Get a character’s Unicode code point +function codepoint() { + perl -e "use utf8; print sprintf('U+%04X', ord(\"$@\"))"; + # print a newline unless we’re piping the output to another program + if [ -t 1 ]; then + echo ""; # newline + fi; +} + +# Show all the names (CNs and SANs) listed in the SSL certificate +# for a given domain +function getcertnames() { + if [ -z "${1}" ]; then + echo "ERROR: No domain specified."; + return 1; + fi; + + local domain="${1}"; + echo "Testing ${domain}…"; + echo ""; # newline + + local tmp=$(echo -e "GET / HTTP/1.0\nEOT" \ + | openssl s_client -connect "${domain}:443" -servername "${domain}" 2>&1); + + if [[ "${tmp}" = *"-----BEGIN CERTIFICATE-----"* ]]; then + local certText=$(echo "${tmp}" \ + | openssl x509 -text -certopt "no_aux, no_header, no_issuer, no_pubkey, \ + no_serial, no_sigdump, no_signame, no_validity, no_version"); + echo "Common Name:"; + echo ""; # newline + echo "${certText}" | grep "Subject:" | sed -e "s/^.*CN=//" | sed -e "s/\/emailAddress=.*//"; + echo ""; # newline + echo "Subject Alternative Name(s):"; + echo ""; # newline + echo "${certText}" | grep -A 1 "Subject Alternative Name:" \ + | sed -e "2s/DNS://g" -e "s/ //g" | tr "," "\n" | tail -n +2; + return 0; + else + echo "ERROR: Certificate not found."; + return 1; + fi; +} + +# `s` with no arguments opens the current directory in Sublime Text, otherwise +# opens the given location +function s() { + if [ $# -eq 0 ]; then + subl .; + else + subl "$@"; + fi; +} + +# `a` with no arguments opens the current directory in Atom Editor, otherwise +# opens the given location +function a() { + if [ $# -eq 0 ]; then + atom .; + else + atom "$@"; + fi; +} + +# `v` with no arguments opens the current directory in Vim, otherwise opens the +# given location +function v() { + if [ $# -eq 0 ]; then + vim .; + else + vim "$@"; + fi; +} + +# `o` with no arguments opens the current directory, otherwise opens the given +# location +function o() { + if [ $# -eq 0 ]; then + open .; + else + open "$@"; + fi; +} + +# `tre` is a shorthand for `tree` with hidden files and color enabled, ignoring +# the `.git` directory, listing directories first. The output gets piped into +# `less` with options to preserve color and line numbers, unless the output is +# small enough for one screen. +function tre() { + tree -aC -I '.git|node_modules|bower_components' --dirsfirst "$@" | less -FRNX; +} diff --git a/.gdbinit b/.gdbinit new file mode 100644 index 0000000..9422460 --- /dev/null +++ b/.gdbinit @@ -0,0 +1 @@ +set disassembly-flavor intel diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..6bdc702 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,3 @@ +# Automatically normalize line endings for all text-based files +#* text=auto +# Disabled because of https://github.com/mathiasbynens/dotfiles/issues/149 :( diff --git a/.gitconfig b/.gitconfig new file mode 100644 index 0000000..0fb10f1 --- /dev/null +++ b/.gitconfig @@ -0,0 +1,182 @@ +[alias] + + # View abbreviated SHA, description, and history graph of the latest 20 commits + l = log --pretty=oneline -n 20 --graph --abbrev-commit + + # View the current working tree status using the short format + s = status -s + + # Show the diff between the latest commit and the current state + d = !"git diff-index --quiet HEAD -- || clear; git --no-pager diff --patch-with-stat" + + # `git di $number` shows the diff between the state `$number` revisions ago and the current state + di = !"d() { git diff --patch-with-stat HEAD~$1; }; git diff-index --quiet HEAD -- || clear; d" + + # Pull in remote changes for the current repository and all its submodules + p = !"git pull; git submodule foreach git pull origin master" + + # Clone a repository including all submodules + c = clone --recursive + + # Commit all changes + ca = !git add -A && git commit -av + + # Switch to a branch, creating it if necessary + go = "!f() { git checkout -b \"$1\" 2> /dev/null || git checkout \"$1\"; }; f" + + # Show verbose output about tags, branches or remotes + tags = tag -l + branches = branch -a + remotes = remote -v + + # Amend the currently staged files to the latest commit + amend = commit --amend --reuse-message=HEAD + + # Credit an author on the latest commit + credit = "!f() { git commit --amend --author \"$1 <$2>\" -C HEAD; }; f" + + # Interactive rebase with the given number of latest commits + reb = "!r() { git rebase -i HEAD~$1; }; r" + + # Remove the old tag with this name and tag the latest commit with it. + retag = "!r() { git tag -d $1 && git push origin :refs/tags/$1 && git tag $1; }; r" + + # Find branches containing commit + fb = "!f() { git branch -a --contains $1; }; f" + + # Find tags containing commit + ft = "!f() { git describe --always --contains $1; }; f" + + # Find commits by source code + fc = "!f() { git log --pretty=format:'%C(yellow)%h %Cblue%ad %Creset%s%Cgreen [%cn] %Cred%d' --decorate --date=short -S$1; }; f" + + # Find commits by commit message + fm = "!f() { git log --pretty=format:'%C(yellow)%h %Cblue%ad %Creset%s%Cgreen [%cn] %Cred%d' --decorate --date=short --grep=$1; }; f" + + # Remove branches that have already been merged with master + # a.k.a. ‘delete merged’ + dm = "!git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d" + + # List contributors with number of commits + contributors = shortlog --summary --numbered + + # Merge GitHub pull request on top of the current branch or, + # if a branch name is specified, on top of the specified branch + mpr = "!f() { \ + declare currentBranch=\"$(git symbolic-ref --short HEAD)\"; \ + declare branch=\"${2:-$currentBranch}\"; \ + if [ $(printf \"%s\" \"$1\" | grep '^[0-9]\\+$' > /dev/null; printf $?) -eq 0 ]; then \ + git fetch origin refs/pull/$1/head:pr/$1 && \ + git checkout -B $branch && \ + git rebase $branch pr/$1 && \ + git checkout -B $branch && \ + git merge pr/$1 && \ + git branch -D pr/$1 && \ + git commit --amend -m \"$(git log -1 --pretty=%B)\n\nCloses #$1.\"; \ + fi \ + }; f" + +[apply] + + # Detect whitespace errors when applying a patch + whitespace = fix + +[core] + + # Use custom `.gitignore` and `.gitattributes` + excludesfile = ~/.gitignore + attributesfile = ~/.gitattributes + + # Treat spaces before tabs and all kinds of trailing whitespace as an error + # [default] trailing-space: looks for spaces at the end of a line + # [default] space-before-tab: looks for spaces before tabs at the beginning of a line + whitespace = space-before-tab,-indent-with-non-tab,trailing-space + + # Make `git rebase` safer on macOS + # More info: + trustctime = false + + # Prevent showing files whose names contain non-ASCII symbols as unversioned. + # http://michael-kuehnel.de/git/2014/11/21/git-mac-osx-and-german-umlaute.html + precomposeunicode = false + +[color] + + # Use colors in Git commands that are capable of colored output when + # outputting to the terminal. (This is the default setting in Git ≥ 1.8.4.) + ui = auto + +[color "branch"] + + current = yellow reverse + local = yellow + remote = green + +[color "diff"] + + meta = yellow bold + frag = magenta bold # line info + old = red # deletions + new = green # additions + +[color "status"] + + added = yellow + changed = green + untracked = cyan + +[commit] + + # https://help.github.com/articles/signing-commits-using-gpg/ + gpgsign = true + +[diff] + + # Detect copies as well as renames + renames = copies + +[diff "bin"] + + # Use `hexdump` to diff binary files + textconv = hexdump -v -C + +[help] + + # Automatically correct and execute mistyped commands + autocorrect = 1 + +[merge] + + # Include summaries of merged commits in newly created merge commit messages + log = true + +[push] + + # Use the Git 1.x.x default to avoid errors on machines with old Git + # installations. To use `simple` instead, add this to your `~/.extra` file: + # `git config --global push.default simple`. See http://git.io/mMah-w. + default = matching + # Make `git push` push relevant annotated tags when pushing branches out. + followTags = true + +# URL shorthands + +[url "git@github.com:"] + + insteadOf = "gh:" + pushInsteadOf = "github:" + pushInsteadOf = "git://github.com/" + +[url "git://github.com/"] + + insteadOf = "github:" + +[url "git@gist.github.com:"] + + insteadOf = "gst:" + pushInsteadOf = "gist:" + pushInsteadOf = "git://gist.github.com/" + +[url "git://gist.github.com/"] + + insteadOf = "gist:" diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..93965b6 --- /dev/null +++ b/.gitignore @@ -0,0 +1,14 @@ +# Compiled Python files +*.pyc + +# Folder view configuration files +.DS_Store +Desktop.ini + +# Thumbnail cache files +._* +Thumbs.db + +# Files that might appear on external disks +.Spotlight-V100 +.Trashes diff --git a/.gvimrc b/.gvimrc new file mode 100644 index 0000000..d2044d0 --- /dev/null +++ b/.gvimrc @@ -0,0 +1,9 @@ +" Use the Solarized Dark theme +set background=dark +colorscheme solarized +" Use 14pt Monaco +set guifont=Monaco:h14 +" Don’t blink cursor in normal mode +set guicursor=n:blinkon0 +" Better line-height +set linespace=8 diff --git a/.hgignore b/.hgignore new file mode 100644 index 0000000..ac1973e --- /dev/null +++ b/.hgignore @@ -0,0 +1,17 @@ +# Use shell-style glob syntax +syntax: glob + +# Compiled Python files +*.pyc + +# Folder view configuration files +.DS_Store +Desktop.ini + +# Thumbnail cache files +._* +Thumbs.db + +# Files that might appear on external disks +.Spotlight-V100 +.Trashes diff --git a/.hushlogin b/.hushlogin new file mode 100644 index 0000000..bff8a51 --- /dev/null +++ b/.hushlogin @@ -0,0 +1,4 @@ +# The mere presence of this file in the home directory disables the system +# copyright notice, the date and time of the last login, the message of the +# day as well as other information that may otherwise appear on login. +# See `man login`. diff --git a/.inputrc b/.inputrc new file mode 100644 index 0000000..942281a --- /dev/null +++ b/.inputrc @@ -0,0 +1,40 @@ +# Make Tab autocomplete regardless of filename case +set completion-ignore-case on + +# List all matches in case multiple possible completions are possible +set show-all-if-ambiguous on + +# Immediately add a trailing slash when autocompleting symlinks to directories +set mark-symlinked-directories on + +# Use the text that has already been typed as the prefix for searching through +# commands (i.e. more intelligent Up/Down behavior) +"\e[B": history-search-forward +"\e[A": history-search-backward + +# Do not autocomplete hidden files unless the pattern explicitly begins with a dot +set match-hidden-files off + +# Show all autocomplete results at once +set page-completions off + +# If there are more than 200 possible completions for a word, ask to show them all +set completion-query-items 200 + +# Show extra file information when completing, like `ls -F` does +set visible-stats on + +# Be more intelligent when autocompleting by also looking at the text after +# the cursor. For example, when the current line is "cd ~/src/mozil", and +# the cursor is on the "z", pressing Tab will not autocomplete it to "cd +# ~/src/mozillail", but to "cd ~/src/mozilla". (This is supported by the +# Readline used by Bash 4.) +set skip-completed-text on + +# Allow UTF-8 input and output, instead of showing stuff like $'\0123\0456' +set input-meta on +set output-meta on +set convert-meta off + +# Use Alt/Meta + Delete to delete the preceding word +"\e[3;3~": kill-word diff --git a/.macos b/.macos new file mode 100755 index 0000000..29009c5 --- /dev/null +++ b/.macos @@ -0,0 +1,922 @@ +#!/usr/bin/env bash + +# ~/.macos — https://mths.be/macos + +# Close any open System Preferences panes, to prevent them from overriding +# settings we’re about to change +osascript -e 'tell application "System Preferences" to quit' + +# Ask for the administrator password upfront +sudo -v + +# Keep-alive: update existing `sudo` time stamp until `.macos` has finished +while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & + +############################################################################### +# General UI/UX # +############################################################################### + +# Set computer name (as done via System Preferences → Sharing) +#sudo scutil --set ComputerName "0x6D746873" +#sudo scutil --set HostName "0x6D746873" +#sudo scutil --set LocalHostName "0x6D746873" +#sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName -string "0x6D746873" + +# Set standby delay to 24 hours (default is 1 hour) +sudo pmset -a standbydelay 86400 + +# Disable the sound effects on boot +sudo nvram SystemAudioVolume=" " + +# Disable transparency in the menu bar and elsewhere on Yosemite +defaults write com.apple.universalaccess reduceTransparency -bool true + +# Menu bar: hide the Time Machine, Volume, and User icons +for domain in ~/Library/Preferences/ByHost/com.apple.systemuiserver.*; do + defaults write "${domain}" dontAutoLoad -array \ + "/System/Library/CoreServices/Menu Extras/TimeMachine.menu" \ + "/System/Library/CoreServices/Menu Extras/Volume.menu" \ + "/System/Library/CoreServices/Menu Extras/User.menu" +done +defaults write com.apple.systemuiserver menuExtras -array \ + "/System/Library/CoreServices/Menu Extras/Bluetooth.menu" \ + "/System/Library/CoreServices/Menu Extras/AirPort.menu" \ + "/System/Library/CoreServices/Menu Extras/Battery.menu" \ + "/System/Library/CoreServices/Menu Extras/Clock.menu" + +# Set highlight color to green +defaults write NSGlobalDomain AppleHighlightColor -string "0.764700 0.976500 0.568600" + +# Set sidebar icon size to medium +defaults write NSGlobalDomain NSTableViewDefaultSizeMode -int 2 + +# Always show scrollbars +defaults write NSGlobalDomain AppleShowScrollBars -string "Always" +# Possible values: `WhenScrolling`, `Automatic` and `Always` + +# Disable the over-the-top focus ring animation +defaults write NSGlobalDomain NSUseAnimatedFocusRing -bool false + +# Disable smooth scrolling +# (Uncomment if you’re on an older Mac that messes up the animation) +#defaults write NSGlobalDomain NSScrollAnimationEnabled -bool false + +# Increase window resize speed for Cocoa applications +defaults write NSGlobalDomain NSWindowResizeTime -float 0.001 + +# Expand save panel by default +defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode -bool true +defaults write NSGlobalDomain NSNavPanelExpandedStateForSaveMode2 -bool true + +# Expand print panel by default +defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true +defaults write NSGlobalDomain PMPrintingExpandedStateForPrint2 -bool true + +# Save to disk (not to iCloud) by default +defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool false + +# Automatically quit printer app once the print jobs complete +defaults write com.apple.print.PrintingPrefs "Quit When Finished" -bool true + +# Disable the “Are you sure you want to open this application?” dialog +defaults write com.apple.LaunchServices LSQuarantine -bool false + +# Remove duplicates in the “Open With” menu (also see `lscleanup` alias) +/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user + +# Display ASCII control characters using caret notation in standard text views +# Try e.g. `cd /tmp; unidecode "\x{0000}" > cc.txt; open -e cc.txt` +defaults write NSGlobalDomain NSTextShowsControlCharacters -bool true + +# Disable Resume system-wide +defaults write com.apple.systempreferences NSQuitAlwaysKeepsWindows -bool false + +# Disable automatic termination of inactive apps +defaults write NSGlobalDomain NSDisableAutomaticTermination -bool true + +# Disable the crash reporter +#defaults write com.apple.CrashReporter DialogType -string "none" + +# Set Help Viewer windows to non-floating mode +defaults write com.apple.helpviewer DevMode -bool true + +# Fix for the ancient UTF-8 bug in QuickLook (https://mths.be/bbo) +# Commented out, as this is known to cause problems in various Adobe apps :( +# See https://github.com/mathiasbynens/dotfiles/issues/237 +#echo "0x08000100:0" > ~/.CFUserTextEncoding + +# Reveal IP address, hostname, OS version, etc. when clicking the clock +# in the login window +sudo defaults write /Library/Preferences/com.apple.loginwindow AdminHostInfo HostName + +# Restart automatically if the computer freezes +sudo systemsetup -setrestartfreeze on + +# Never go into computer sleep mode +sudo systemsetup -setcomputersleep Off > /dev/null + +# Disable Notification Center and remove the menu bar icon +launchctl unload -w /System/Library/LaunchAgents/com.apple.notificationcenterui.plist 2> /dev/null + +# Disable smart quotes as they’re annoying when typing code +defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false + +# Disable smart dashes as they’re annoying when typing code +defaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool false + +# Set a custom wallpaper image. `DefaultDesktop.jpg` is already a symlink, and +# all wallpapers are in `/Library/Desktop Pictures/`. The default is `Wave.jpg`. +#rm -rf ~/Library/Application Support/Dock/desktoppicture.db +#sudo rm -rf /System/Library/CoreServices/DefaultDesktop.jpg +#sudo ln -s /path/to/your/image /System/Library/CoreServices/DefaultDesktop.jpg + +############################################################################### +# SSD-specific tweaks # +############################################################################### + +# Disable hibernation (speeds up entering sleep mode) +sudo pmset -a hibernatemode 0 + +# Remove the sleep image file to save disk space +sudo rm /private/var/vm/sleepimage +# Create a zero-byte file instead… +sudo touch /private/var/vm/sleepimage +# …and make sure it can’t be rewritten +sudo chflags uchg /private/var/vm/sleepimage + +# Disable the sudden motion sensor as it’s not useful for SSDs +sudo pmset -a sms 0 + +############################################################################### +# Trackpad, mouse, keyboard, Bluetooth accessories, and input # +############################################################################### + +# Trackpad: enable tap to click for this user and for the login screen +defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true +defaults -currentHost write NSGlobalDomain com.apple.mouse.tapBehavior -int 1 +defaults write NSGlobalDomain com.apple.mouse.tapBehavior -int 1 + +# Trackpad: map bottom right corner to right-click +defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadCornerSecondaryClick -int 2 +defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadRightClick -bool true +defaults -currentHost write NSGlobalDomain com.apple.trackpad.trackpadCornerClickBehavior -int 1 +defaults -currentHost write NSGlobalDomain com.apple.trackpad.enableSecondaryClick -bool true + +# Disable “natural” (Lion-style) scrolling +defaults write NSGlobalDomain com.apple.swipescrolldirection -bool false + +# Increase sound quality for Bluetooth headphones/headsets +defaults write com.apple.BluetoothAudioAgent "Apple Bitpool Min (editable)" -int 40 + +# Enable full keyboard access for all controls +# (e.g. enable Tab in modal dialogs) +defaults write NSGlobalDomain AppleKeyboardUIMode -int 3 + +# Use scroll gesture with the Ctrl (^) modifier key to zoom +defaults write com.apple.universalaccess closeViewScrollWheelToggle -bool true +defaults write com.apple.universalaccess HIDScrollZoomModifierMask -int 262144 +# Follow the keyboard focus while zoomed in +defaults write com.apple.universalaccess closeViewZoomFollowsFocus -bool true + +# Disable press-and-hold for keys in favor of key repeat +defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false + +# Set a blazingly fast keyboard repeat rate +defaults write NSGlobalDomain KeyRepeat -int 1 +defaults write NSGlobalDomain InitialKeyRepeat -int 10 + +# Set language and text formats +# Note: if you’re in the US, replace `EUR` with `USD`, `Centimeters` with +# `Inches`, `en_GB` with `en_US`, and `true` with `false`. +defaults write NSGlobalDomain AppleLanguages -array "en" "nl" +defaults write NSGlobalDomain AppleLocale -string "en_GB@currency=EUR" +defaults write NSGlobalDomain AppleMeasurementUnits -string "Centimeters" +defaults write NSGlobalDomain AppleMetricUnits -bool true + +# Set the timezone; see `sudo systemsetup -listtimezones` for other values +sudo systemsetup -settimezone "Europe/Brussels" > /dev/null + +# Disable auto-correct +defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false + +# Stop iTunes from responding to the keyboard media keys +#launchctl unload -w /System/Library/LaunchAgents/com.apple.rcd.plist 2> /dev/null + +############################################################################### +# Screen # +############################################################################### + +# Require password immediately after sleep or screen saver begins +defaults write com.apple.screensaver askForPassword -int 1 +defaults write com.apple.screensaver askForPasswordDelay -int 0 + +# Save screenshots to the desktop +defaults write com.apple.screencapture location -string "${HOME}/Desktop" + +# Save screenshots in PNG format (other options: BMP, GIF, JPG, PDF, TIFF) +defaults write com.apple.screencapture type -string "png" + +# Disable shadow in screenshots +defaults write com.apple.screencapture disable-shadow -bool true + +# Enable subpixel font rendering on non-Apple LCDs +defaults write NSGlobalDomain AppleFontSmoothing -int 2 + +# Enable HiDPI display modes (requires restart) +sudo defaults write /Library/Preferences/com.apple.windowserver DisplayResolutionEnabled -bool true + +############################################################################### +# Finder # +############################################################################### + +# Finder: allow quitting via ⌘ + Q; doing so will also hide desktop icons +defaults write com.apple.finder QuitMenuItem -bool true + +# Finder: disable window animations and Get Info animations +defaults write com.apple.finder DisableAllAnimations -bool true + +# Set Desktop as the default location for new Finder windows +# For other paths, use `PfLo` and `file:///full/path/here/` +defaults write com.apple.finder NewWindowTarget -string "PfDe" +defaults write com.apple.finder NewWindowTargetPath -string "file://${HOME}/Desktop/" + +# Show icons for hard drives, servers, and removable media on the desktop +defaults write com.apple.finder ShowExternalHardDrivesOnDesktop -bool true +defaults write com.apple.finder ShowHardDrivesOnDesktop -bool true +defaults write com.apple.finder ShowMountedServersOnDesktop -bool true +defaults write com.apple.finder ShowRemovableMediaOnDesktop -bool true + +# Finder: show hidden files by default +#defaults write com.apple.finder AppleShowAllFiles -bool true + +# Finder: show all filename extensions +defaults write NSGlobalDomain AppleShowAllExtensions -bool true + +# Finder: show status bar +defaults write com.apple.finder ShowStatusBar -bool true + +# Finder: show path bar +defaults write com.apple.finder ShowPathbar -bool true + +# Display full POSIX path as Finder window title +defaults write com.apple.finder _FXShowPosixPathInTitle -bool true + +# Keep folders on top when sorting by name +defaults write com.apple.finder _FXSortFoldersFirst -bool true + +# When performing a search, search the current folder by default +defaults write com.apple.finder FXDefaultSearchScope -string "SCcf" + +# Disable the warning when changing a file extension +defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false + +# Enable spring loading for directories +defaults write NSGlobalDomain com.apple.springing.enabled -bool true + +# Remove the spring loading delay for directories +defaults write NSGlobalDomain com.apple.springing.delay -float 0 + +# Avoid creating .DS_Store files on network or USB volumes +defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true +defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true + +# Disable disk image verification +defaults write com.apple.frameworks.diskimages skip-verify -bool true +defaults write com.apple.frameworks.diskimages skip-verify-locked -bool true +defaults write com.apple.frameworks.diskimages skip-verify-remote -bool true + +# Automatically open a new Finder window when a volume is mounted +defaults write com.apple.frameworks.diskimages auto-open-ro-root -bool true +defaults write com.apple.frameworks.diskimages auto-open-rw-root -bool true +defaults write com.apple.finder OpenWindowForNewRemovableDisk -bool true + +# Show item info near icons on the desktop and in other icon views +/usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:showItemInfo true" ~/Library/Preferences/com.apple.finder.plist +/usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:showItemInfo true" ~/Library/Preferences/com.apple.finder.plist +/usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:showItemInfo true" ~/Library/Preferences/com.apple.finder.plist + +# Show item info to the right of the icons on the desktop +/usr/libexec/PlistBuddy -c "Set DesktopViewSettings:IconViewSettings:labelOnBottom false" ~/Library/Preferences/com.apple.finder.plist + +# Enable snap-to-grid for icons on the desktop and in other icon views +/usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist +/usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist +/usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:arrangeBy grid" ~/Library/Preferences/com.apple.finder.plist + +# Increase grid spacing for icons on the desktop and in other icon views +/usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:gridSpacing 100" ~/Library/Preferences/com.apple.finder.plist +/usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:gridSpacing 100" ~/Library/Preferences/com.apple.finder.plist +/usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:gridSpacing 100" ~/Library/Preferences/com.apple.finder.plist + +# Increase the size of icons on the desktop and in other icon views +/usr/libexec/PlistBuddy -c "Set :DesktopViewSettings:IconViewSettings:iconSize 80" ~/Library/Preferences/com.apple.finder.plist +/usr/libexec/PlistBuddy -c "Set :FK_StandardViewSettings:IconViewSettings:iconSize 80" ~/Library/Preferences/com.apple.finder.plist +/usr/libexec/PlistBuddy -c "Set :StandardViewSettings:IconViewSettings:iconSize 80" ~/Library/Preferences/com.apple.finder.plist + +# Use list view in all Finder windows by default +# Four-letter codes for the other view modes: `icnv`, `clmv`, `Flwv` +defaults write com.apple.finder FXPreferredViewStyle -string "Nlsv" + +# Disable the warning before emptying the Trash +defaults write com.apple.finder WarnOnEmptyTrash -bool false + +# Enable AirDrop over Ethernet and on unsupported Macs running Lion +defaults write com.apple.NetworkBrowser BrowseAllInterfaces -bool true + +# Enable the MacBook Air SuperDrive on any Mac +sudo nvram boot-args="mbasd=1" + +# Show the ~/Library folder +chflags nohidden ~/Library + +# Show the /Volumes folder +sudo chflags nohidden /Volumes + +# Remove Dropbox’s green checkmark icons in Finder +file=/Applications/Dropbox.app/Contents/Resources/emblem-dropbox-uptodate.icns +[ -e "${file}" ] && mv -f "${file}" "${file}.bak" + +# Expand the following File Info panes: +# “General”, “Open with”, and “Sharing & Permissions” +defaults write com.apple.finder FXInfoPanesExpanded -dict \ + General -bool true \ + OpenWith -bool true \ + Privileges -bool true + +############################################################################### +# Dock, Dashboard, and hot corners # +############################################################################### + +# Enable highlight hover effect for the grid view of a stack (Dock) +defaults write com.apple.dock mouse-over-hilite-stack -bool true + +# Set the icon size of Dock items to 36 pixels +defaults write com.apple.dock tilesize -int 36 + +# Change minimize/maximize window effect +defaults write com.apple.dock mineffect -string "scale" + +# Minimize windows into their application’s icon +defaults write com.apple.dock minimize-to-application -bool true + +# Enable spring loading for all Dock items +defaults write com.apple.dock enable-spring-load-actions-on-all-items -bool true + +# Show indicator lights for open applications in the Dock +defaults write com.apple.dock show-process-indicators -bool true + +# Wipe all (default) app icons from the Dock +# This is only really useful when setting up a new Mac, or if you don’t use +# the Dock to launch apps. +#defaults write com.apple.dock persistent-apps -array + +# Show only open applications in the Dock +#defaults write com.apple.dock static-only -bool true + +# Don’t animate opening applications from the Dock +defaults write com.apple.dock launchanim -bool false + +# Speed up Mission Control animations +defaults write com.apple.dock expose-animation-duration -float 0.1 + +# Don’t group windows by application in Mission Control +# (i.e. use the old Exposé behavior instead) +defaults write com.apple.dock expose-group-by-app -bool false + +# Disable Dashboard +defaults write com.apple.dashboard mcx-disabled -bool true + +# Don’t show Dashboard as a Space +defaults write com.apple.dock dashboard-in-overlay -bool true + +# Don’t automatically rearrange Spaces based on most recent use +defaults write com.apple.dock mru-spaces -bool false + +# Remove the auto-hiding Dock delay +defaults write com.apple.dock autohide-delay -float 0 +# Remove the animation when hiding/showing the Dock +defaults write com.apple.dock autohide-time-modifier -float 0 + +# Automatically hide and show the Dock +defaults write com.apple.dock autohide -bool true + +# Make Dock icons of hidden applications translucent +defaults write com.apple.dock showhidden -bool true + +# Disable the Launchpad gesture (pinch with thumb and three fingers) +#defaults write com.apple.dock showLaunchpadGestureEnabled -int 0 + +# Reset Launchpad, but keep the desktop wallpaper intact +find "${HOME}/Library/Application Support/Dock" -name "*-*.db" -maxdepth 1 -delete + +# Add iOS & Watch Simulator to Launchpad +sudo ln -sf "/Applications/Xcode.app/Contents/Developer/Applications/Simulator.app" "/Applications/Simulator.app" +sudo ln -sf "/Applications/Xcode.app/Contents/Developer/Applications/Simulator (Watch).app" "/Applications/Simulator (Watch).app" + +# Add a spacer to the left side of the Dock (where the applications are) +#defaults write com.apple.dock persistent-apps -array-add '{tile-data={}; tile-type="spacer-tile";}' +# Add a spacer to the right side of the Dock (where the Trash is) +#defaults write com.apple.dock persistent-others -array-add '{tile-data={}; tile-type="spacer-tile";}' + +# Hot corners +# Possible values: +# 0: no-op +# 2: Mission Control +# 3: Show application windows +# 4: Desktop +# 5: Start screen saver +# 6: Disable screen saver +# 7: Dashboard +# 10: Put display to sleep +# 11: Launchpad +# 12: Notification Center +# Top left screen corner → Mission Control +defaults write com.apple.dock wvous-tl-corner -int 2 +defaults write com.apple.dock wvous-tl-modifier -int 0 +# Top right screen corner → Desktop +defaults write com.apple.dock wvous-tr-corner -int 4 +defaults write com.apple.dock wvous-tr-modifier -int 0 +# Bottom left screen corner → Start screen saver +defaults write com.apple.dock wvous-bl-corner -int 5 +defaults write com.apple.dock wvous-bl-modifier -int 0 + +############################################################################### +# Safari & WebKit # +############################################################################### + +# Privacy: don’t send search queries to Apple +defaults write com.apple.Safari UniversalSearchEnabled -bool false +defaults write com.apple.Safari SuppressSearchSuggestions -bool true + +# Press Tab to highlight each item on a web page +defaults write com.apple.Safari WebKitTabToLinksPreferenceKey -bool true +defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2TabsToLinks -bool true + +# Show the full URL in the address bar (note: this still hides the scheme) +defaults write com.apple.Safari ShowFullURLInSmartSearchField -bool true + +# Set Safari’s home page to `about:blank` for faster loading +defaults write com.apple.Safari HomePage -string "about:blank" + +# Prevent Safari from opening ‘safe’ files automatically after downloading +defaults write com.apple.Safari AutoOpenSafeDownloads -bool false + +# Allow hitting the Backspace key to go to the previous page in history +defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2BackspaceKeyNavigationEnabled -bool true + +# Hide Safari’s bookmarks bar by default +defaults write com.apple.Safari ShowFavoritesBar -bool false + +# Hide Safari’s sidebar in Top Sites +defaults write com.apple.Safari ShowSidebarInTopSites -bool false + +# Disable Safari’s thumbnail cache for History and Top Sites +defaults write com.apple.Safari DebugSnapshotsUpdatePolicy -int 2 + +# Enable Safari’s debug menu +defaults write com.apple.Safari IncludeInternalDebugMenu -bool true + +# Make Safari’s search banners default to Contains instead of Starts With +defaults write com.apple.Safari FindOnPageMatchesWordStartsOnly -bool false + +# Remove useless icons from Safari’s bookmarks bar +defaults write com.apple.Safari ProxiesInBookmarksBar "()" + +# Enable the Develop menu and the Web Inspector in Safari +defaults write com.apple.Safari IncludeDevelopMenu -bool true +defaults write com.apple.Safari WebKitDeveloperExtrasEnabledPreferenceKey -bool true +defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2DeveloperExtrasEnabled -bool true + +# Add a context menu item for showing the Web Inspector in web views +defaults write NSGlobalDomain WebKitDeveloperExtras -bool true + +# Enable continuous spellchecking +defaults write com.apple.Safari WebContinuousSpellCheckingEnabled -bool true +# Disable auto-correct +defaults write com.apple.Safari WebAutomaticSpellingCorrectionEnabled -bool false + +# Disable AutoFill +defaults write com.apple.Safari AutoFillFromAddressBook -bool false +defaults write com.apple.Safari AutoFillPasswords -bool false +defaults write com.apple.Safari AutoFillCreditCardData -bool false +defaults write com.apple.Safari AutoFillMiscellaneousForms -bool false + +# Warn about fraudulent websites +defaults write com.apple.Safari WarnAboutFraudulentWebsites -bool true + +# Disable plug-ins +defaults write com.apple.Safari WebKitPluginsEnabled -bool false +defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2PluginsEnabled -bool false + +# Disable Java +defaults write com.apple.Safari WebKitJavaEnabled -bool false +defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2JavaEnabled -bool false + +# Block pop-up windows +defaults write com.apple.Safari WebKitJavaScriptCanOpenWindowsAutomatically -bool false +defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2JavaScriptCanOpenWindowsAutomatically -bool false + +# Enable “Do Not Track” +defaults write com.apple.Safari SendDoNotTrackHTTPHeader -bool true + +# Update extensions automatically +defaults write com.apple.Safari InstallExtensionUpdatesAutomatically -bool true + +############################################################################### +# Mail # +############################################################################### + +# Disable send and reply animations in Mail.app +defaults write com.apple.mail DisableReplyAnimations -bool true +defaults write com.apple.mail DisableSendAnimations -bool true + +# Copy email addresses as `foo@example.com` instead of `Foo Bar ` in Mail.app +defaults write com.apple.mail AddressesIncludeNameOnPasteboard -bool false + +# Add the keyboard shortcut ⌘ + Enter to send an email in Mail.app +defaults write com.apple.mail NSUserKeyEquivalents -dict-add "Send" "@\U21a9" + +# Display emails in threaded mode, sorted by date (oldest at the top) +defaults write com.apple.mail DraftsViewerAttributes -dict-add "DisplayInThreadedMode" -string "yes" +defaults write com.apple.mail DraftsViewerAttributes -dict-add "SortedDescending" -string "yes" +defaults write com.apple.mail DraftsViewerAttributes -dict-add "SortOrder" -string "received-date" + +# Disable inline attachments (just show the icons) +defaults write com.apple.mail DisableInlineAttachmentViewing -bool true + +# Disable automatic spell checking +defaults write com.apple.mail SpellCheckingBehavior -string "NoSpellCheckingEnabled" + +############################################################################### +# Spotlight # +############################################################################### + +# Hide Spotlight tray-icon (and subsequent helper) +#sudo chmod 600 /System/Library/CoreServices/Search.bundle/Contents/MacOS/Search +# Disable Spotlight indexing for any volume that gets mounted and has not yet +# been indexed before. +# Use `sudo mdutil -i off "/Volumes/foo"` to stop indexing any volume. +sudo defaults write /.Spotlight-V100/VolumeConfiguration Exclusions -array "/Volumes" +# Change indexing order and disable some search results +# Yosemite-specific search results (remove them if you are using macOS 10.9 or older): +# MENU_DEFINITION +# MENU_CONVERSION +# MENU_EXPRESSION +# MENU_SPOTLIGHT_SUGGESTIONS (send search queries to Apple) +# MENU_WEBSEARCH (send search queries to Apple) +# MENU_OTHER +defaults write com.apple.spotlight orderedItems -array \ + '{"enabled" = 1;"name" = "APPLICATIONS";}' \ + '{"enabled" = 1;"name" = "SYSTEM_PREFS";}' \ + '{"enabled" = 1;"name" = "DIRECTORIES";}' \ + '{"enabled" = 1;"name" = "PDF";}' \ + '{"enabled" = 1;"name" = "FONTS";}' \ + '{"enabled" = 0;"name" = "DOCUMENTS";}' \ + '{"enabled" = 0;"name" = "MESSAGES";}' \ + '{"enabled" = 0;"name" = "CONTACT";}' \ + '{"enabled" = 0;"name" = "EVENT_TODO";}' \ + '{"enabled" = 0;"name" = "IMAGES";}' \ + '{"enabled" = 0;"name" = "BOOKMARKS";}' \ + '{"enabled" = 0;"name" = "MUSIC";}' \ + '{"enabled" = 0;"name" = "MOVIES";}' \ + '{"enabled" = 0;"name" = "PRESENTATIONS";}' \ + '{"enabled" = 0;"name" = "SPREADSHEETS";}' \ + '{"enabled" = 0;"name" = "SOURCE";}' \ + '{"enabled" = 0;"name" = "MENU_DEFINITION";}' \ + '{"enabled" = 0;"name" = "MENU_OTHER";}' \ + '{"enabled" = 0;"name" = "MENU_CONVERSION";}' \ + '{"enabled" = 0;"name" = "MENU_EXPRESSION";}' \ + '{"enabled" = 0;"name" = "MENU_WEBSEARCH";}' \ + '{"enabled" = 0;"name" = "MENU_SPOTLIGHT_SUGGESTIONS";}' +# Load new settings before rebuilding the index +killall mds > /dev/null 2>&1 +# Make sure indexing is enabled for the main volume +sudo mdutil -i on / > /dev/null +# Rebuild the index from scratch +sudo mdutil -E / > /dev/null + +############################################################################### +# Terminal & iTerm 2 # +############################################################################### + +# Only use UTF-8 in Terminal.app +defaults write com.apple.terminal StringEncodings -array 4 + +# Use a modified version of the Solarized Dark theme by default in Terminal.app +osascript < /dev/null && sudo tmutil disablelocal + +############################################################################### +# Activity Monitor # +############################################################################### + +# Show the main window when launching Activity Monitor +defaults write com.apple.ActivityMonitor OpenMainWindow -bool true + +# Visualize CPU usage in the Activity Monitor Dock icon +defaults write com.apple.ActivityMonitor IconType -int 5 + +# Show all processes in Activity Monitor +defaults write com.apple.ActivityMonitor ShowCategory -int 0 + +# Sort Activity Monitor results by CPU usage +defaults write com.apple.ActivityMonitor SortColumn -string "CPUUsage" +defaults write com.apple.ActivityMonitor SortDirection -int 0 + +############################################################################### +# Address Book, Dashboard, iCal, TextEdit, and Disk Utility # +############################################################################### + +# Enable the debug menu in Address Book +defaults write com.apple.addressbook ABShowDebugMenu -bool true + +# Enable Dashboard dev mode (allows keeping widgets on the desktop) +defaults write com.apple.dashboard devmode -bool true + +# Enable the debug menu in iCal (pre-10.8) +defaults write com.apple.iCal IncludeDebugMenu -bool true + +# Use plain text mode for new TextEdit documents +defaults write com.apple.TextEdit RichText -int 0 +# Open and save files as UTF-8 in TextEdit +defaults write com.apple.TextEdit PlainTextEncoding -int 4 +defaults write com.apple.TextEdit PlainTextEncodingForWrite -int 4 + +# Enable the debug menu in Disk Utility +defaults write com.apple.DiskUtility DUDebugMenuEnabled -bool true +defaults write com.apple.DiskUtility advanced-image-options -bool true + +# Auto-play videos when opened with QuickTime Player +defaults write com.apple.QuickTimePlayerX MGPlayMovieOnOpen -bool true + +############################################################################### +# Mac App Store # +############################################################################### + +# Enable the WebKit Developer Tools in the Mac App Store +defaults write com.apple.appstore WebKitDeveloperExtras -bool true + +# Enable Debug Menu in the Mac App Store +defaults write com.apple.appstore ShowDebugMenu -bool true + +# Enable the automatic update check +defaults write com.apple.SoftwareUpdate AutomaticCheckEnabled -bool true + +# Check for software updates daily, not just once per week +defaults write com.apple.SoftwareUpdate ScheduleFrequency -int 1 + +# Download newly available updates in background +defaults write com.apple.SoftwareUpdate AutomaticDownload -int 1 + +# Install System data files & security updates +defaults write com.apple.SoftwareUpdate CriticalUpdateInstall -int 1 + +# Automatically download apps purchased on other Macs +defaults write com.apple.SoftwareUpdate ConfigDataInstall -int 1 + +# Turn on app auto-update +defaults write com.apple.commerce AutoUpdate -bool true + +# Allow the App Store to reboot machine on macOS updates +defaults write com.apple.commerce AutoUpdateRestartRequired -bool true + +############################################################################### +# Photos # +############################################################################### + +# Prevent Photos from opening automatically when devices are plugged in +defaults -currentHost write com.apple.ImageCapture disableHotPlug -bool true + +############################################################################### +# Messages # +############################################################################### + +# Disable automatic emoji substitution (i.e. use plain text smileys) +defaults write com.apple.messageshelper.MessageController SOInputLineSettings -dict-add "automaticEmojiSubstitutionEnablediMessage" -bool false + +# Disable smart quotes as it’s annoying for messages that contain code +defaults write com.apple.messageshelper.MessageController SOInputLineSettings -dict-add "automaticQuoteSubstitutionEnabled" -bool false + +# Disable continuous spell checking +defaults write com.apple.messageshelper.MessageController SOInputLineSettings -dict-add "continuousSpellCheckingEnabled" -bool false + +############################################################################### +# Google Chrome & Google Chrome Canary # +############################################################################### + +# Disable the all too sensitive backswipe on trackpads +defaults write com.google.Chrome AppleEnableSwipeNavigateWithScrolls -bool false +defaults write com.google.Chrome.canary AppleEnableSwipeNavigateWithScrolls -bool false + +# Disable the all too sensitive backswipe on Magic Mouse +defaults write com.google.Chrome AppleEnableMouseSwipeNavigateWithScrolls -bool false +defaults write com.google.Chrome.canary AppleEnableMouseSwipeNavigateWithScrolls -bool false + +# Use the system-native print preview dialog +defaults write com.google.Chrome DisablePrintPreview -bool true +defaults write com.google.Chrome.canary DisablePrintPreview -bool true + +# Expand the print dialog by default +defaults write com.google.Chrome PMPrintingExpandedStateForPrint2 -bool true +defaults write com.google.Chrome.canary PMPrintingExpandedStateForPrint2 -bool true + +############################################################################### +# GPGMail 2 # +############################################################################### + +# Disable signing emails by default +defaults write ~/Library/Preferences/org.gpgtools.gpgmail SignNewEmailsByDefault -bool false + +############################################################################### +# Opera & Opera Developer # +############################################################################### + +# Expand the print dialog by default +defaults write com.operasoftware.Opera PMPrintingExpandedStateForPrint2 -boolean true +defaults write com.operasoftware.OperaDeveloper PMPrintingExpandedStateForPrint2 -boolean true + +############################################################################### +# SizeUp.app # +############################################################################### + +# Start SizeUp at login +defaults write com.irradiatedsoftware.SizeUp StartAtLogin -bool true + +# Don’t show the preferences window on next start +defaults write com.irradiatedsoftware.SizeUp ShowPrefsOnNextStart -bool false + +############################################################################### +# Sublime Text # +############################################################################### + +# Install Sublime Text settings +cp -r init/Preferences.sublime-settings ~/Library/Application\ Support/Sublime\ Text*/Packages/User/Preferences.sublime-settings 2> /dev/null + +############################################################################### +# Transmission.app # +############################################################################### + +# Use `~/Documents/Torrents` to store incomplete downloads +defaults write org.m0k.transmission UseIncompleteDownloadFolder -bool true +defaults write org.m0k.transmission IncompleteDownloadFolder -string "${HOME}/Documents/Torrents" + +# Don’t prompt for confirmation before downloading +defaults write org.m0k.transmission DownloadAsk -bool false +defaults write org.m0k.transmission MagnetOpenAsk -bool false + +# Trash original torrent files +defaults write org.m0k.transmission DeleteOriginalTorrent -bool true + +# Hide the donate message +defaults write org.m0k.transmission WarningDonate -bool false +# Hide the legal disclaimer +defaults write org.m0k.transmission WarningLegal -bool false + +# IP block list. +# Source: https://giuliomac.wordpress.com/2014/02/19/best-blocklist-for-transmission/ +defaults write org.m0k.transmission BlocklistNew -bool true +defaults write org.m0k.transmission BlocklistURL -string "http://john.bitsurge.net/public/biglist.p2p.gz" +defaults write org.m0k.transmission BlocklistAutoUpdate -bool true + +############################################################################### +# Twitter.app # +############################################################################### + +# Disable smart quotes as it’s annoying for code tweets +defaults write com.twitter.twitter-mac AutomaticQuoteSubstitutionEnabled -bool false + +# Show the app window when clicking the menu bar icon +defaults write com.twitter.twitter-mac MenuItemBehavior -int 1 + +# Enable the hidden ‘Develop’ menu +defaults write com.twitter.twitter-mac ShowDevelopMenu -bool true + +# Open links in the background +defaults write com.twitter.twitter-mac openLinksInBackground -bool true + +# Allow closing the ‘new tweet’ window by pressing `Esc` +defaults write com.twitter.twitter-mac ESCClosesComposeWindow -bool true + +# Show full names rather than Twitter handles +defaults write com.twitter.twitter-mac ShowFullNames -bool true + +# Hide the app in the background if it’s not the front-most window +defaults write com.twitter.twitter-mac HideInBackground -bool true + +############################################################################### +# Tweetbot.app # +############################################################################### + +# Bypass the annoyingly slow t.co URL shortener +defaults write com.tapbots.TweetbotMac OpenURLsDirectly -bool true + +############################################################################### +# Spectacle.app # +############################################################################### + +# Set up my preferred keyboard shortcuts +defaults write com.divisiblebyzero.Spectacle MakeLarger -data 62706c6973743030d40102030405061819582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a40708101155246e756c6cd4090a0b0c0d0e0d0f596d6f64696669657273546e616d65576b6579436f64655624636c6173731000800280035a4d616b654c6172676572d2121314155a24636c6173736e616d655824636c6173736573585a4b486f744b6579a21617585a4b486f744b6579584e534f626a6563745f100f4e534b657965644172636869766572d11a1b54726f6f74800108111a232d32373c424b555a62696b6d6f7a7f8a939c9fa8b1c3c6cb0000000000000101000000000000001c000000000000000000000000000000cd +defaults write com.divisiblebyzero.Spectacle MakeSmaller -data 62706c6973743030d40102030405061819582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a40708101155246e756c6cd4090a0b0c0d0e0d0f596d6f64696669657273546e616d65576b6579436f64655624636c6173731000800280035b4d616b65536d616c6c6572d2121314155a24636c6173736e616d655824636c6173736573585a4b486f744b6579a21617585a4b486f744b6579584e534f626a6563745f100f4e534b657965644172636869766572d11a1b54726f6f74800108111a232d32373c424b555a62696b6d6f7b808b949da0a9b2c4c7cc0000000000000101000000000000001c000000000000000000000000000000ce +defaults write com.divisiblebyzero.Spectacle MoveToBottomDisplay -data 62706c6973743030d4010203040506191a582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a40708111255246e756c6cd4090a0b0c0d0e0f10596d6f64696669657273546e616d65576b6579436f64655624636c6173731119008002107d80035f10134d6f7665546f426f74746f6d446973706c6179d2131415165a24636c6173736e616d655824636c61737365735d5a65726f4b6974486f744b6579a217185d5a65726f4b6974486f744b6579584e534f626a6563745f100f4e534b657965644172636869766572d11b1c54726f6f74800108111a232d32373c424b555a62696c6e7072888d98a1afb2c0c9dbdee30000000000000101000000000000001d000000000000000000000000000000e5 +defaults write com.divisiblebyzero.Spectacle MoveToBottomHalf -data 62706c6973743030d4010203040506191a582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a40708111255246e756c6cd4090a0b0c0d0e0f10596d6f64696669657273546e616d65576b6579436f64655624636c6173731119008002107d80035f10104d6f7665546f426f74746f6d48616c66d2131415165a24636c6173736e616d655824636c6173736573585a4b486f744b6579a21718585a4b486f744b6579584e534f626a6563745f100f4e534b657965644172636869766572d11b1c54726f6f74800108111a232d32373c424b555a62696c6e7072858a959ea7aab3bcced1d60000000000000101000000000000001d000000000000000000000000000000d8 +defaults write com.divisiblebyzero.Spectacle MoveToCenter -data 62706c6973743030d4010203040506191a582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a40708111255246e756c6cd4090a0b0c0d0e0f10596d6f64696669657273546e616d65576b6579436f64655624636c6173731119008002100880035c4d6f7665546f43656e746572d2131415165a24636c6173736e616d655824636c6173736573585a4b486f744b6579a21718585a4b486f744b6579584e534f626a6563745f100f4e534b657965644172636869766572d11b1c54726f6f74800108111a232d32373c424b555a62696c6e70727f848f98a1a4adb6c8cbd00000000000000101000000000000001d000000000000000000000000000000d2 +defaults write com.divisiblebyzero.Spectacle MoveToFullscreen -data 62706c6973743030d4010203040506191a582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a40708111255246e756c6cd4090a0b0c0d0e0f10596d6f64696669657273546e616d65576b6579436f64655624636c6173731119008002102e80035f10104d6f7665546f46756c6c73637265656ed2131415165a24636c6173736e616d655824636c6173736573585a4b486f744b6579a21718585a4b486f744b6579584e534f626a6563745f100f4e534b657965644172636869766572d11b1c54726f6f74800108111a232d32373c424b555a62696c6e7072858a959ea7aab3bcced1d60000000000000101000000000000001d000000000000000000000000000000d8 +defaults write com.divisiblebyzero.Spectacle MoveToLeftDisplay -data 62706c6973743030d4010203040506191a582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a40708111255246e756c6cd4090a0b0c0d0e0f10596d6f64696669657273546e616d65576b6579436f64655624636c6173731119008002107b80035f10114d6f7665546f4c656674446973706c6179d2131415165a24636c6173736e616d655824636c61737365735d5a65726f4b6974486f744b6579a217185d5a65726f4b6974486f744b6579584e534f626a6563745f100f4e534b657965644172636869766572d11b1c54726f6f74800108111a232d32373c424b555a62696c6e7072868b969fadb0bec7d9dce10000000000000101000000000000001d000000000000000000000000000000e3 +defaults write com.divisiblebyzero.Spectacle MoveToLeftHalf -data 62706c6973743030d4010203040506191a582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a40708111255246e756c6cd4090a0b0c0d0e0f10596d6f64696669657273546e616d65576b6579436f64655624636c6173731119008002107b80035e4d6f7665546f4c65667448616c66d2131415165a24636c6173736e616d655824636c6173736573585a4b486f744b6579a21718585a4b486f744b6579584e534f626a6563745f100f4e534b657965644172636869766572d11b1c54726f6f74800108111a232d32373c424b555a62696c6e70728186919aa3a6afb8cacdd20000000000000101000000000000001d000000000000000000000000000000d4 +defaults write com.divisiblebyzero.Spectacle MoveToLowerLeft -data 62706c6973743030d40102030405061a1b582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a40708111255246e756c6cd4090a0b0c0d0e0f10596d6f64696669657273546e616d65576b6579436f64655624636c6173731113008002107b80035f100f4d6f7665546f4c6f7765724c656674d2131415165a24636c6173736e616d655824636c61737365735d5a65726f4b6974486f744b6579a31718195d5a65726f4b6974486f744b6579585a4b486f744b6579584e534f626a6563745f100f4e534b657965644172636869766572d11c1d54726f6f74800108111a232d32373c424b555a62696c6e70728489949dabafbdc6cfe1e4e90000000000000101000000000000001e000000000000000000000000000000eb +defaults write com.divisiblebyzero.Spectacle MoveToLowerRight -data 62706c6973743030d40102030405061a1b582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a40708111255246e756c6cd4090a0b0c0d0e0f10596d6f64696669657273546e616d65576b6579436f64655624636c6173731113008002107c80035f10104d6f7665546f4c6f7765725269676874d2131415165a24636c6173736e616d655824636c61737365735d5a65726f4b6974486f744b6579a31718195d5a65726f4b6974486f744b6579585a4b486f744b6579584e534f626a6563745f100f4e534b657965644172636869766572d11c1d54726f6f74800108111a232d32373c424b555a62696c6e7072858a959eacb0bec7d0e2e5ea0000000000000101000000000000001e000000000000000000000000000000ec +defaults write com.divisiblebyzero.Spectacle MoveToNextDisplay -data 62706c6973743030d4010203040506191a582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a40708111255246e756c6cd4090a0b0c0d0e0f10596d6f64696669657273546e616d65576b6579436f64655624636c6173731118008002107c80035f10114d6f7665546f4e657874446973706c6179d2131415165a24636c6173736e616d655824636c6173736573585a4b486f744b6579a21718585a4b486f744b6579584e534f626a6563745f100f4e534b657965644172636869766572d11b1c54726f6f74800108111a232d32373c424b555a62696c6e7072868b969fa8abb4bdcfd2d70000000000000101000000000000001d000000000000000000000000000000d9 +defaults write com.divisiblebyzero.Spectacle MoveToNextThird -data 62706c6973743030d40102030405061819582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a40708101155246e756c6cd4090a0b0c0d0e0d0f596d6f64696669657273546e616d65576b6579436f64655624636c6173731000800280035f100f4d6f7665546f4e6578745468697264d2121314155a24636c6173736e616d655824636c6173736573585a4b486f744b6579a21617585a4b486f744b6579584e534f626a6563745f100f4e534b657965644172636869766572d11a1b54726f6f74800108111a232d32373c424b555a62696b6d6f8186919aa3a6afb8cacdd20000000000000101000000000000001c000000000000000000000000000000d4 +defaults write com.divisiblebyzero.Spectacle MoveToPreviousDisplay -data 62706c6973743030d4010203040506191a582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a40708111255246e756c6cd4090a0b0c0d0e0f10596d6f64696669657273546e616d65576b6579436f64655624636c6173731118008002107b80035f10154d6f7665546f50726576696f7573446973706c6179d2131415165a24636c6173736e616d655824636c6173736573585a4b486f744b6579a21718585a4b486f744b6579584e534f626a6563745f100f4e534b657965644172636869766572d11b1c54726f6f74800108111a232d32373c424b555a62696c6e70728a8f9aa3acafb8c1d3d6db0000000000000101000000000000001d000000000000000000000000000000dd +defaults write com.divisiblebyzero.Spectacle MoveToPreviousThird -data 62706c6973743030d40102030405061819582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a40708101155246e756c6cd4090a0b0c0d0e0d0f596d6f64696669657273546e616d65576b6579436f64655624636c6173731000800280035f10134d6f7665546f50726576696f75735468697264d2121314155a24636c6173736e616d655824636c6173736573585a4b486f744b6579a21617585a4b486f744b6579584e534f626a6563745f100f4e534b657965644172636869766572d11a1b54726f6f74800108111a232d32373c424b555a62696b6d6f858a959ea7aab3bcced1d60000000000000101000000000000001c000000000000000000000000000000d8 +defaults write com.divisiblebyzero.Spectacle MoveToRightDisplay -data 62706c6973743030d4010203040506191a582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a40708111255246e756c6cd4090a0b0c0d0e0f10596d6f64696669657273546e616d65576b6579436f64655624636c6173731119008002107c80035f10124d6f7665546f5269676874446973706c6179d2131415165a24636c6173736e616d655824636c61737365735d5a65726f4b6974486f744b6579a217185d5a65726f4b6974486f744b6579584e534f626a6563745f100f4e534b657965644172636869766572d11b1c54726f6f74800108111a232d32373c424b555a62696c6e7072878c97a0aeb1bfc8dadde20000000000000101000000000000001d000000000000000000000000000000e4 +defaults write com.divisiblebyzero.Spectacle MoveToRightHalf -data 62706c6973743030d4010203040506191a582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a40708111255246e756c6cd4090a0b0c0d0e0f10596d6f64696669657273546e616d65576b6579436f64655624636c6173731119008002107c80035f100f4d6f7665546f526967687448616c66d2131415165a24636c6173736e616d655824636c6173736573585a4b486f744b6579a21718585a4b486f744b6579584e534f626a6563745f100f4e534b657965644172636869766572d11b1c54726f6f74800108111a232d32373c424b555a62696c6e70728489949da6a9b2bbcdd0d50000000000000101000000000000001d000000000000000000000000000000d7 +defaults write com.divisiblebyzero.Spectacle MoveToTopDisplay -data 62706c6973743030d4010203040506191a582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a40708111255246e756c6cd4090a0b0c0d0e0f10596d6f64696669657273546e616d65576b6579436f64655624636c6173731119008002107e80035f10104d6f7665546f546f70446973706c6179d2131415165a24636c6173736e616d655824636c61737365735d5a65726f4b6974486f744b6579a217185d5a65726f4b6974486f744b6579584e534f626a6563745f100f4e534b657965644172636869766572d11b1c54726f6f74800108111a232d32373c424b555a62696c6e7072858a959eacafbdc6d8dbe00000000000000101000000000000001d000000000000000000000000000000e2 +defaults write com.divisiblebyzero.Spectacle MoveToTopHalf -data 62706c6973743030d4010203040506191a582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a40708111255246e756c6cd4090a0b0c0d0e0f10596d6f64696669657273546e616d65576b6579436f64655624636c6173731119008002107e80035d4d6f7665546f546f7048616c66d2131415165a24636c6173736e616d655824636c6173736573585a4b486f744b6579a21718585a4b486f744b6579584e534f626a6563745f100f4e534b657965644172636869766572d11b1c54726f6f74800108111a232d32373c424b555a62696c6e707280859099a2a5aeb7c9ccd10000000000000101000000000000001d000000000000000000000000000000d3 +defaults write com.divisiblebyzero.Spectacle MoveToUpperLeft -data 62706c6973743030d40102030405061a1b582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a40708111255246e756c6cd4090a0b0c0d0e0f10596d6f64696669657273546e616d65576b6579436f64655624636c6173731111008002107b80035f100f4d6f7665546f55707065724c656674d2131415165a24636c6173736e616d655824636c61737365735d5a65726f4b6974486f744b6579a31718195d5a65726f4b6974486f744b6579585a4b486f744b6579584e534f626a6563745f100f4e534b657965644172636869766572d11c1d54726f6f74800108111a232d32373c424b555a62696c6e70728489949dabafbdc6cfe1e4e90000000000000101000000000000001e000000000000000000000000000000eb +defaults write com.divisiblebyzero.Spectacle MoveToUpperRight -data 62706c6973743030d40102030405061a1b582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a40708111255246e756c6cd4090a0b0c0d0e0f10596d6f64696669657273546e616d65576b6579436f64655624636c6173731111008002107c80035f10104d6f7665546f55707065725269676874d2131415165a24636c6173736e616d655824636c61737365735d5a65726f4b6974486f744b6579a31718195d5a65726f4b6974486f744b6579585a4b486f744b6579584e534f626a6563745f100f4e534b657965644172636869766572d11c1d54726f6f74800108111a232d32373c424b555a62696c6e7072858a959eacb0bec7d0e2e5ea0000000000000101000000000000001e000000000000000000000000000000ec +defaults write com.divisiblebyzero.Spectacle RedoLastMove -data 62706c6973743030d40102030405061a1b582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a40708111255246e756c6cd4090a0b0c0d0e0f10596d6f64696669657273546e616d65576b6579436f64655624636c617373110b008002100680035c5265646f4c6173744d6f7665d2131415165a24636c6173736e616d655824636c61737365735d5a65726f4b6974486f744b6579a31718195d5a65726f4b6974486f744b6579585a4b486f744b6579584e534f626a6563745f100f4e534b657965644172636869766572d11c1d54726f6f74800108111a232d32373c424b555a62696c6e70727f848f98a6aab8c1cadcdfe40000000000000101000000000000001e000000000000000000000000000000e6 +defaults write com.divisiblebyzero.Spectacle UndoLastMove -data 62706c6973743030d40102030405061a1b582476657273696f6e58246f626a65637473592461726368697665725424746f7012000186a0a40708111255246e756c6cd4090a0b0c0d0e0f10596d6f64696669657273546e616d65576b6579436f64655624636c6173731109008002100680035c556e646f4c6173744d6f7665d2131415165a24636c6173736e616d655824636c61737365735d5a65726f4b6974486f744b6579a31718195d5a65726f4b6974486f744b6579585a4b486f744b6579584e534f626a6563745f100f4e534b657965644172636869766572d11c1d54726f6f74800108111a232d32373c424b555a62696c6e70727f848f98a6aab8c1cadcdfe40000000000000101000000000000001e000000000000000000000000000000e6 + +############################################################################### +# Kill affected applications # +############################################################################### + +for app in "Activity Monitor" "Address Book" "Calendar" "Contacts" "cfprefsd" \ + "Dock" "Finder" "Google Chrome" "Google Chrome Canary" "Mail" "Messages" \ + "Opera" "Photos" "Safari" "SizeUp" "Spectacle" "SystemUIServer" "Terminal" \ + "Transmission" "Tweetbot" "Twitter" "iCal"; do + killall "${app}" &> /dev/null +done +echo "Done. Note that some of these changes require a logout/restart to take effect." diff --git a/.osx b/.osx new file mode 100644 index 0000000..4eacb4e --- /dev/null +++ b/.osx @@ -0,0 +1 @@ +# 301 https://github.com/mathiasbynens/dotfiles/blob/master/.macos diff --git a/.screenrc b/.screenrc new file mode 100644 index 0000000..a4a33ba --- /dev/null +++ b/.screenrc @@ -0,0 +1,8 @@ +# Disable the startup message +startup_message off + +# Set a large scrollback buffer +defscrollback 32000 + +# Always start `screen` with UTF-8 enabled (`screen -U`) +defutf8 on diff --git a/.vim/backups/.gitignore b/.vim/backups/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/.vim/colors/solarized.vim b/.vim/colors/solarized.vim new file mode 100644 index 0000000..ee46b17 --- /dev/null +++ b/.vim/colors/solarized.vim @@ -0,0 +1,969 @@ +" Name: Solarized vim colorscheme +" Author: Ethan Schoonover +" URL: http://ethanschoonover.com/solarized +" (see this url for latest release & screenshots) +" License: OSI approved MIT license (see end of this file) +" Created: In the middle of the night +" Modified: 2011 Apr 14 +" +" Usage "{{{ +" +" --------------------------------------------------------------------- +" ABOUT: +" --------------------------------------------------------------------- +" Solarized is a carefully designed selective contrast colorscheme with dual +" light and dark modes that runs in both GUI, 256 and 16 color modes. +" +" See the homepage above for screenshots and details. +" +" --------------------------------------------------------------------- +" INSTALLATION: +" --------------------------------------------------------------------- +" +" Two options for installation: manual or pathogen +" +" MANUAL INSTALLATION OPTION: +" --------------------------------------------------------------------- +" +" 1. Put the files in the right place! +" 2. Move `solarized.vim` to your `.vim/colors` directory. +" +" RECOMMENDED PATHOGEN INSTALLATION OPTION: +" --------------------------------------------------------------------- +" +" 1. Download and install Tim Pope's Pathogen from: +" https://github.com/tpope/vim-pathogen +" +" 2. Next, move or clone the `vim-colors-solarized` directory so that it is +" a subdirectory of the `.vim/bundle` directory. +" +" a. **clone with git:** +" +" $ cd ~/.vim/bundle +" $ git clone git://github.com/altercation/vim-colors-solarized.git +" +" b. **or move manually into the pathogen bundle directory:** +" In the parent directory of vim-colors-solarized: +" +" $ mv vim-colors-solarized ~/.vim/bundle/ +" +" MODIFY VIMRC: +" +" After either Option 1 or Option 2 above, put the following two lines in your +" .vimrc: +" +" syntax enable +" set background=dark +" colorscheme solarized +" +" or, for the light background mode of Solarized: +" +" syntax enable +" set background=light +" colorscheme solarized +" +" I like to have a different background in GUI and terminal modes, so I can use +" the following if-then. However, I find vim's background autodetection to be +" pretty good and, at least with MacVim, I can leave this background value +" assignment out entirely and get the same results. +" +" if has('gui_running') +" set background=light +" else +" set background=dark +" endif +" +" See the Solarized homepage at http://ethanschoonover.com/solarized for +" screenshots which will help you select either the light or dark background. +" +" Other options are detailed below. +" +" IMPORTANT NOTE FOR TERMINAL USERS: +" +" If you are going to use Solarized in Terminal mode (i.e. not in a GUI version +" like gvim or macvim), **please please please** consider setting your terminal +" emulator's colorscheme to used the Solarized palette. I've included palettes +" for some popular terminal emulator as well as Xdefaults in the official +" Solarized download available from [Solarized homepage]. If you use +" Solarized *without* these colors, Solarized will need to be told to degrade +" its colorscheme to a set compatible with the limited 256 terminal palette +" (whereas by using the terminal's 16 ansi color values, you can set the +" correct, specific values for the Solarized palette). +" +" If you do use the custom terminal colors, solarized.vim should work out of +" the box for you. If you are using a terminal emulator that supports 256 +" colors and don't want to use the custom Solarized terminal colors, you will +" need to use the degraded 256 colorscheme. To do so, simply add the following +" line *before* the `colorschem solarized` line: +" +" let g:solarized_termcolors=256 +" +" Again, I recommend just changing your terminal colors to Solarized values +" either manually or via one of the many terminal schemes available for import. +" +" --------------------------------------------------------------------- +" TOGGLE BACKGROUND FUNCTION: +" --------------------------------------------------------------------- +" +" Solarized comes with a Toggle Background plugin that by default will map to +" if that mapping is available. If it is not available you will need to +" either map the function manually or change your current mapping to +" something else. If you wish to map the function manually, enter the following +" lines in your .vimrc: +" +" nmap ToggleBackground +" imap ToggleBackground +" vmap ToggleBackground +" +" Note that it is important to *not* use the noremap map variants. The plugin +" uses noremap internally. You may run `:help togglebg` for more information. +" +" --------------------------------------------------------------------- +" OPTIONS +" --------------------------------------------------------------------- +" +" Set these in your vimrc file prior to calling the colorscheme. +" +" option name default optional +" ------------------------------------------------ +" g:solarized_termcolors= 16 | 256 +" g:solarized_termtrans = 0 | 1 +" g:solarized_degrade = 0 | 1 +" g:solarized_bold = 1 | 0 +" g:solarized_underline = 1 | 0 +" g:solarized_italic = 1 | 0 +" g:solarized_contrast = "normal"| "high" or "low" +" g:solarized_visibility= "normal"| "high" or "low" +" ------------------------------------------------ +" +" OPTION DETAILS +" +" ------------------------------------------------ +" g:solarized_termcolors= 256 | 16 +" ------------------------------------------------ +" The most important option if you are using vim in terminal (non gui) mode! +" This tells Solarized to use the 256 degraded color mode if running in a 256 +" color capable terminal. Otherwise, if set to `16` it will use the terminal +" emulators colorscheme (best option as long as you've set the emulators colors +" to the Solarized palette). +" +" If you are going to use Solarized in Terminal mode (i.e. not in a GUI +" version like gvim or macvim), **please please please** consider setting your +" terminal emulator's colorscheme to used the Solarized palette. I've included +" palettes for some popular terminal emulator as well as Xdefaults in the +" official Solarized download available from: +" http://ethanschoonover.com/solarized . If you use Solarized without these +" colors, Solarized will by default use an approximate set of 256 colors. It +" isn't bad looking and has been extensively tweaked, but it's still not quite +" the real thing. +" +" ------------------------------------------------ +" g:solarized_termtrans = 0 | 1 +" ------------------------------------------------ +" If you use a terminal emulator with a transparent background and Solarized +" isn't displaying the background color transparently, set this to 1 and +" Solarized will use the default (transparent) background of the terminal +" emulator. *urxvt* required this in my testing; iTerm2 did not. +" +" Note that on Mac OS X Terminal.app, solarized_termtrans is set to 1 by +" default as this is almost always the best option. The only exception to this +" is if the working terminfo file supports 256 colors (xterm-256color). +" +" ------------------------------------------------ +" g:solarized_degrade = 0 | 1 +" ------------------------------------------------ +" For test purposes only; forces Solarized to use the 256 degraded color mode +" to test the approximate color values for accuracy. +" +" ------------------------------------------------ +" g:solarized_bold = 1 | 0 +" ------------------------------------------------ +" ------------------------------------------------ +" g:solarized_underline = 1 | 0 +" ------------------------------------------------ +" ------------------------------------------------ +" g:solarized_italic = 1 | 0 +" ------------------------------------------------ +" If you wish to stop Solarized from displaying bold, underlined or +" italicized typefaces, simply assign a zero value to the appropriate +" variable, for example: `let g:solarized_italic=0` +" +" ------------------------------------------------ +" g:solarized_contrast = "normal"| "high" or "low" +" ------------------------------------------------ +" Stick with normal! It's been carefully tested. Setting this option to high +" or low does use the same Solarized palette but simply shifts some values up +" or down in order to expand or compress the tonal range displayed. +" +" ------------------------------------------------ +" g:solarized_visibility = "normal"| "high" or "low" +" ------------------------------------------------ +" Special characters such as trailing whitespace, tabs, newlines, when +" displayed using ":set list" can be set to one of three levels depending on +" your needs. +" +" --------------------------------------------------------------------- +" COLOR VALUES +" --------------------------------------------------------------------- +" Download palettes and files from: http://ethanschoonover.com/solarized +" +" L\*a\*b values are canonical (White D65, Reference D50), other values are +" matched in sRGB space. +" +" SOLARIZED HEX 16/8 TERMCOL XTERM/HEX L*A*B sRGB HSB +" --------- ------- ---- ------- ----------- ---------- ----------- ----------- +" base03 #002b36 8/4 brblack 234 #1c1c1c 15 -12 -12 0 43 54 193 100 21 +" base02 #073642 0/4 black 235 #262626 20 -12 -12 7 54 66 192 90 26 +" base01 #586e75 10/7 brgreen 240 #4e4e4e 45 -07 -07 88 110 117 194 25 46 +" base00 #657b83 11/7 bryellow 241 #585858 50 -07 -07 101 123 131 195 23 51 +" base0 #839496 12/6 brblue 244 #808080 60 -06 -03 131 148 150 186 13 59 +" base1 #93a1a1 14/4 brcyan 245 #8a8a8a 65 -05 -02 147 161 161 180 9 63 +" base2 #eee8d5 7/7 white 254 #d7d7af 92 -00 10 238 232 213 44 11 93 +" base3 #fdf6e3 15/7 brwhite 230 #ffffd7 97 00 10 253 246 227 44 10 99 +" yellow #b58900 3/3 yellow 136 #af8700 60 10 65 181 137 0 45 100 71 +" orange #cb4b16 9/3 brred 166 #d75f00 50 50 55 203 75 22 18 89 80 +" red #dc322f 1/1 red 160 #d70000 50 65 45 220 50 47 1 79 86 +" magenta #d33682 5/5 magenta 125 #af005f 50 65 -05 211 54 130 331 74 83 +" violet #6c71c4 13/5 brmagenta 61 #5f5faf 50 15 -45 108 113 196 237 45 77 +" blue #268bd2 4/4 blue 33 #0087ff 55 -10 -45 38 139 210 205 82 82 +" cyan #2aa198 6/6 cyan 37 #00afaf 60 -35 -05 42 161 152 175 74 63 +" green #859900 2/2 green 64 #5f8700 60 -20 65 133 153 0 68 100 60 +" +" --------------------------------------------------------------------- +" COLORSCHEME HACKING +" --------------------------------------------------------------------- +" +" Useful commands for testing colorschemes: +" :source $VIMRUNTIME/syntax/hitest.vim +" :help highlight-groups +" :help cterm-colors +" :help group-name +" +" Useful links for developing colorschemes: +" http://www.vim.org/scripts/script.php?script_id=2937 +" http://vimcasts.org/episodes/creating-colorschemes-for-vim/ +" http://www.frexx.de/xterm-256-notes/" +" +" +" }}} +" Default option values"{{{ +" --------------------------------------------------------------------- +if !exists("g:solarized_termtrans") + if ($TERM_PROGRAM ==? "apple_terminal" && &t_Co < 256) + let g:solarized_termtrans = 1 + else + let g:solarized_termtrans = 0 + endif +endif +if !exists("g:solarized_degrade") + let g:solarized_degrade = 0 +endif +if !exists("g:solarized_bold") + let g:solarized_bold = 1 +endif +if !exists("g:solarized_underline") + let g:solarized_underline = 1 +endif +if !exists("g:solarized_italic") + let g:solarized_italic = 1 +endif +if !exists("g:solarized_termcolors") + let g:solarized_termcolors = 16 +endif +if !exists("g:solarized_contrast") + let g:solarized_contrast = "normal" +endif +if !exists("g:solarized_visibility") + let g:solarized_visibility = "normal" +endif +"}}} +" Colorscheme initialization "{{{ +" --------------------------------------------------------------------- +hi clear +if exists("syntax_on") + syntax reset +endif +let colors_name = "solarized" + +"}}} +" GUI & CSApprox hexadecimal palettes"{{{ +" --------------------------------------------------------------------- +" +" Set both gui and terminal color values in separate conditional statements +" Due to possibility that CSApprox is running (though I suppose we could just +" leave the hex values out entirely in that case and include only cterm colors) +" We also check to see if user has set solarized (force use of the +" neutral gray monotone palette component) +if (has("gui_running") && g:solarized_degrade == 0) + let s:vmode = "gui" + let s:base03 = "#002b36" + let s:base02 = "#073642" + let s:base01 = "#586e75" + let s:base00 = "#657b83" + let s:base0 = "#839496" + let s:base1 = "#93a1a1" + let s:base2 = "#eee8d5" + let s:base3 = "#fdf6e3" + let s:yellow = "#b58900" + let s:orange = "#cb4b16" + let s:red = "#dc322f" + let s:magenta = "#d33682" + let s:violet = "#6c71c4" + let s:blue = "#268bd2" + let s:cyan = "#2aa198" + let s:green = "#859900" +elseif (has("gui_running") && g:solarized_degrade == 1) + " These colors are identical to the 256 color mode. They may be viewed + " while in gui mode via "let g:solarized_degrade=1", though this is not + " recommened and is for testing only. + let s:vmode = "gui" + let s:base03 = "#1c1c1c" + let s:base02 = "#262626" + let s:base01 = "#4e4e4e" + let s:base00 = "#585858" + let s:base0 = "#808080" + let s:base1 = "#8a8a8a" + let s:base2 = "#d7d7af" + let s:base3 = "#ffffd7" + let s:yellow = "#af8700" + let s:orange = "#d75f00" + let s:red = "#af0000" + let s:magenta = "#af005f" + let s:violet = "#5f5faf" + let s:blue = "#0087ff" + let s:cyan = "#00afaf" + let s:green = "#5f8700" +elseif g:solarized_termcolors != 256 && &t_Co >= 16 + let s:vmode = "cterm" + let s:base03 = "8" + let s:base02 = "0" + let s:base01 = "10" + let s:base00 = "11" + let s:base0 = "12" + let s:base1 = "14" + let s:base2 = "7" + let s:base3 = "15" + let s:yellow = "3" + let s:orange = "9" + let s:red = "1" + let s:magenta = "5" + let s:violet = "13" + let s:blue = "4" + let s:cyan = "6" + let s:green = "2" +elseif g:solarized_termcolors == 256 + let s:vmode = "cterm" + let s:base03 = "234" + let s:base02 = "235" + let s:base01 = "239" + let s:base00 = "240" + let s:base0 = "244" + let s:base1 = "245" + let s:base2 = "187" + let s:base3 = "230" + let s:yellow = "136" + let s:orange = "166" + let s:red = "124" + let s:magenta = "125" + let s:violet = "61" + let s:blue = "33" + let s:cyan = "37" + let s:green = "64" +else + let s:vmode = "cterm" + let s:bright = "* term=bold cterm=bold" + let s:base03 = "0".s:bright + let s:base02 = "0" + let s:base01 = "2".s:bright + let s:base00 = "3".s:bright + let s:base0 = "4".s:bright + let s:base1 = "6".s:bright + let s:base2 = "7" + let s:base3 = "7".s:bright + let s:yellow = "3" + let s:orange = "1".s:bright + let s:red = "1" + let s:magenta = "5" + let s:violet = "13" + let s:blue = "4" + let s:cyan = "6" + let s:green = "2" +endif +"}}} +" Formatting options and null values for passthrough effect "{{{ +" --------------------------------------------------------------------- + let s:none = "NONE" + let s:none = "NONE" + let s:t_none = "NONE" + let s:n = "NONE" + let s:c = ",undercurl" + let s:r = ",reverse" + let s:s = ",standout" + let s:ou = "" + let s:ob = "" +"}}} +" Background value based on termtrans setting "{{{ +" --------------------------------------------------------------------- +if (has("gui_running") || g:solarized_termtrans == 0) + let s:back = s:base03 +else + let s:back = "NONE" +endif +"}}} +" Alternate light scheme "{{{ +" --------------------------------------------------------------------- +if &background == "light" + let s:temp03 = s:base03 + let s:temp02 = s:base02 + let s:temp01 = s:base01 + let s:temp00 = s:base00 + let s:base03 = s:base3 + let s:base02 = s:base2 + let s:base01 = s:base1 + let s:base00 = s:base0 + let s:base0 = s:temp00 + let s:base1 = s:temp01 + let s:base2 = s:temp02 + let s:base3 = s:temp03 + if (s:back != "NONE") + let s:back = s:base03 + endif +endif +"}}} +" Optional contrast schemes "{{{ +" --------------------------------------------------------------------- +if g:solarized_contrast == "high" + let s:base01 = s:base00 + let s:base00 = s:base0 + let s:base0 = s:base1 + let s:base1 = s:base2 + let s:base2 = s:base3 + let s:back = s:back +endif +if g:solarized_contrast == "low" + let s:back = s:base02 + let s:ou = ",underline" +endif +"}}} +" Overrides dependent on user specified values"{{{ +" --------------------------------------------------------------------- +if g:solarized_bold == 1 + let s:b = ",bold" +else + let s:b = "" +endif + +if g:solarized_underline == 1 + let s:u = ",underline" +else + let s:u = "" +endif + +if g:solarized_italic == 1 + let s:i = ",italic" +else + let s:i = "" +endif +"}}} +" Highlighting primitives"{{{ +" --------------------------------------------------------------------- + +exe "let s:bg_none = ' ".s:vmode."bg=".s:none ."'" +exe "let s:bg_back = ' ".s:vmode."bg=".s:back ."'" +exe "let s:bg_base03 = ' ".s:vmode."bg=".s:base03 ."'" +exe "let s:bg_base02 = ' ".s:vmode."bg=".s:base02 ."'" +exe "let s:bg_base01 = ' ".s:vmode."bg=".s:base01 ."'" +exe "let s:bg_base00 = ' ".s:vmode."bg=".s:base00 ."'" +exe "let s:bg_base0 = ' ".s:vmode."bg=".s:base0 ."'" +exe "let s:bg_base1 = ' ".s:vmode."bg=".s:base1 ."'" +exe "let s:bg_base2 = ' ".s:vmode."bg=".s:base2 ."'" +exe "let s:bg_base3 = ' ".s:vmode."bg=".s:base3 ."'" +exe "let s:bg_green = ' ".s:vmode."bg=".s:green ."'" +exe "let s:bg_yellow = ' ".s:vmode."bg=".s:yellow ."'" +exe "let s:bg_orange = ' ".s:vmode."bg=".s:orange ."'" +exe "let s:bg_red = ' ".s:vmode."bg=".s:red ."'" +exe "let s:bg_magenta = ' ".s:vmode."bg=".s:magenta."'" +exe "let s:bg_violet = ' ".s:vmode."bg=".s:violet ."'" +exe "let s:bg_blue = ' ".s:vmode."bg=".s:blue ."'" +exe "let s:bg_cyan = ' ".s:vmode."bg=".s:cyan ."'" + +exe "let s:fg_none = ' ".s:vmode."fg=".s:none ."'" +exe "let s:fg_back = ' ".s:vmode."fg=".s:back ."'" +exe "let s:fg_base03 = ' ".s:vmode."fg=".s:base03 ."'" +exe "let s:fg_base02 = ' ".s:vmode."fg=".s:base02 ."'" +exe "let s:fg_base01 = ' ".s:vmode."fg=".s:base01 ."'" +exe "let s:fg_base00 = ' ".s:vmode."fg=".s:base00 ."'" +exe "let s:fg_base0 = ' ".s:vmode."fg=".s:base0 ."'" +exe "let s:fg_base1 = ' ".s:vmode."fg=".s:base1 ."'" +exe "let s:fg_base2 = ' ".s:vmode."fg=".s:base2 ."'" +exe "let s:fg_base3 = ' ".s:vmode."fg=".s:base3 ."'" +exe "let s:fg_green = ' ".s:vmode."fg=".s:green ."'" +exe "let s:fg_yellow = ' ".s:vmode."fg=".s:yellow ."'" +exe "let s:fg_orange = ' ".s:vmode."fg=".s:orange ."'" +exe "let s:fg_red = ' ".s:vmode."fg=".s:red ."'" +exe "let s:fg_magenta = ' ".s:vmode."fg=".s:magenta."'" +exe "let s:fg_violet = ' ".s:vmode."fg=".s:violet ."'" +exe "let s:fg_blue = ' ".s:vmode."fg=".s:blue ."'" +exe "let s:fg_cyan = ' ".s:vmode."fg=".s:cyan ."'" + +exe "let s:fmt_none = ' ".s:vmode."=NONE". " term=NONE". "'" +exe "let s:fmt_bold = ' ".s:vmode."=NONE".s:b. " term=NONE".s:b."'" +exe "let s:fmt_bldi = ' ".s:vmode."=NONE".s:b. " term=NONE".s:b."'" +exe "let s:fmt_undr = ' ".s:vmode."=NONE".s:u. " term=NONE".s:u."'" +exe "let s:fmt_undb = ' ".s:vmode."=NONE".s:u.s:b. " term=NONE".s:u.s:b."'" +exe "let s:fmt_undi = ' ".s:vmode."=NONE".s:u. " term=NONE".s:u."'" +exe "let s:fmt_uopt = ' ".s:vmode."=NONE".s:ou. " term=NONE".s:ou."'" +exe "let s:fmt_curl = ' ".s:vmode."=NONE".s:c. " term=NONE".s:c."'" +exe "let s:fmt_ital = ' ".s:vmode."=NONE". " term=NONE". "'" +exe "let s:fmt_revr = ' ".s:vmode."=NONE".s:r. " term=NONE".s:r."'" +exe "let s:fmt_stnd = ' ".s:vmode."=NONE".s:s. " term=NONE".s:s."'" + +if has("gui_running") + exe "let s:sp_none = ' guisp=".s:none ."'" + exe "let s:sp_back = ' guisp=".s:back ."'" + exe "let s:sp_base03 = ' guisp=".s:base03 ."'" + exe "let s:sp_base02 = ' guisp=".s:base02 ."'" + exe "let s:sp_base01 = ' guisp=".s:base01 ."'" + exe "let s:sp_base00 = ' guisp=".s:base00 ."'" + exe "let s:sp_base0 = ' guisp=".s:base0 ."'" + exe "let s:sp_base1 = ' guisp=".s:base1 ."'" + exe "let s:sp_base2 = ' guisp=".s:base2 ."'" + exe "let s:sp_base3 = ' guisp=".s:base3 ."'" + exe "let s:sp_green = ' guisp=".s:green ."'" + exe "let s:sp_yellow = ' guisp=".s:yellow ."'" + exe "let s:sp_orange = ' guisp=".s:orange ."'" + exe "let s:sp_red = ' guisp=".s:red ."'" + exe "let s:sp_magenta = ' guisp=".s:magenta."'" + exe "let s:sp_violet = ' guisp=".s:violet ."'" + exe "let s:sp_blue = ' guisp=".s:blue ."'" + exe "let s:sp_cyan = ' guisp=".s:cyan ."'" +else + let s:sp_none = "" + let s:sp_back = "" + let s:sp_base03 = "" + let s:sp_base02 = "" + let s:sp_base01 = "" + let s:sp_base00 = "" + let s:sp_base0 = "" + let s:sp_base1 = "" + let s:sp_base2 = "" + let s:sp_base3 = "" + let s:sp_green = "" + let s:sp_yellow = "" + let s:sp_orange = "" + let s:sp_red = "" + let s:sp_magenta = "" + let s:sp_violet = "" + let s:sp_blue = "" + let s:sp_cyan = "" +endif + +"}}} +" Basic highlighting"{{{ +" --------------------------------------------------------------------- +" note that link syntax to avoid duplicate configuration doesn't work with the +" exe compiled formats + +exe "hi! Normal" .s:fmt_none .s:fg_base0 .s:bg_back + +exe "hi! Comment" .s:fmt_ital .s:fg_base01 .s:bg_none +" *Comment any comment + +exe "hi! Constant" .s:fmt_none .s:fg_cyan .s:bg_none +" *Constant any constant +" String a string constant: "this is a string" +" Character a character constant: 'c', '\n' +" Number a number constant: 234, 0xff +" Boolean a boolean constant: TRUE, false +" Float a floating point constant: 2.3e10 + +exe "hi! Identifier" .s:fmt_none .s:fg_blue .s:bg_none +" *Identifier any variable name +" Function function name (also: methods for classes) +" +exe "hi! Statement" .s:fmt_none .s:fg_green .s:bg_none +" *Statement any statement +" Conditional if, then, else, endif, switch, etc. +" Repeat for, do, while, etc. +" Label case, default, etc. +" Operator "sizeof", "+", "*", etc. +" Keyword any other keyword +" Exception try, catch, throw + +exe "hi! PreProc" .s:fmt_none .s:fg_orange .s:bg_none +" *PreProc generic Preprocessor +" Include preprocessor #include +" Define preprocessor #define +" Macro same as Define +" PreCondit preprocessor #if, #else, #endif, etc. + +exe "hi! Type" .s:fmt_none .s:fg_yellow .s:bg_none +" *Type int, long, char, etc. +" StorageClass static, register, volatile, etc. +" Structure struct, union, enum, etc. +" Typedef A typedef + +exe "hi! Special" .s:fmt_none .s:fg_red .s:bg_none +" *Special any special symbol +" SpecialChar special character in a constant +" Tag you can use CTRL-] on this +" Delimiter character that needs attention +" SpecialComment special things inside a comment +" Debug debugging statements + +exe "hi! Underlined" .s:fmt_none .s:fg_violet .s:bg_none +" *Underlined text that stands out, HTML links + +exe "hi! Ignore" .s:fmt_none .s:fg_none .s:bg_none +" *Ignore left blank, hidden |hl-Ignore| + +exe "hi! Error" .s:fmt_bold .s:fg_red .s:bg_none +" *Error any erroneous construct + +exe "hi! Todo" .s:fmt_bold .s:fg_magenta.s:bg_none +" *Todo anything that needs extra attention; mostly the +" keywords TODO FIXME and XXX +" +"}}} +" Extended highlighting "{{{ +" --------------------------------------------------------------------- +if (g:solarized_visibility=="high") + exe "hi! SpecialKey" .s:fmt_revr .s:fg_red .s:bg_none + exe "hi! NonText" .s:fmt_bold .s:fg_base1 .s:bg_none +elseif (g:solarized_visibility=="low") + exe "hi! SpecialKey" .s:fmt_bold .s:fg_base02 .s:bg_none + exe "hi! NonText" .s:fmt_bold .s:fg_base02 .s:bg_none +else + exe "hi! SpecialKey" .s:fmt_bold .s:fg_red .s:bg_none + exe "hi! NonText" .s:fmt_bold .s:fg_base01 .s:bg_none +endif +if (has("gui_running")) || &t_Co > 8 + exe "hi! StatusLine" .s:fmt_none .s:fg_base02 .s:bg_base1 + exe "hi! StatusLineNC" .s:fmt_none .s:fg_base02 .s:bg_base00 + "exe "hi! Visual" .s:fmt_stnd .s:fg_none .s:bg_base02 + exe "hi! Visual" .s:fmt_none .s:fg_base03 .s:bg_base01 +else + exe "hi! StatusLine" .s:fmt_none .s:fg_base02 .s:bg_base2 + exe "hi! StatusLineNC" .s:fmt_none .s:fg_base02 .s:bg_base2 + exe "hi! Visual" .s:fmt_none .s:fg_none .s:bg_base2 +endif +exe "hi! Directory" .s:fmt_none .s:fg_blue .s:bg_none +exe "hi! ErrorMsg" .s:fmt_revr .s:fg_red .s:bg_none +exe "hi! IncSearch" .s:fmt_stnd .s:fg_orange .s:bg_none +exe "hi! Search" .s:fmt_revr .s:fg_yellow .s:bg_none +exe "hi! MoreMsg" .s:fmt_none .s:fg_blue .s:bg_none +exe "hi! ModeMsg" .s:fmt_none .s:fg_blue .s:bg_none +exe "hi! LineNr" .s:fmt_none .s:fg_base01 .s:bg_base02 +exe "hi! Question" .s:fmt_bold .s:fg_cyan .s:bg_none +exe "hi! VertSplit" .s:fmt_bold .s:fg_base00 .s:bg_base00 +exe "hi! Title" .s:fmt_bold .s:fg_orange .s:bg_none +exe "hi! VisualNOS" .s:fmt_stnd .s:fg_none .s:bg_base02 +exe "hi! WarningMsg" .s:fmt_bold .s:fg_red .s:bg_none +exe "hi! WildMenu" .s:fmt_none .s:fg_base2 .s:bg_base02 +exe "hi! Folded" .s:fmt_undb .s:fg_base0 .s:bg_base02 .s:sp_base03 +exe "hi! FoldColumn" .s:fmt_bold .s:fg_base0 .s:bg_base02 +exe "hi! DiffAdd" .s:fmt_revr .s:fg_green .s:bg_none +exe "hi! DiffChange" .s:fmt_revr .s:fg_yellow .s:bg_none +exe "hi! DiffDelete" .s:fmt_revr .s:fg_red .s:bg_none +exe "hi! DiffText" .s:fmt_revr .s:fg_blue .s:bg_none +exe "hi! SignColumn" .s:fmt_none .s:fg_base0 .s:bg_base02 +exe "hi! Conceal" .s:fmt_none .s:fg_blue .s:bg_none +exe "hi! SpellBad" .s:fmt_curl .s:fg_none .s:bg_none .s:sp_red +exe "hi! SpellCap" .s:fmt_curl .s:fg_none .s:bg_none .s:sp_violet +exe "hi! SpellRare" .s:fmt_curl .s:fg_none .s:bg_none .s:sp_cyan +exe "hi! SpellLocal" .s:fmt_curl .s:fg_none .s:bg_none .s:sp_yellow +exe "hi! Pmenu" .s:fmt_none .s:fg_base0 .s:bg_base02 +exe "hi! PmenuSel" .s:fmt_none .s:fg_base2 .s:bg_base01 +exe "hi! PmenuSbar" .s:fmt_none .s:fg_base0 .s:bg_base2 +exe "hi! PmenuThumb" .s:fmt_none .s:fg_base03 .s:bg_base0 +exe "hi! TabLine" .s:fmt_undr .s:fg_base0 .s:bg_base02 .s:sp_base0 +exe "hi! TabLineSel" .s:fmt_undr .s:fg_base2 .s:bg_base01 .s:sp_base0 +exe "hi! TabLineFill" .s:fmt_undr .s:fg_base0 .s:bg_base02 .s:sp_base0 +exe "hi! CursorColumn" .s:fmt_none .s:fg_none .s:bg_base02 +exe "hi! CursorLine" .s:fmt_uopt .s:fg_none .s:bg_base02 .s:sp_base1 +exe "hi! ColorColumn" .s:fmt_none .s:fg_none .s:bg_base02 +exe "hi! Cursor" .s:fmt_none .s:fg_base03 .s:bg_base0 +hi! link lCursor Cursor +exe "hi! MatchParen" .s:fmt_bold .s:fg_red .s:bg_base01 + +"}}} +" vim syntax highlighting "{{{ +" --------------------------------------------------------------------- +exe "hi! vimLineComment" . s:fg_base01 .s:bg_none .s:fmt_ital +exe "hi! vimCommentString".s:fg_violet .s:bg_none .s:fmt_none +hi! link vimVar Identifier +hi! link vimFunc Function +hi! link vimUserFunc Function +exe "hi! vimCommand" . s:fg_yellow .s:bg_none .s:fmt_none +exe "hi! vimCmdSep" . s:fg_blue .s:bg_none .s:fmt_bold +exe "hi! helpExample" . s:fg_base1 .s:bg_none .s:fmt_none +hi! link helpSpecial Special +exe "hi! helpOption" . s:fg_cyan .s:bg_none .s:fmt_none +exe "hi! helpNote" . s:fg_magenta.s:bg_none .s:fmt_none +exe "hi! helpVim" . s:fg_magenta.s:bg_none .s:fmt_none +exe "hi! helpHyperTextJump" .s:fg_blue .s:bg_none .s:fmt_undr +exe "hi! helpHyperTextEntry".s:fg_green .s:bg_none .s:fmt_none +exe "hi! vimIsCommand" . s:fg_base00 .s:bg_none .s:fmt_none +exe "hi! vimSynMtchOpt" . s:fg_yellow .s:bg_none .s:fmt_none +exe "hi! vimSynType" . s:fg_cyan .s:bg_none .s:fmt_none +exe "hi! vimHiLink" . s:fg_blue .s:bg_none .s:fmt_none +exe "hi! vimHiGroup" . s:fg_blue .s:bg_none .s:fmt_none +exe "hi! vimGroup" . s:fg_blue .s:bg_none .s:fmt_undb +"}}} +" html highlighting "{{{ +" --------------------------------------------------------------------- +exe "hi! htmlTag" . s:fg_base01 .s:bg_none .s:fmt_none +exe "hi! htmlEndTag" . s:fg_base01 .s:bg_none .s:fmt_none +exe "hi! htmlTagN" . s:fg_base1 .s:bg_none .s:fmt_bold +exe "hi! htmlTagName" . s:fg_blue .s:bg_none .s:fmt_bold +exe "hi! htmlSpecialTagName". s:fg_blue .s:bg_none .s:fmt_ital +exe "hi! htmlArg" . s:fg_base00 .s:bg_none .s:fmt_none +exe "hi! javaScript" . s:fg_yellow .s:bg_none .s:fmt_none +"}}} +" perl highlighting "{{{ +" --------------------------------------------------------------------- +exe "hi! perlHereDoc" . s:fg_base1 .s:bg_back .s:fmt_none +exe "hi! perlVarPlain" . s:fg_yellow .s:bg_back .s:fmt_none +exe "hi! perlStatementFileDesc". s:fg_cyan.s:bg_back.s:fmt_none + +"}}} +" tex highlighting "{{{ +" --------------------------------------------------------------------- +exe "hi! texStatement" . s:fg_cyan .s:bg_back .s:fmt_none +exe "hi! texMathZoneX" . s:fg_yellow .s:bg_back .s:fmt_none +exe "hi! texMathMatcher" . s:fg_yellow .s:bg_back .s:fmt_none +exe "hi! texMathMatcher" . s:fg_yellow .s:bg_back .s:fmt_none +exe "hi! texRefLabel" . s:fg_yellow .s:bg_back .s:fmt_none +"}}} +" ruby highlighting "{{{ +" --------------------------------------------------------------------- +exe "hi! rubyDefine" . s:fg_base1 .s:bg_back .s:fmt_bold +"rubyInclude +"rubySharpBang +"rubyAccess +"rubyPredefinedVariable +"rubyBoolean +"rubyClassVariable +"rubyBeginEnd +"rubyRepeatModifier +"hi! link rubyArrayDelimiter Special " [ , , ] +"rubyCurlyBlock { , , } + +"hi! link rubyClass Keyword +"hi! link rubyModule Keyword +"hi! link rubyKeyword Keyword +"hi! link rubyOperator Operator +"hi! link rubyIdentifier Identifier +"hi! link rubyInstanceVariable Identifier +"hi! link rubyGlobalVariable Identifier +"hi! link rubyClassVariable Identifier +"hi! link rubyConstant Type +"}}} +" haskell syntax highlighting"{{{ +" --------------------------------------------------------------------- +" For use with syntax/haskell.vim : Haskell Syntax File +" http://www.vim.org/scripts/script.php?script_id=3034 +" See also Steffen Siering's github repository: +" http://github.com/urso/dotrc/blob/master/vim/syntax/haskell.vim +" --------------------------------------------------------------------- +" +" Treat True and False specially, see the plugin referenced above +let hs_highlight_boolean=1 +" highlight delims, see the plugin referenced above +let hs_highlight_delimiters=1 + +exe "hi! cPreCondit". s:fg_orange.s:bg_none .s:fmt_none + +exe "hi! VarId" . s:fg_blue .s:bg_none .s:fmt_none +exe "hi! ConId" . s:fg_yellow .s:bg_none .s:fmt_none +exe "hi! hsImport" . s:fg_magenta.s:bg_none .s:fmt_none +exe "hi! hsString" . s:fg_base00 .s:bg_none .s:fmt_none + +exe "hi! hsStructure" . s:fg_cyan .s:bg_none .s:fmt_none +exe "hi! hs_hlFunctionName" . s:fg_blue .s:bg_none +exe "hi! hsStatement" . s:fg_cyan .s:bg_none .s:fmt_none +exe "hi! hsImportLabel" . s:fg_cyan .s:bg_none .s:fmt_none +exe "hi! hs_OpFunctionName" . s:fg_yellow .s:bg_none .s:fmt_none +exe "hi! hs_DeclareFunction" . s:fg_orange .s:bg_none .s:fmt_none +exe "hi! hsVarSym" . s:fg_cyan .s:bg_none .s:fmt_none +exe "hi! hsType" . s:fg_yellow .s:bg_none .s:fmt_none +exe "hi! hsTypedef" . s:fg_cyan .s:bg_none .s:fmt_none +exe "hi! hsModuleName" . s:fg_green .s:bg_none .s:fmt_undr +exe "hi! hsModuleStartLabel" . s:fg_magenta.s:bg_none .s:fmt_none +hi! link hsImportParams Delimiter +hi! link hsDelimTypeExport Delimiter +hi! link hsModuleStartLabel hsStructure +hi! link hsModuleWhereLabel hsModuleStartLabel + +" following is for the haskell-conceal plugin +" the first two items don't have an impact, but better safe +exe "hi! hsNiceOperator" . s:fg_cyan .s:bg_none .s:fmt_none +exe "hi! hsniceoperator" . s:fg_cyan .s:bg_none .s:fmt_none + +"}}} +" pandoc markdown syntax highlighting "{{{ +" --------------------------------------------------------------------- + +"PandocHiLink pandocNormalBlock +exe "hi! pandocTitleBlock" .s:fg_blue .s:bg_none .s:fmt_none +exe "hi! pandocTitleBlockTitle" .s:fg_blue .s:bg_none .s:fmt_bold +exe "hi! pandocTitleComment" .s:fg_blue .s:bg_none .s:fmt_bold +exe "hi! pandocComment" .s:fg_base01 .s:bg_none .s:fmt_ital +exe "hi! pandocVerbatimBlock" .s:fg_yellow .s:bg_none .s:fmt_none +hi! link pandocVerbatimBlockDeep pandocVerbatimBlock +hi! link pandocCodeBlock pandocVerbatimBlock +hi! link pandocCodeBlockDelim pandocVerbatimBlock +exe "hi! pandocBlockQuote" .s:fg_blue .s:bg_none .s:fmt_none +exe "hi! pandocBlockQuoteLeader1" .s:fg_blue .s:bg_none .s:fmt_none +exe "hi! pandocBlockQuoteLeader2" .s:fg_cyan .s:bg_none .s:fmt_none +exe "hi! pandocBlockQuoteLeader3" .s:fg_yellow .s:bg_none .s:fmt_none +exe "hi! pandocBlockQuoteLeader4" .s:fg_red .s:bg_none .s:fmt_none +exe "hi! pandocBlockQuoteLeader5" .s:fg_base0 .s:bg_none .s:fmt_none +exe "hi! pandocBlockQuoteLeader6" .s:fg_base01 .s:bg_none .s:fmt_none +exe "hi! pandocListMarker" .s:fg_magenta.s:bg_none .s:fmt_none +exe "hi! pandocListReference" .s:fg_magenta.s:bg_none .s:fmt_undr + +" Definitions +" --------------------------------------------------------------------- +let s:fg_pdef = s:fg_violet +exe "hi! pandocDefinitionBlock" .s:fg_pdef .s:bg_none .s:fmt_none +exe "hi! pandocDefinitionTerm" .s:fg_pdef .s:bg_none .s:fmt_stnd +exe "hi! pandocDefinitionIndctr" .s:fg_pdef .s:bg_none .s:fmt_bold +exe "hi! pandocEmphasisDefinition" .s:fg_pdef .s:bg_none .s:fmt_ital +exe "hi! pandocEmphasisNestedDefinition" .s:fg_pdef .s:bg_none .s:fmt_bldi +exe "hi! pandocStrongEmphasisDefinition" .s:fg_pdef .s:bg_none .s:fmt_bold +exe "hi! pandocStrongEmphasisNestedDefinition" .s:fg_pdef.s:bg_none.s:fmt_bldi +exe "hi! pandocStrongEmphasisEmphasisDefinition" .s:fg_pdef.s:bg_none.s:fmt_bldi +exe "hi! pandocStrikeoutDefinition" .s:fg_pdef .s:bg_none .s:fmt_revr +exe "hi! pandocVerbatimInlineDefinition" .s:fg_pdef .s:bg_none .s:fmt_none +exe "hi! pandocSuperscriptDefinition" .s:fg_pdef .s:bg_none .s:fmt_none +exe "hi! pandocSubscriptDefinition" .s:fg_pdef .s:bg_none .s:fmt_none + +" Tables +" --------------------------------------------------------------------- +let s:fg_ptable = s:fg_blue +exe "hi! pandocTable" .s:fg_ptable.s:bg_none .s:fmt_none +exe "hi! pandocTableStructure" .s:fg_ptable.s:bg_none .s:fmt_none +hi! link pandocTableStructureTop pandocTableStructre +hi! link pandocTableStructureEnd pandocTableStructre +exe "hi! pandocTableZebraLight" .s:fg_ptable.s:bg_base03.s:fmt_none +exe "hi! pandocTableZebraDark" .s:fg_ptable.s:bg_base02.s:fmt_none +exe "hi! pandocEmphasisTable" .s:fg_ptable.s:bg_none .s:fmt_ital +exe "hi! pandocEmphasisNestedTable" .s:fg_ptable.s:bg_none .s:fmt_bldi +exe "hi! pandocStrongEmphasisTable" .s:fg_ptable.s:bg_none .s:fmt_bold +exe "hi! pandocStrongEmphasisNestedTable" .s:fg_ptable.s:bg_none .s:fmt_bldi +exe "hi! pandocStrongEmphasisEmphasisTable" .s:fg_ptable.s:bg_none .s:fmt_bldi +exe "hi! pandocStrikeoutTable" .s:fg_ptable.s:bg_none .s:fmt_revr +exe "hi! pandocVerbatimInlineTable" .s:fg_ptable.s:bg_none .s:fmt_none +exe "hi! pandocSuperscriptTable" .s:fg_ptable.s:bg_none .s:fmt_none +exe "hi! pandocSubscriptTable" .s:fg_ptable.s:bg_none .s:fmt_none + +" Headings +" --------------------------------------------------------------------- +let s:fg_phead = s:fg_orange +exe "hi! pandocHeading" .s:fg_phead .s:bg_none.s:fmt_bold +exe "hi! pandocHeadingMarker" .s:fg_yellow.s:bg_none.s:fmt_bold +exe "hi! pandocEmphasisHeading" .s:fg_phead .s:bg_none.s:fmt_bldi +exe "hi! pandocEmphasisNestedHeading" .s:fg_phead .s:bg_none.s:fmt_bldi +exe "hi! pandocStrongEmphasisHeading" .s:fg_phead .s:bg_none.s:fmt_bold +exe "hi! pandocStrongEmphasisNestedHeading" .s:fg_phead .s:bg_none.s:fmt_bldi +exe "hi! pandocStrongEmphasisEmphasisHeading".s:fg_phead .s:bg_none.s:fmt_bldi +exe "hi! pandocStrikeoutHeading" .s:fg_phead .s:bg_none.s:fmt_revr +exe "hi! pandocVerbatimInlineHeading" .s:fg_phead .s:bg_none.s:fmt_bold +exe "hi! pandocSuperscriptHeading" .s:fg_phead .s:bg_none.s:fmt_bold +exe "hi! pandocSubscriptHeading" .s:fg_phead .s:bg_none.s:fmt_bold + +" Links +" --------------------------------------------------------------------- +exe "hi! pandocLinkDelim" .s:fg_base01 .s:bg_none .s:fmt_none +exe "hi! pandocLinkLabel" .s:fg_blue .s:bg_none .s:fmt_undr +exe "hi! pandocLinkText" .s:fg_blue .s:bg_none .s:fmt_undb +exe "hi! pandocLinkURL" .s:fg_base00 .s:bg_none .s:fmt_undr +exe "hi! pandocLinkTitle" .s:fg_base00 .s:bg_none .s:fmt_undi +exe "hi! pandocLinkTitleDelim" .s:fg_base01 .s:bg_none .s:fmt_undi .s:sp_base00 +exe "hi! pandocLinkDefinition" .s:fg_cyan .s:bg_none .s:fmt_undr .s:sp_base00 +exe "hi! pandocLinkDefinitionID" .s:fg_blue .s:bg_none .s:fmt_bold +exe "hi! pandocImageCaption" .s:fg_violet .s:bg_none .s:fmt_undb +exe "hi! pandocFootnoteLink" .s:fg_green .s:bg_none .s:fmt_undr +exe "hi! pandocFootnoteDefLink" .s:fg_green .s:bg_none .s:fmt_bold +exe "hi! pandocFootnoteInline" .s:fg_green .s:bg_none .s:fmt_undb +exe "hi! pandocFootnote" .s:fg_green .s:bg_none .s:fmt_none +exe "hi! pandocCitationDelim" .s:fg_magenta.s:bg_none .s:fmt_none +exe "hi! pandocCitation" .s:fg_magenta.s:bg_none .s:fmt_none +exe "hi! pandocCitationID" .s:fg_magenta.s:bg_none .s:fmt_undr +exe "hi! pandocCitationRef" .s:fg_magenta.s:bg_none .s:fmt_none + +" Main Styles +" --------------------------------------------------------------------- +exe "hi! pandocStyleDelim" .s:fg_base01 .s:bg_none .s:fmt_none +exe "hi! pandocEmphasis" .s:fg_base0 .s:bg_none .s:fmt_ital +exe "hi! pandocEmphasisNested" .s:fg_base0 .s:bg_none .s:fmt_bldi +exe "hi! pandocStrongEmphasis" .s:fg_base0 .s:bg_none .s:fmt_bold +exe "hi! pandocStrongEmphasisNested" .s:fg_base0 .s:bg_none .s:fmt_bldi +exe "hi! pandocStrongEmphasisEmphasis" .s:fg_base0 .s:bg_none .s:fmt_bldi +exe "hi! pandocStrikeout" .s:fg_base01 .s:bg_none .s:fmt_revr +exe "hi! pandocVerbatimInline" .s:fg_yellow .s:bg_none .s:fmt_none +exe "hi! pandocSuperscript" .s:fg_violet .s:bg_none .s:fmt_none +exe "hi! pandocSubscript" .s:fg_violet .s:bg_none .s:fmt_none + +exe "hi! pandocRule" .s:fg_blue .s:bg_none .s:fmt_bold +exe "hi! pandocRuleLine" .s:fg_blue .s:bg_none .s:fmt_bold +exe "hi! pandocEscapePair" .s:fg_red .s:bg_none .s:fmt_bold +exe "hi! pandocCitationRef" .s:fg_magenta.s:bg_none .s:fmt_none +exe "hi! pandocNonBreakingSpace" . s:fg_red .s:bg_none .s:fmt_revr +hi! link pandocEscapedCharacter pandocEscapePair +hi! link pandocLineBreak pandocEscapePair + +" Embedded Code +" --------------------------------------------------------------------- +exe "hi! pandocMetadataDelim" .s:fg_base01 .s:bg_none .s:fmt_none +exe "hi! pandocMetadata" .s:fg_blue .s:bg_none .s:fmt_none +exe "hi! pandocMetadataKey" .s:fg_blue .s:bg_none .s:fmt_none +exe "hi! pandocMetadata" .s:fg_blue .s:bg_none .s:fmt_bold +hi! link pandocMetadataTitle pandocMetadata + +"}}} +" Utility autocommand "{{{ +" --------------------------------------------------------------------- +" In cases where Solarized is initialized inside a terminal vim session and +" then transferred to a gui session via the command `:gui`, the gui vim process +" does not re-read the colorscheme (or .vimrc for that matter) so any `has_gui` +" related code that sets gui specific values isn't executed. +" +" Currently, Solarized sets only the cterm or gui values for the colorscheme +" depending on gui or terminal mode. It's possible that, if the following +" autocommand method is deemed excessively poor form, that approach will be +" used again and the autocommand below will be dropped. +" +" However it seems relatively benign in this case to include the autocommand +" here. It fires only in cases where vim is transferring from terminal to gui +" mode (detected with the script scope s:vmode variable). It also allows for +" other potential terminal customizations that might make gui mode suboptimal. +" +autocmd GUIEnter * if (s:vmode != "gui") | exe "colorscheme " . g:colors_name | endif +"}}} +" License "{{{ +" --------------------------------------------------------------------- +" +" Copyright (c) 2011 Ethan Schoonover +" +" Permission is hereby granted, free of charge, to any person obtaining a copy +" of this software and associated documentation files (the "Software"), to deal +" in the Software without restriction, including without limitation the rights +" to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +" copies of the Software, and to permit persons to whom the Software is +" furnished to do so, subject to the following conditions: +" +" The above copyright notice and this permission notice shall be included in +" all copies or substantial portions of the Software. +" +" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +" OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +" THE SOFTWARE. +" +" vim:foldmethod=marker:foldlevel=0 +"}}} diff --git a/.vim/swaps/.gitignore b/.vim/swaps/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/.vim/syntax/json.vim b/.vim/syntax/json.vim new file mode 100644 index 0000000..1e7761a --- /dev/null +++ b/.vim/syntax/json.vim @@ -0,0 +1,74 @@ +" Vim syntax file +" Language: JSON +" Maintainer: Jeroen Ruigrok van der Werven +" Last Change: 2009-06-16 +" Version: 0.4 +" {{{1 + +" Syntax setup {{{2 +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded + +if !exists("main_syntax") + if version < 600 + syntax clear + elseif exists("b:current_syntax") + finish + endif + let main_syntax = 'json' +endif + +" Syntax: Strings {{{2 +syn region jsonString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=jsonEscape +" Syntax: JSON does not allow strings with single quotes, unlike JavaScript. +syn region jsonStringSQ start=+'+ skip=+\\\\\|\\"+ end=+'+ + +" Syntax: Escape sequences {{{3 +syn match jsonEscape "\\["\\/bfnrt]" contained +syn match jsonEscape "\\u\x\{4}" contained + +" Syntax: Strings should always be enclosed with quotes. +syn match jsonNoQuotes "\<\a\+\>" + +" Syntax: Numbers {{{2 +syn match jsonNumber "-\=\<\%(0\|[1-9]\d*\)\%(\.\d\+\)\=\%([eE][-+]\=\d\+\)\=\>" + +" Syntax: An integer part of 0 followed by other digits is not allowed. +syn match jsonNumError "-\=\<0\d\.\d*\>" + +" Syntax: Boolean {{{2 +syn keyword jsonBoolean true false + +" Syntax: Null {{{2 +syn keyword jsonNull null + +" Syntax: Braces {{{2 +syn match jsonBraces "[{}\[\]]" + +" Define the default highlighting. {{{1 +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_json_syn_inits") + if version < 508 + let did_json_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + HiLink jsonString String + HiLink jsonEscape Special + HiLink jsonNumber Number + HiLink jsonBraces Operator + HiLink jsonNull Function + HiLink jsonBoolean Boolean + + HiLink jsonNumError Error + HiLink jsonStringSQ Error + HiLink jsonNoQuotes Error + delcommand HiLink +endif + +let b:current_syntax = "json" +if main_syntax == 'json' + unlet main_syntax +endif diff --git a/.vim/undo/.gitignore b/.vim/undo/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/.vimrc b/.vimrc new file mode 100644 index 0000000..25cf0d5 --- /dev/null +++ b/.vimrc @@ -0,0 +1,106 @@ +" Use the Solarized Dark theme +set background=dark +colorscheme solarized +let g:solarized_termtrans=1 + +" Make Vim more useful +set nocompatible +" Use the OS clipboard by default (on versions compiled with `+clipboard`) +set clipboard=unnamed +" Enhance command-line completion +set wildmenu +" Allow cursor keys in insert mode +set esckeys +" Allow backspace in insert mode +set backspace=indent,eol,start +" Optimize for fast terminal connections +set ttyfast +" Add the g flag to search/replace by default +set gdefault +" Use UTF-8 without BOM +set encoding=utf-8 nobomb +" Change mapleader +let mapleader="," +" Don’t add empty newlines at the end of files +set binary +set noeol +" Centralize backups, swapfiles and undo history +set backupdir=~/.vim/backups +set directory=~/.vim/swaps +if exists("&undodir") + set undodir=~/.vim/undo +endif + +" Don’t create backups when editing files in certain directories +set backupskip=/tmp/*,/private/tmp/* + +" Respect modeline in files +set modeline +set modelines=4 +" Enable per-directory .vimrc files and disable unsafe commands in them +set exrc +set secure +" Enable line numbers +set number +" Enable syntax highlighting +syntax on +" Highlight current line +set cursorline +" Make tabs as wide as two spaces +set tabstop=2 +" Show “invisible” characters +set lcs=tab:▸\ ,trail:·,eol:¬,nbsp:_ +set list +" Highlight searches +set hlsearch +" Ignore case of searches +set ignorecase +" Highlight dynamically as pattern is typed +set incsearch +" Always show status line +set laststatus=2 +" Enable mouse in all modes +set mouse=a +" Disable error bells +set noerrorbells +" Don’t reset cursor to start of line when moving around. +set nostartofline +" Show the cursor position +set ruler +" Don’t show the intro message when starting Vim +set shortmess=atI +" Show the current mode +set showmode +" Show the filename in the window titlebar +set title +" Show the (partial) command as it’s being typed +set showcmd +" Use relative line numbers +if exists("&relativenumber") + set relativenumber + au BufReadPost * set relativenumber +endif +" Start scrolling three lines before the horizontal window border +set scrolloff=3 + +" Strip trailing whitespace (,ss) +function! StripWhitespace() + let save_cursor = getpos(".") + let old_query = getreg('/') + :%s/\s\+$//e + call setpos('.', save_cursor) + call setreg('/', old_query) +endfunction +noremap ss :call StripWhitespace() +" Save a file as root (,W) +noremap W :w !sudo tee % > /dev/null + +" Automatic commands +if has("autocmd") + " Enable file type detection + filetype on + " Treat .json files as .js + autocmd BufNewFile,BufRead *.json setfiletype json syntax=javascript + " Treat .md files as Markdown + autocmd BufNewFile,BufRead *.md setlocal filetype=markdown +endif diff --git a/.wgetrc b/.wgetrc new file mode 100644 index 0000000..eb531a1 --- /dev/null +++ b/.wgetrc @@ -0,0 +1,38 @@ +# Use the server-provided last modification date, if available +timestamping = on + +# Do not go up in the directory structure when downloading recursively +no_parent = on + +# Wait 60 seconds before timing out. This applies to all timeouts: DNS, connect and read. (The default read timeout is 15 minutes!) +timeout = 60 + +# Retry a few times when a download fails, but don’t overdo it. (The default is 20!) +tries = 3 + +# Retry even when the connection was refused +retry_connrefused = on + +# Use the last component of a redirection URL for the local file name +trust_server_names = on + +# Follow FTP links from HTML documents by default +follow_ftp = on + +# Add a `.html` extension to `text/html` or `application/xhtml+xml` files that lack one, or a `.css` extension to `text/css` files that lack one +adjust_extension = on + +# Use UTF-8 as the default system encoding +# Disabled as it makes `wget` builds that don’t support this feature unusable. +# Does anyone know how to conditionally configure a wget setting? +# http://unix.stackexchange.com/q/34730/6040 +#local_encoding = UTF-8 + +# Ignore `robots.txt` and `` +robots = off + +# Print the HTTP and FTP server responses +server_response = on + +# Disguise as IE 9 on Windows 7 +user_agent = Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0) diff --git a/LICENSE-MIT.txt b/LICENSE-MIT.txt new file mode 100644 index 0000000..a41e0a7 --- /dev/null +++ b/LICENSE-MIT.txt @@ -0,0 +1,20 @@ +Copyright Mathias Bynens + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..f3968e5 --- /dev/null +++ b/README.md @@ -0,0 +1,110 @@ +# Mathias’s dotfiles + +![Screenshot of my shell prompt](https://i.imgur.com/EkEtphC.png) + +## Installation + +**Warning:** If you want to give these dotfiles a try, you should first fork this repository, review the code, and remove things you don’t want or need. Don’t blindly use my settings unless you know what that entails. Use at your own risk! + +### Using Git and the bootstrap script + +You can clone the repository wherever you want. (I like to keep it in `~/Projects/dotfiles`, with `~/dotfiles` as a symlink.) The bootstrapper script will pull in the latest version and copy the files to your home folder. + +```bash +git clone https://github.com/mathiasbynens/dotfiles.git && cd dotfiles && source bootstrap.sh +``` + +To update, `cd` into your local `dotfiles` repository and then: + +```bash +source bootstrap.sh +``` + +Alternatively, to update while avoiding the confirmation prompt: + +```bash +set -- -f; source bootstrap.sh +``` + +### Git-free install + +To install these dotfiles without Git: + +```bash +cd; curl -#L https://github.com/mathiasbynens/dotfiles/tarball/master | tar -xzv --strip-components 1 --exclude={README.md,bootstrap.sh,.osx,LICENSE-MIT.txt} +``` + +To update later on, just run that command again. + +### Specify the `$PATH` + +If `~/.path` exists, it will be sourced along with the other files, before any feature testing (such as [detecting which version of `ls` is being used](https://github.com/mathiasbynens/dotfiles/blob/aff769fd75225d8f2e481185a71d5e05b76002dc/.aliases#L21-26)) takes place. + +Here’s an example `~/.path` file that adds `/usr/local/bin` to the `$PATH`: + +```bash +export PATH="/usr/local/bin:$PATH" +``` + +### Add custom commands without creating a new fork + +If `~/.extra` exists, it will be sourced along with the other files. You can use this to add a few custom commands without the need to fork this entire repository, or to add commands you don’t want to commit to a public repository. + +My `~/.extra` looks something like this: + +```bash +# Git credentials +# Not in the repository, to prevent people from accidentally committing under my name +GIT_AUTHOR_NAME="Mathias Bynens" +GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME" +git config --global user.name "$GIT_AUTHOR_NAME" +GIT_AUTHOR_EMAIL="mathias@mailinator.com" +GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL" +git config --global user.email "$GIT_AUTHOR_EMAIL" +``` + +You could also use `~/.extra` to override settings, functions and aliases from my dotfiles repository. It’s probably better to [fork this repository](https://github.com/mathiasbynens/dotfiles/fork) instead, though. + +### Sensible macOS defaults + +When setting up a new Mac, you may want to set some sensible macOS defaults: + +```bash +./.macos +``` + +### Install Homebrew formulae + +When setting up a new Mac, you may want to install some common [Homebrew](http://brew.sh/) formulae (after installing Homebrew, of course): + +```bash +./brew.sh +``` + +## Feedback + +Suggestions/improvements +[welcome](https://github.com/mathiasbynens/dotfiles/issues)! + +## Author + +| [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](http://twitter.com/mathias "Follow @mathias on Twitter") | +|---| +| [Mathias Bynens](https://mathiasbynens.be/) | + +## Thanks to… + +* @ptb and [his _OS X Lion Setup_ repository](https://github.com/ptb/Mac-OS-X-Lion-Setup) +* [Ben Alman](http://benalman.com/) and his [dotfiles repository](https://github.com/cowboy/dotfiles) +* [Chris Gerke](http://www.randomsquared.com/) and his [tutorial on creating an OS X SOE master image](http://chris-gerke.blogspot.com/2012/04/mac-osx-soe-master-image-day-7.html) + [_Insta_ repository](https://github.com/cgerke/Insta) +* [Cătălin Mariș](https://github.com/alrra) and his [dotfiles repository](https://github.com/alrra/dotfiles) +* [Gianni Chiappetta](http://gf3.ca/) for sharing his [amazing collection of dotfiles](https://github.com/gf3/dotfiles) +* [Jan Moesen](http://jan.moesen.nu/) and his [ancient `.bash_profile`](https://gist.github.com/1156154) + [shiny _tilde_ repository](https://github.com/janmoesen/tilde) +* [Lauri ‘Lri’ Ranta](http://lri.me/) for sharing [loads of hidden preferences](http://osxnotes.net/defaults.html) +* [Matijs Brinkhuis](http://hotfusion.nl/) and his [dotfiles repository](https://github.com/matijs/dotfiles) +* [Nicolas Gallagher](http://nicolasgallagher.com/) and his [dotfiles repository](https://github.com/necolas/dotfiles) +* [Sindre Sorhus](http://sindresorhus.com/) +* [Tom Ryder](https://sanctum.geek.nz/) and his [dotfiles repository](https://sanctum.geek.nz/cgit/dotfiles.git/about) +* [Kevin Suttle](http://kevinsuttle.com/) and his [dotfiles repository](https://github.com/kevinSuttle/dotfiles) and [OSXDefaults project](https://github.com/kevinSuttle/OSXDefaults), which aims to provide better documentation for [`~/.macos`](https://mths.be/macos) +* [Haralan Dobrev](http://hkdobrev.com/) +* anyone who [contributed a patch](https://github.com/mathiasbynens/dotfiles/contributors) or [made a helpful suggestion](https://github.com/mathiasbynens/dotfiles/issues) diff --git a/bin/subl b/bin/subl new file mode 120000 index 0000000..0170a20 --- /dev/null +++ b/bin/subl @@ -0,0 +1 @@ +/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl \ No newline at end of file diff --git a/bootstrap.sh b/bootstrap.sh new file mode 100755 index 0000000..6844b84 --- /dev/null +++ b/bootstrap.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash + +cd "$(dirname "${BASH_SOURCE}")"; + +git pull origin master; + +function doIt() { + rsync --exclude ".git/" \ + --exclude ".DS_Store" \ + --exclude ".osx" \ + --exclude "bootstrap.sh" \ + --exclude "README.md" \ + --exclude "LICENSE-MIT.txt" \ + -avh --no-perms . ~; + source ~/.bash_profile; +} + +if [ "$1" == "--force" -o "$1" == "-f" ]; then + doIt; +else + read -p "This may overwrite existing files in your home directory. Are you sure? (y/n) " -n 1; + echo ""; + if [[ $REPLY =~ ^[Yy]$ ]]; then + doIt; + fi; +fi; +unset doIt; diff --git a/brew.sh b/brew.sh new file mode 100755 index 0000000..dc8a116 --- /dev/null +++ b/brew.sh @@ -0,0 +1,105 @@ +#!/usr/bin/env bash + +# Install command-line tools using Homebrew. + +# Make sure we’re using the latest Homebrew. +brew update + +# Upgrade any already-installed formulae. +brew upgrade + +# Install GNU core utilities (those that come with macOS are outdated). +# Don’t forget to add `$(brew --prefix coreutils)/libexec/gnubin` to `$PATH`. +brew install coreutils + +# Install some other useful utilities like `sponge`. +brew install moreutils +# Install GNU `find`, `locate`, `updatedb`, and `xargs`, `g`-prefixed. +brew install findutils +# Install GNU `sed`, overwriting the built-in `sed`. +brew install gnu-sed --with-default-names +# Install Bash 4. +# Note: don’t forget to add `/usr/local/bin/bash` to `/etc/shells` before +# running `chsh`. +brew install bash +brew tap homebrew/versions +brew install bash-completion2 + +# Switch to using brew-installed bash as default shell +if ! fgrep -q '/usr/local/bin/bash' /etc/shells; then + echo '/usr/local/bin/bash' | sudo tee -a /etc/shells; + chsh -s /usr/local/bin/bash; +fi; + +# Install `wget` with IRI support. +brew install wget --with-iri + +# Install RingoJS and Narwhal. +# Note that the order in which these are installed is important; +# see http://git.io/brew-narwhal-ringo. +brew install ringojs +brew install narwhal + +# Install more recent versions of some macOS tools. +brew install vim --override-system-vi +brew install homebrew/dupes/grep +brew install homebrew/dupes/openssh +brew install homebrew/dupes/screen +brew install homebrew/php/php56 --with-gmp + +# Install font tools. +brew tap bramstein/webfonttools +brew install sfnt2woff +brew install sfnt2woff-zopfli +brew install woff2 + +# Install some CTF tools; see https://github.com/ctfs/write-ups. +brew install aircrack-ng +brew install bfg +brew install binutils +brew install binwalk +brew install cifer +brew install dex2jar +brew install dns2tcp +brew install fcrackzip +brew install foremost +brew install hashpump +brew install hydra +brew install john +brew install knock +brew install netpbm +brew install nmap +brew install pngcheck +brew install socat +brew install sqlmap +brew install tcpflow +brew install tcpreplay +brew install tcptrace +brew install ucspi-tcp # `tcpserver` etc. +brew install xpdf +brew install xz + +# Install other useful binaries. +brew install ack +brew install dark-mode +#brew install exiv2 +brew install git +brew install git-lfs +brew install imagemagick --with-webp +brew install lua +brew install lynx +brew install p7zip +brew install pigz +brew install pv +brew install rename +brew install rhino +brew install speedtest_cli +brew install ssh-copy-id +brew install testssl +brew install tree +brew install vbindiff +brew install webkit2png +brew install zopfli + +# Remove outdated versions from the cellar. +brew cleanup diff --git a/init/Preferences.sublime-settings b/init/Preferences.sublime-settings new file mode 100644 index 0000000..1d190f9 --- /dev/null +++ b/init/Preferences.sublime-settings @@ -0,0 +1,41 @@ +{ + "color_scheme": "Packages/Color Scheme - Default/Solarized (Dark).tmTheme", + "default_encoding": "UTF-8", + "default_line_ending": "unix", + "detect_indentation": false, + "draw_white_space": "all", + "ensure_newline_at_eof_on_save": false, + "file_exclude_patterns": + [ + ".DS_Store", + "Desktop.ini", + "*.pyc", + "._*", + "Thumbs.db", + ".Spotlight-V100", + ".Trashes" + ], + "folder_exclude_patterns": + [ + ".git", + "node_modules" + ], + "font_face": "Monaco", + "font_size": 13, + "highlight_modified_tabs": true, + "hot_exit": false, + "line_padding_bottom": 5, + "match_brackets": true, + "match_brackets_angle": true, + "remember_open_files": false, + "rulers": + [ + 80 + ], + "show_encoding": true, + "show_line_endings": true, + "tab_size": 2, + "translate_tabs_to_spaces": false, + "trim_trailing_white_space_on_save": true, + "word_wrap": true +} diff --git a/init/Solarized Dark xterm-256color.terminal b/init/Solarized Dark xterm-256color.terminal new file mode 100644 index 0000000..46f179d --- /dev/null +++ b/init/Solarized Dark xterm-256color.terminal @@ -0,0 +1,160 @@ + + + + + BackgroundColor + + YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS + AAGGoKMHCA9VJG51bGzTCQoLDA0OVU5TUkdCXE5TQ29sb3JTcGFjZVYkY2xhc3NPECgw + LjAxNTkyNDQwNTMxIDAuMTI2NTIwOTE2OCAwLjE1OTY5NjAxMjcAEAGAAtIQERITWiRj + bGFzc25hbWVYJGNsYXNzZXNXTlNDb2xvcqISFFhOU09iamVjdF8QD05TS2V5ZWRBcmNo + aXZlctEXGFRyb290gAEIERojLTI3O0FITltijY+RlqGqsrW+0NPYAAAAAAAAAQEAAAAA + AAAAGQAAAAAAAAAAAAAAAAAAANo= + + BlinkText + + CursorColor + + YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS + AAGGoKMHCA9VJG51bGzTCQoLDA0OVU5TUkdCXE5TQ29sb3JTcGFjZVYkY2xhc3NPECcw + LjQ0MDU4MDI0ODggMC41MDk2MjkzMDkyIDAuNTE2ODU3OTgxNwAQAYAC0hAREhNaJGNs + YXNzbmFtZVgkY2xhc3Nlc1dOU0NvbG9yohIUWE5TT2JqZWN0XxAPTlNLZXllZEFyY2hp + dmVy0RcYVHJvb3SAAQgRGiMtMjc7QUhOW2KMjpCVoKmxtL3P0tcAAAAAAAABAQAAAAAA + AAAZAAAAAAAAAAAAAAAAAAAA2Q== + + Font + + YnBsaXN0MDDUAQIDBAUGGBlYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS + AAGGoKQHCBESVSRudWxs1AkKCwwNDg8QVk5TU2l6ZVhOU2ZGbGFnc1ZOU05hbWVWJGNs + YXNzI0AqAAAAAAAAEBCAAoADXU1lbmxvLVJlZ3VsYXLSExQVFlokY2xhc3NuYW1lWCRj + bGFzc2VzVk5TRm9udKIVF1hOU09iamVjdF8QD05TS2V5ZWRBcmNoaXZlctEaG1Ryb290 + gAEIERojLTI3PEJLUltiaXJ0dniGi5afpqmyxMfMAAAAAAAAAQEAAAAAAAAAHAAAAAAA + AAAAAAAAAAAAAM4= + + FontAntialias + + FontHeightSpacing + 1.1000000000000001 + FontWidthSpacing + 1 + ProfileCurrentVersion + 2.02 + SelectionColor + + YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS + AAGGoKMHCA9VJG51bGzTCQoLDA0OVU5TUkdCXE5TQ29sb3JTcGFjZVYkY2xhc3NPECgw + LjAzOTM4MDczNjY1IDAuMTYwMTE2NDYzOSAwLjE5ODMzMjc1NjgAEAGAAtIQERITWiRj + bGFzc25hbWVYJGNsYXNzZXNXTlNDb2xvcqISFFhOU09iamVjdF8QD05TS2V5ZWRBcmNo + aXZlctEXGFRyb290gAEIERojLTI3O0FITltijY+RlqGqsrW+0NPYAAAAAAAAAQEAAAAA + AAAAGQAAAAAAAAAAAAAAAAAAANo= + + ShowWindowSettingsNameInTitle + + TerminalType + xterm-256color + TextBoldColor + + YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS + AAGGoKMHCA9VJG51bGzTCQoLDA0OVU5TUkdCXE5TQ29sb3JTcGFjZVYkY2xhc3NPECYw + LjUwNTk5MTkzNTcgMC41NjQ4NTgzNzcgMC41NjM2MzY1NDE0ABABgALSEBESE1okY2xh + c3NuYW1lWCRjbGFzc2VzV05TQ29sb3KiEhRYTlNPYmplY3RfEA9OU0tleWVkQXJjaGl2 + ZXLRFxhUcm9vdIABCBEaIy0yNztBSE5bYouNj5SfqLCzvM7R1gAAAAAAAAEBAAAAAAAA + ABkAAAAAAAAAAAAAAAAAAADY + + TextColor + + YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS + AAGGoKMHCA9VJG51bGzTCQoLDA0OVU5TUkdCXE5TQ29sb3JTcGFjZVYkY2xhc3NPECcw + LjQ0MDU4MDI0ODggMC41MDk2MjkzMDkyIDAuNTE2ODU3OTgxNwAQAYAC0hAREhNaJGNs + YXNzbmFtZVgkY2xhc3Nlc1dOU0NvbG9yohIUWE5TT2JqZWN0XxAPTlNLZXllZEFyY2hp + dmVy0RcYVHJvb3SAAQgRGiMtMjc7QUhOW2KMjpCVoKmxtL3P0tcAAAAAAAABAQAAAAAA + AAAZAAAAAAAAAAAAAAAAAAAA2Q== + + UseBrightBold + + blackColour + + BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm + ZmZmg7JNIT2DkvUjPoO+F0s+AYY= + + blueColour + + BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm + ZmZmgyqcAj6DtOHsPoO+RUg/AYY= + + brightBlackColour + + BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm + ZmZmg+ZzgjyDs44BPoNahyM+AYY= + + brightBlueColour + + BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm + ZmZmg7yT4T6DEXcCP4POUAQ/AYY= + + brightCyanColour + + BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm + ZmZmg7CIAT+Dj5oQP4N8ShA/AYY= + + brightGreenColour + + BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm + ZmZmgzyujT6DFZy2PoOYFsQ+AYY= + + brightMagentaColour + + BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm + ZmZmgxMjsj6D+uazPoNkyTc/AYY= + + brightRedColour + + BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm + ZmZmgyfkPT+D/15aPoMgl5Y9AYY= + + brightWhiteColour + + BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm + ZmZmg49LfT+D0Dt1P4MGM10/AYY= + + brightYellowColour + + BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm + ZmZmg1MTpj6DeHnQPoPQg+A+AYY= + + cyanColour + + BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm + ZmZmg4VRFj6DfyESP4PkZwY/AYY= + + greenColour + + BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm + ZmZmg9lI5j6DIYkKP4PVjKU8AYY= + + magentaColour + + BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm + ZmZmg/4CRz+DBTzdPYMgzt4+AYY= + + name + Solarized Dark xterm-256color + redColour + + BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm + ZmZmg6i7UT+DUATePYMl2hA+AYY= + + type + Window Settings + whiteColour + + BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm + ZmZmgzqGaj+D2tdjP4NYPUw/AYY= + + yellowColour + + BAtzdHJlYW10eXBlZIHoA4QBQISEhAdOU0NvbG9yAISECE5TT2JqZWN0AIWEAWMBhARm + ZmZmg0DAJT+DB17vPoM4Y8A8AYY= + + + diff --git a/init/Solarized Dark.itermcolors b/init/Solarized Dark.itermcolors new file mode 100644 index 0000000..d630a40 --- /dev/null +++ b/init/Solarized Dark.itermcolors @@ -0,0 +1,214 @@ + + + + + + Ansi 0 Color + + Blue Component + 0.19370138645172119 + Green Component + 0.15575926005840302 + Red Component + 0.0 + + Ansi 1 Color + + Blue Component + 0.14145714044570923 + Green Component + 0.10840655118227005 + Red Component + 0.81926977634429932 + + Ansi 10 Color + + Blue Component + 0.38298487663269043 + Green Component + 0.35665956139564514 + Red Component + 0.27671992778778076 + + Ansi 11 Color + + Blue Component + 0.43850564956665039 + Green Component + 0.40717673301696777 + Red Component + 0.32436618208885193 + + Ansi 12 Color + + Blue Component + 0.51685798168182373 + Green Component + 0.50962930917739868 + Red Component + 0.44058024883270264 + + Ansi 13 Color + + Blue Component + 0.72908437252044678 + Green Component + 0.33896297216415405 + Red Component + 0.34798634052276611 + + Ansi 14 Color + + Blue Component + 0.56363654136657715 + Green Component + 0.56485837697982788 + Red Component + 0.50599193572998047 + + Ansi 15 Color + + Blue Component + 0.86405980587005615 + Green Component + 0.95794391632080078 + Red Component + 0.98943418264389038 + + Ansi 2 Color + + Blue Component + 0.020208755508065224 + Green Component + 0.54115492105484009 + Red Component + 0.44977453351020813 + + Ansi 3 Color + + Blue Component + 0.023484811186790466 + Green Component + 0.46751424670219421 + Red Component + 0.64746475219726562 + + Ansi 4 Color + + Blue Component + 0.78231418132781982 + Green Component + 0.46265947818756104 + Red Component + 0.12754884362220764 + + Ansi 5 Color + + Blue Component + 0.43516635894775391 + Green Component + 0.10802463442087173 + Red Component + 0.77738940715789795 + + Ansi 6 Color + + Blue Component + 0.52502274513244629 + Green Component + 0.57082360982894897 + Red Component + 0.14679534733295441 + + Ansi 7 Color + + Blue Component + 0.79781103134155273 + Green Component + 0.89001238346099854 + Red Component + 0.91611063480377197 + + Ansi 8 Color + + Blue Component + 0.15170273184776306 + Green Component + 0.11783610284328461 + Red Component + 0.0 + + Ansi 9 Color + + Blue Component + 0.073530435562133789 + Green Component + 0.21325300633907318 + Red Component + 0.74176257848739624 + + Background Color + + Blue Component + 0.15170273184776306 + Green Component + 0.11783610284328461 + Red Component + 0.0 + + Bold Color + + Blue Component + 0.56363654136657715 + Green Component + 0.56485837697982788 + Red Component + 0.50599193572998047 + + Cursor Color + + Blue Component + 0.51685798168182373 + Green Component + 0.50962930917739868 + Red Component + 0.44058024883270264 + + Cursor Text Color + + Blue Component + 0.19370138645172119 + Green Component + 0.15575926005840302 + Red Component + 0.0 + + Foreground Color + + Blue Component + 0.51685798168182373 + Green Component + 0.50962930917739868 + Red Component + 0.44058024883270264 + + Selected Text Color + + Blue Component + 0.56363654136657715 + Green Component + 0.56485837697982788 + Red Component + 0.50599193572998047 + + Selection Color + + Blue Component + 0.19370138645172119 + Green Component + 0.15575926005840302 + Red Component + 0.0 + + +