From e3861280f5f9a4ce8b3e2a23aba3f6baf875f857 Mon Sep 17 00:00:00 2001 From: Bodaniel Jeanes Date: Fri, 25 Jun 2010 14:11:53 +1000 Subject: [PATCH] Organising dot files by purpose a bit --- Rakefile | 4 +- autotest => autotest/autotest | 0 ruby_fail.png => autotest/ruby_fail.png | Bin ruby_ok.png => autotest/ruby_ok.png | Bin aliases => bash/aliases | 0 bash_completion => bash/bash_completion | 0 bash_profile => bash/bash_profile | 0 bashrc => bash/bashrc | 0 exports => bash/exports | 0 git-completion => bash/git-completion | 0 rake-completion.rb => bash/rake-completion.rb | 0 save-directory => bash/save-directory | 0 terminal => bash/terminal | 0 fish/config.fish | 4 +- fish/functions/fish_prompt.fish | 35 ++++------------ fish/functions/log.fish | 2 +- gitattributes => git/gitattributes | 0 git/gitconfig | 38 ++++++++++++++++++ gitignore => git/gitignore | 0 gitrc => git/gitrc | 0 ackrc => misc/ackrc | 0 inputrc => misc/inputrc | 0 nanorc => misc/nanorc | 0 gemdoc => ruby/gemdoc | 0 gemrc => ruby/gemrc | 2 - irbrc => ruby/irbrc | 0 rdebugrc => ruby/rdebugrc | 0 27 files changed, 50 insertions(+), 35 deletions(-) rename autotest => autotest/autotest (100%) rename ruby_fail.png => autotest/ruby_fail.png (100%) rename ruby_ok.png => autotest/ruby_ok.png (100%) rename aliases => bash/aliases (100%) rename bash_completion => bash/bash_completion (100%) rename bash_profile => bash/bash_profile (100%) rename bashrc => bash/bashrc (100%) rename exports => bash/exports (100%) rename git-completion => bash/git-completion (100%) rename rake-completion.rb => bash/rake-completion.rb (100%) rename save-directory => bash/save-directory (100%) rename terminal => bash/terminal (100%) rename gitattributes => git/gitattributes (100%) create mode 100755 git/gitconfig rename gitignore => git/gitignore (100%) rename gitrc => git/gitrc (100%) rename ackrc => misc/ackrc (100%) rename inputrc => misc/inputrc (100%) rename nanorc => misc/nanorc (100%) rename gemdoc => ruby/gemdoc (100%) rename gemrc => ruby/gemrc (82%) rename irbrc => ruby/irbrc (100%) rename rdebugrc => ruby/rdebugrc (100%) diff --git a/Rakefile b/Rakefile index aed081b..0ad27db 100644 --- a/Rakefile +++ b/Rakefile @@ -3,8 +3,8 @@ require 'rake' desc "install the dot files into user's home directory" task :install do replace_all = false - Dir['*'].each do |file| - next if %w[Rakefile README].include? file + Dir['*'].each do |dir| + next unless File.directory?(dir) original = File.join(ENV['HOME'], ".#{file}") diff --git a/autotest b/autotest/autotest similarity index 100% rename from autotest rename to autotest/autotest diff --git a/ruby_fail.png b/autotest/ruby_fail.png similarity index 100% rename from ruby_fail.png rename to autotest/ruby_fail.png diff --git a/ruby_ok.png b/autotest/ruby_ok.png similarity index 100% rename from ruby_ok.png rename to autotest/ruby_ok.png diff --git a/aliases b/bash/aliases similarity index 100% rename from aliases rename to bash/aliases diff --git a/bash_completion b/bash/bash_completion similarity index 100% rename from bash_completion rename to bash/bash_completion diff --git a/bash_profile b/bash/bash_profile similarity index 100% rename from bash_profile rename to bash/bash_profile diff --git a/bashrc b/bash/bashrc similarity index 100% rename from bashrc rename to bash/bashrc diff --git a/exports b/bash/exports similarity index 100% rename from exports rename to bash/exports diff --git a/git-completion b/bash/git-completion similarity index 100% rename from git-completion rename to bash/git-completion diff --git a/rake-completion.rb b/bash/rake-completion.rb similarity index 100% rename from rake-completion.rb rename to bash/rake-completion.rb diff --git a/save-directory b/bash/save-directory similarity index 100% rename from save-directory rename to bash/save-directory diff --git a/terminal b/bash/terminal similarity index 100% rename from terminal rename to bash/terminal diff --git a/fish/config.fish b/fish/config.fish index 018ed01..742c3dc 100644 --- a/fish/config.fish +++ b/fish/config.fish @@ -4,9 +4,9 @@ mkdir -p ~/.l set fish_greeting '' -set path_list /Library/PostgreSQL8/bin /opt/local/*bin /opt/local/*/*bin /usr/local/*bin /usr/local/*/*bin /opt/nginx/*bin ~/.config/fish/bin +set path_list /Library/PostgreSQL8/bin /opt/local/*bin /usr/X11/bin /opt/local/*/*bin /usr/local/*bin /usr/local/*/*bin /usr/local/**/bin /opt/nginx/*bin ~/.config/fish/bin -set cd_path_list . ~ ~/Sites ~/Code /Volumes ~/.l +set cd_path_list . ~ ~/Sites ~/Sites/* ~/Code /Volumes ~/.l set PATH /usr/sbin /usr/bin /sbin /bin diff --git a/fish/functions/fish_prompt.fish b/fish/functions/fish_prompt.fish index e818ab0..269c01d 100755 --- a/fish/functions/fish_prompt.fish +++ b/fish/functions/fish_prompt.fish @@ -1,29 +1,8 @@ -# function fish_prompt --description 'Write out the prompt' -# set pr_timestamp (date '+%a %H:%M:%S') -# set pr_user (whoami) -# set pr_host (hostname | cut -d . -f 1) -# set pr_cwd (prompt_pwd) -# set pr_git_info (git_cwd_info) -# printf "\033[90m$pr_timestamp\033[0m $pr_user\033[90m@\033[0m$pr_host \033[90m$pr_cwd\033[0m \033[32m>\033[0m " -# end - function fish_prompt --description 'Write out the prompt' - printf '%s%s@%s%s ' (set_color green) (whoami) (hostname|cut -d . -f 1) (set_color normal) - - # Write the process working directory - if test -w "." - printf '%s%s' (set_color -o $fish_color_cwd) (prompt_pwd) - else - printf '%s%s' (set_color -o $fish_color_uneditable_cwd) (prompt_pwd) - end - - printf '%s%s ' (set_color red) (__git_ps1) - - if git_dirty - printf '%s☠ ' (set_color red) - end - - printf '%s$%s ' (set_color -o $fish_color_cwd) (set_color normal) - - printf '%s> ' (set_color normal) -end \ No newline at end of file + set -l prompt (color_print (command_status_color) '♪' ) + set -l date (color_print (set_color white) (date '+%a %H:%M:%S')) + set -l git (color_print (set_color red) (__git_ps1)) + set -l pwd (prompt_pwd) + + echo (printf '%s%s' $pwd $git) "$prompt " +end diff --git a/fish/functions/log.fish b/fish/functions/log.fish index d162f0e..1f3829a 100644 --- a/fish/functions/log.fish +++ b/fish/functions/log.fish @@ -1,5 +1,5 @@ function log - tail -fn0 log/*.log + tail -fn0 log/*.log /var/log/apache2/*_log end diff --git a/gitattributes b/git/gitattributes similarity index 100% rename from gitattributes rename to git/gitattributes diff --git a/git/gitconfig b/git/gitconfig new file mode 100755 index 0000000..938ad09 --- /dev/null +++ b/git/gitconfig @@ -0,0 +1,38 @@ +[user] + name = Bodaniel Jeanes + email = me@bjeanes.com +[merge] + summary = true + tool = opendiff +[alias] + co = checkout + put = push origin HEAD + push-all = "!for i in $(git config --list | grep -E ^remote\\..+\\.url | sed -E 's/^remote\\.(.*)\\.url=.*/\\1/'); do git push $i master; done" + unadd = reset HEAD +[apply] + whitespace = nowarn +[color] + branch = auto + diff = auto + status = auto + ui = auto +[core] + editor = mate -w + excludesfile = ~/.gitignore + whitespace = fix +[branch] + autosetupmerge = always + autosetuprebase = local +[push] + default = matching +[diff "ruby"] + funcname = ^ *\\(\\(class\\|module\\|def\\) .*\\) + + +[github] + user = bjeanes + token = df574517df9e5cef449ff0010fdce8b6 +[codebase] + username = bjeanes + domain = mocra.codebasehq.com + apikey = 5f1pkluckqk82ip9if8jomfbfxi38ofbn2keiata diff --git a/gitignore b/git/gitignore similarity index 100% rename from gitignore rename to git/gitignore diff --git a/gitrc b/git/gitrc similarity index 100% rename from gitrc rename to git/gitrc diff --git a/ackrc b/misc/ackrc similarity index 100% rename from ackrc rename to misc/ackrc diff --git a/inputrc b/misc/inputrc similarity index 100% rename from inputrc rename to misc/inputrc diff --git a/nanorc b/misc/nanorc similarity index 100% rename from nanorc rename to misc/nanorc diff --git a/gemdoc b/ruby/gemdoc similarity index 100% rename from gemdoc rename to ruby/gemdoc diff --git a/gemrc b/ruby/gemrc similarity index 82% rename from gemrc rename to ruby/gemrc index ed0779b..ad5ce80 100644 --- a/gemrc +++ b/ruby/gemrc @@ -6,8 +6,6 @@ gem: --no-ri gemcutter_key: 36e2540f40da9e6e1737951140f1723c :sources: - http://gemcutter.org -- http://gems.rubyforge.org/ -- http://gems.github.com/ :backtrace: false :bulk_threshold: 1000 rdoc: --inline-source --line-numbers --fmt=shtml --template=direct diff --git a/irbrc b/ruby/irbrc similarity index 100% rename from irbrc rename to ruby/irbrc diff --git a/rdebugrc b/ruby/rdebugrc similarity index 100% rename from rdebugrc rename to ruby/rdebugrc