Permalink
Browse files

Restructure the repo.

  • Loading branch information...
1 parent 29b7c47 commit 71eec168b091c91ef7d0a7297c85fc5fdfa704ea @paulmillr committed Sep 10, 2012
View
@@ -1,3 +1,3 @@
.DS_Store
*.pyc
-/Textmate/TextMate.pid
+/Textmate/TextMate.pid
View
@@ -5,21 +5,33 @@ My personal dotfiles.
![](http://f.cl.ly/items/1Z1H202e1x3i0U3Q3o3J/Screen%20Shot%202012-09-06%20at%202.38.47%20PM.png)
+## Features
+
+Shell (zsh):
+
+* Auto-completion
+* Syntax highlighting
+* Automatic setting up of terminal tab / window title to current dir
+* `rm` moves file to the OS X trash
+* A bunch of useful functions:
+ * `extract archive.tar.bz` — unpack any archive (supports many extensions)
+ * `ram safari` — show app RAM usage
+ * `loc py coffee js html css` — count lines of code
+ in current dir in a colourful way.
+
## Building system from scratch (reminder)
* Install [PragmataPro](http://www.myfonts.com/fonts/fsd/pragmata-pro/) font.
-* Install command line tools.
-* Change Terminal.app theme to terminal/paulmillr.terminal.
-* Link sublime text settings.
+* Install XCode & its Command Line Tools.
+* Change Terminal.app theme to `terminal/paulmillr.terminal`.
* Change default shell to ZSH: `chsh -s /bin/zsh`.
+* Insert proper hosts from `etc/hosts` to system’s `/etc/hosts`.
+* Create `~/Development/`
* Clone:
- * prezto (oh-my-zsh fork) `https://github.com/sorin-ionescu/prezto`
- * this project (dotfiles) and run `./install`
- * GitHub packages
+ * prezto (oh-my-zsh fork) `git clone --recursive https://github.com/sorin-ionescu/prezto.git "${ZDOTDIR:-$HOME}/.zprezto"`
+ * this project (dotfiles) and run `sh install.sh`
## License
-Some code is taken from:
-* [visionmedia/git-extras](https://github.com/visionmedia/git-extras) (MIT)
The MIT license.
File renamed without changes.
View
@@ -0,0 +1,55 @@
+#!/usr/bin/env livescript
+
+# Sort of “leet speak” stuff, but for russian letters.
+#
+# greeklit 'привет'
+# # => 'nρuвеm' is copied to clipboard.
+#
+# Could be freely distributed under the terms of MIT License.
+# Copyright (c) 2012 Paul Miller (paulmillr.com)
+
+prelude = require 'prelude-ls'
+prelude.installPrelude(global)
+
+chars =
+ 'а': 'α'
+ 'б': '6'
+ 'в': null
+ 'г': 'r'
+ 'д': 'g'
+ 'е': 'е'
+ 'ж': null
+ 'з': 'ʒ'
+ 'и': 'u'
+ 'к': null
+ 'л': 'ʌ'
+ 'м': 'ʍ'
+ 'н': null
+ 'о': 'о'
+ 'п': 'n'
+ 'р': 'ρ'
+ 'с': 'с'
+ 'т': 'm'
+ 'у': 'у'
+ 'ф': null
+ 'х': null
+ 'ш': 'ɯ'
+ 'щ': 'ϣ'
+ 'ч': null
+ 'э': null
+ 'ю': null
+ 'я': null
+
+replace = (list-of-chars) ->
+ list-of-chars |> map ((char) -> chars[char] ? char)
+
+read-stdin = ->
+ process.open-stdin!
+ process.stdin.on 'data', (buffer) ->
+ process.stdout.write "#{replace buffer.to-string!}"
+
+text = process.argv[2]
+if text?
+ process.stdout.write "#{replace text}\n"
+else
+ read-stdin!
@@ -0,0 +1,27 @@
+dev="$HOME/Development"
+dotfiles="$dev/paulmillr/dotfiles"
+bin="/usr/local/bin"
+
+link() {
+ from="$1"
+ to="$2"
+ echo "Linking '$from' to '$to'"
+ rm "$to"
+ ln -s "$from" "$to"
+}
+
+for location in home/*; do
+ file="${location##*/}"
+ file="${file%.*}"
+ link "$dotfiles/$location" "$HOME/.$file"
+done
+
+for location in bin/*; do
+ file="${location##*/}"
+ file="${file%.*}"
+ link "$dotfiles/$location" "$bin/$file"
+done
+
+if [[ `uname` == 'Darwin' ]]; then
+ link "$dotfiles/sublime/Preferences.sublime-settings" "$HOME/Library/Application Support/Sublime Text 2/Packages/User/Preferences.sublime-settings"
+fi
View
File renamed without changes.
View
@@ -0,0 +1,7 @@
+# echo 'Disabling useless Safari page previews...'
+# defaults write com.apple.Safari DebugSnapshotsUpdatePolicy -int 2
+# echo 'Disabling warning dialogue on downloaded applications...'
+# defaults write com.apple.LaunchServices LSQuarantine -bool NO
+echo 'Changing default screenshot location to ~/Downloads/...'
+defaults write com.apple.screencapture location ~/Downloads/
+killall SystemUIServer
File renamed without changes.
@@ -1,5 +1,9 @@
#!/usr/bin/env sh
+# Originally taked from
+# [visionmedia/git-extras](https://github.com/visionmedia/git-extras)
+# (MIT License).
+
CHANGELOG='CHANGELOG.md'
DATE=`date +'%B %d, %Y'`
PROJECT=`cat $CHANGELOG | egrep '^# (\w+)' | sed -e 's/^# \([a-zA-Z]*\).*/\1/' | head -n 1`
@@ -1,3 +1,7 @@
#!/usr/bin/env sh
+# Originally taked from
+# [visionmedia/git-extras](https://github.com/visionmedia/git-extras)
+# (MIT License).
+
git commit -a -m "$1" && git push -u origin
@@ -1,5 +1,9 @@
#!/usr/bin/env sh
+# Originally taked from
+# [visionmedia/git-extras](https://github.com/visionmedia/git-extras)
+# (MIT License).
+
branch=$1
test -z $branch && echo "branch required." 1>&2 && exit 1
git branch -D $branch
@@ -1,5 +1,9 @@
#!/usr/bin/env sh
+# Originally taked from
+# [visionmedia/git-extras](https://github.com/visionmedia/git-extras)
+# (MIT License).
+
hook() {
local hook=".git/hooks/$1.sh"
if test -f $hook; then
@@ -1,3 +1,7 @@
#!/usr/bin/env sh
+# Originally taked from
+# [visionmedia/git-extras](https://github.com/visionmedia/git-extras)
+# (MIT License).
+
git log --pretty=format:"%ae" | sort | uniq -c | sort -r
File renamed without changes.
File renamed without changes.
File renamed without changes.
View
@@ -0,0 +1,29 @@
+#
+# Executes commands at login post-zshrc.
+#
+# Authors:
+# Sorin Ionescu <sorin.ionescu@gmail.com>
+#
+
+# Execute code that does not affect the current session in the background.
+{
+ # Compile the completion dump to increase startup speed.
+ zcompdump="${ZDOTDIR:-$HOME}/.zcompdump"
+ if [[ "$zcompdump" -nt "${zcompdump}.zwc" || ! -s "${zcompdump}.zwc" ]]; then
+ zcompile "$zcompdump"
+ fi
+
+ # Set environment variables for launchd processes.
+ if [[ "$OSTYPE" == darwin* ]]; then
+ for env_var in PATH MANPATH; do
+ launchctl setenv "$env_var" "${(P)env_var}"
+ done
+ fi
+} &!
+
+# Print a random, hopefully interesting, adage.
+if (( $+commands[fortune] )); then
+ fortune -a
+ print
+fi
+
View
@@ -0,0 +1,51 @@
+#
+# Sets Prezto options.
+#
+# Authors:
+# Sorin Ionescu <sorin.ionescu@gmail.com>
+#
+
+# Set the key mapping style to 'emacs' or 'vi'.
+zstyle ':prezto:module:editor' keymap 'emacs'
+
+# Auto convert .... to ../..
+zstyle ':prezto:module:editor' dot-expansion 'no'
+
+# Set case-sensitivity for completion, history lookup, etc.
+zstyle ':prezto:*:*' case-sensitive 'no'
+
+# Color output (auto set to 'no' on dumb terminals).
+zstyle ':prezto:*:*' color 'yes'
+
+# Auto set the tab and window titles.
+zstyle ':prezto:module:terminal' auto-title 'yes'
+
+# Set the Zsh modules to load (man zshmodules).
+# zstyle ':prezto:load' zmodule 'attr' 'stat'
+
+# Set the Zsh functions to load (man zshcontrib).
+zstyle ':prezto:load' zfunction 'zargs' 'zmv'
+
+# Set the Prezto modules to load (browse modules).
+# The order matters.
+zstyle ':prezto:load' pmodule \
+ 'environment' \
+ 'terminal' \
+ 'history' \
+ 'directory' \
+ 'spectrum' \
+ 'utility' \
+ 'completion' \
+ 'prompt' \
+ 'syntax-highlighting' \
+ 'git' \
+ 'archive' \
+ 'osx' \
+ 'node' \
+ 'python' \
+ 'ruby'
+
+# Set the prompt theme to load.
+# Setting it to 'random' loads a random theme.
+# Auto set to 'off' on dumb terminals.
+zstyle ':prezto:module:prompt' theme 'off'
View
@@ -0,0 +1,7 @@
+#
+# Executes commands at login pre-zshrc.
+#
+# Authors:
+# Sorin Ionescu <sorin.ionescu@gmail.com>
+#
+
View
@@ -0,0 +1,100 @@
+#
+# Defines environment variables.
+#
+# Authors:
+# Sorin Ionescu <sorin.ionescu@gmail.com>
+#
+
+#
+# Browser
+#
+
+if [[ "$OSTYPE" == darwin* ]]; then
+ export BROWSER='open'
+fi
+
+#
+# Editors
+#
+
+export EDITOR='nano'
+export VISUAL='nano'
+export PAGER='less'
+
+#
+# Language
+#
+
+if [[ -z "$LANG" ]]; then
+ eval "$(locale)"
+fi
+
+#
+# Less
+#
+
+# Set the default Less options.
+# Mouse-wheel scrolling has been disabled by -X (disable screen clearing).
+# Remove -X and -F (exit if the content fits on one screen) to enable it.
+export LESS='-F -g -i -M -R -S -w -X -z-4'
+
+# Set the Less input preprocessor.
+if (( $+commands[lesspipe.sh] )); then
+ export LESSOPEN='| /usr/bin/env lesspipe.sh %s 2>&-'
+fi
+
+#
+# Paths
+#
+
+typeset -gU cdpath fpath mailpath manpath path
+typeset -gUT INFOPATH infopath
+
+# Set the the list of directories that cd searches.
+# cdpath=(
+# $cdpath
+# )
+
+# Set the list of directories that info searches for manuals.
+infopath=(
+ /usr/local/share/info
+ /usr/share/info
+ $infopath
+)
+
+# Set the list of directories that man searches for manuals.
+manpath=(
+ /usr/local/share/man
+ /usr/share/man
+ $manpath
+)
+
+for path_file in /etc/manpaths.d/*(.N); do
+ manpath+=($(<$path_file))
+done
+unset path_file
+
+# Set the list of directories that Zsh searches for programs.
+path=(
+ /usr/local/{bin,sbin}
+ /usr/{bin,sbin}
+ /{bin,sbin}
+ $path
+)
+
+for path_file in /etc/paths.d/*(.N); do
+ path+=($(<$path_file))
+done
+unset path_file
+
+#
+# Temporary Files
+#
+
+if [[ -d "$TMPDIR" ]]; then
+ export TMPPREFIX="${TMPDIR%/}/zsh"
+ if [[ ! -d "$TMPPREFIX" ]]; then
+ mkdir -p "$TMPPREFIX"
+ fi
+fi
+
Oops, something went wrong.

0 comments on commit 71eec16

Please sign in to comment.