From 7d24bd934aed1966b533c10aa6e7bcc806613912 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Sun, 3 Mar 2013 23:42:48 +0900 Subject: [PATCH 1/7] use end-mark.el --- emacs.el | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/emacs.el b/emacs.el index d5813fd..59c4f4c 100644 --- a/emacs.el +++ b/emacs.el @@ -452,6 +452,13 @@ found, otherwise returns nil." (set-face-underline-p 'vertical-border nil) +(and (fetch-library + "https://raw.github.com/tarao/elisp/master/end-mark.el" + t) + (require 'end-mark nil t) + (global-end-mark-mode)) + + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; file handling From 1a408ea81b07e9d008eadc76c71a3665ec65a931 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Wed, 6 Mar 2013 11:22:08 +0900 Subject: [PATCH 2/7] reindent when C-m on html-mode --- emacs.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/emacs.el b/emacs.el index 59c4f4c..6a547cc 100644 --- a/emacs.el +++ b/emacs.el @@ -675,9 +675,6 @@ found, otherwise returns nil." (add-to-list 'interpreter-mode-alist '("python2" . python-mode)) -;; (add-hook default-majorg-mode -;; 'my-detect-major-mode-from-shebang) - ;; http://fukuyama.co/foreign-regexp '(and (fetch-library "https://raw.github.com/k-talo/foreign-regexp.el/master/foreign-regexp.el" @@ -783,6 +780,11 @@ found, otherwise returns nil." (setq auto-mode-alist (append '(("PKGBUILD\\'" . pkgbuild-mode)) auto-mode-alist))) +(add-hook 'html-mode-hook + (lambda () + (define-key html-mode-map (kbd "C-m") + 'reindent-then-newline-and-indent))) + (add-hook 'text-mode-hook (lambda () (define-key text-mode-map (kbd "C-m") 'newline))) From 449ac0ffbea94765b06bdf664d2041e043ff439a Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Wed, 6 Mar 2013 13:06:09 +0900 Subject: [PATCH 3/7] tmux def fg black --- tmux.conf.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tmux.conf.pl b/tmux.conf.pl index 06beb4e..36ee220 100755 --- a/tmux.conf.pl +++ b/tmux.conf.pl @@ -12,7 +12,7 @@ my %color_prefs = ( "darwin-mba.local" => "red,white", "newkiwi" => "magenta,white" ); -my $color_def = "green,white"; +my $color_def = "green,black"; sub tmux { my @command = ($tmux_command, ); @@ -57,7 +57,7 @@ sub get_hostname { my $hostname = $ENV{"HOSTNAME"}; if (! $hostname) { $hostname = `hostname`; - $hostname =~ s/\n//; + chomp($hostname) } return $hostname; } From 7284a165875af771d0fc7ea40f58d50d2807b029 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Fri, 15 Mar 2013 14:57:03 +0900 Subject: [PATCH 4/7] fix twitter search --- _keysnail.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_keysnail.js b/_keysnail.js index d32b972..464f298 100644 --- a/_keysnail.js +++ b/_keysnail.js @@ -39,7 +39,7 @@ style.register( //not work plugins.options["search-url-list"] = [ ["bing","http://bing.com/search?q=%q"], ["yatwitter search","http://yats-data.com/yats/search?query=%q"], - ["twitter search","http://search.twitter.com/search?q=%q&lang=all"], + ["twitter search","http://twitter.com/search?q=%q&lang=all"], ["tospy", "http://topsy.com/s?allow_lang=ja&q=%q"], ["2ch","http://2ch-ranking.net/search.php?q=%q&imp=and&order=time"], ["I\'m feelig lucky!","http://www.google.co.jp/search?q=%q&btnI=kudos"], From ef85a893fb61f5054788dba1256cc2670002f6ba Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Mon, 18 Mar 2013 02:05:51 +0900 Subject: [PATCH 5/7] untabify and fix indent --- bashrc | 60 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/bashrc b/bashrc index ebe789d..2666cd2 100755 --- a/bashrc +++ b/bashrc @@ -261,7 +261,7 @@ if null type _git then # enable programmable completion for g complete -o bashdefault -o default -o nospace -F _git g 2>/dev/null \ - || complete -o default -o nospace -F _git g + || complete -o default -o nospace -F _git g fi alias setup.py="sudo python3 setup.py install --record files.txt" @@ -282,15 +282,15 @@ clk(){ } man(){ - env \ - LESS_TERMCAP_mb=$(printf "\e[1;35m") \ - LESS_TERMCAP_md=$(printf "\e[1;31m") \ - LESS_TERMCAP_me=$(printf "\e[0m") \ - LESS_TERMCAP_se=$(printf "\e[0m") \ - LESS_TERMCAP_so=$(printf "\e[1;44;33m") \ - LESS_TERMCAP_ue=$(printf "\e[0m") \ - LESS_TERMCAP_us=$(printf "\e[1;32m") \ - man "$@" + env \ + LESS_TERMCAP_mb=$(printf "\e[1;35m") \ + LESS_TERMCAP_md=$(printf "\e[1;31m") \ + LESS_TERMCAP_me=$(printf "\e[0m") \ + LESS_TERMCAP_se=$(printf "\e[0m") \ + LESS_TERMCAP_so=$(printf "\e[1;44;33m") \ + LESS_TERMCAP_ue=$(printf "\e[0m") \ + LESS_TERMCAP_us=$(printf "\e[1;32m") \ + man "$@" } scr(){ @@ -714,7 +714,7 @@ __my_ps1_moc(){ } for f in /usr/share/git/git-prompt.sh \ - /opt/local/share/doc/git-core/contrib/completion/git-prompt.sh + /opt/local/share/doc/git-core/contrib/completion/git-prompt.sh do test -r $f && . $f && break done @@ -791,35 +791,35 @@ __my_set_screen_title(){ __my_set_title(){ case $TERM in (rxvt*|xterm*|aterm|screen*) - title="$(echo $@)" - test -t 1 && - test -n "$DISPLAY" && - test -z "$EMACS" && - echo -n -e "\033]0;${title}\007" - ;; + title="$(echo $@)" + test -t 1 && + test -n "$DISPLAY" && + test -z "$EMACS" && + echo -n -e "\033]0;${title}\007" + ;; esac -} -PROMPT_COMMAND="__my_set_title \${USER}@\${HOSTNAME}\:\${PWD}; + } + PROMPT_COMMAND="__my_set_title \${USER}@\${HOSTNAME}\:\${PWD}; __my_set_screen_title \$(basename \"\$PWD\")/" # copied from https://wiki.archlinux.org/index.php/X_resources -invader(){ + invader(){ # ANSI color scheme script featuring Space Invaders # # Original: http://crunchbanglinux.org/forums/post/126921/#p126921 # Modified by lolilolicon # - f=3 b=4 - for j in f b; do - for i in {0..7}; do - printf -v $j$i %b "\e[${!j}${i}m" - done - done - bld=$'\e[1m' - rst=$'\e[0m' + f=3 b=4 + for j in f b; do + for i in {0..7}; do + printf -v $j$i %b "\e[${!j}${i}m" + done + done + bld=$'\e[1m' + rst=$'\e[0m' - cat << EOF + cat << EOF $f1 ▀▄ ▄▀ $f2 ▄▄▄████▄▄▄ $f3 ▄██▄ $f4 ▀▄ ▄▀ $f5 ▄▄▄████▄▄▄ $f6 ▄██▄ $rst $f1 ▄█▀███▀█▄ $f2███▀▀██▀▀███ $f3▄█▀██▀█▄ $f4 ▄█▀███▀█▄ $f5███▀▀██▀▀███ $f6▄█▀██▀█▄$rst @@ -841,5 +841,5 @@ invader(){ $f7▀▀▀▀▀▀▀▀▀▀▀$rst EOF -} + } #/etc/lsb-release From 5503ee3370de4560de581d8f0cba4633e47ae08e Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Mon, 18 Mar 2013 02:09:15 +0900 Subject: [PATCH 6/7] remove func invader --- bashrc | 41 ----------------------------------------- 1 file changed, 41 deletions(-) diff --git a/bashrc b/bashrc index 2666cd2..98f9dde 100755 --- a/bashrc +++ b/bashrc @@ -802,44 +802,3 @@ __my_set_title(){ PROMPT_COMMAND="__my_set_title \${USER}@\${HOSTNAME}\:\${PWD}; __my_set_screen_title \$(basename \"\$PWD\")/" -# copied from https://wiki.archlinux.org/index.php/X_resources - invader(){ - # ANSI color scheme script featuring Space Invaders - # - # Original: http://crunchbanglinux.org/forums/post/126921/#p126921 - # Modified by lolilolicon - # - - f=3 b=4 - for j in f b; do - for i in {0..7}; do - printf -v $j$i %b "\e[${!j}${i}m" - done - done - bld=$'\e[1m' - rst=$'\e[0m' - - cat << EOF - - $f1 ▀▄ ▄▀ $f2 ▄▄▄████▄▄▄ $f3 ▄██▄ $f4 ▀▄ ▄▀ $f5 ▄▄▄████▄▄▄ $f6 ▄██▄ $rst - $f1 ▄█▀███▀█▄ $f2███▀▀██▀▀███ $f3▄█▀██▀█▄ $f4 ▄█▀███▀█▄ $f5███▀▀██▀▀███ $f6▄█▀██▀█▄$rst - $f1█▀███████▀█ $f2▀▀███▀▀███▀▀ $f3▀█▀██▀█▀ $f4█▀███████▀█ $f5▀▀███▀▀███▀▀ $f6▀█▀██▀█▀$rst - $f1▀ ▀▄▄ ▄▄▀ ▀ $f2 ▀█▄ ▀▀ ▄█▀ $f3▀▄ ▄▀ $f4▀ ▀▄▄ ▄▄▀ ▀ $f5 ▀█▄ ▀▀ ▄█▀ $f6▀▄ ▄▀$rst - - $bld$f1▄ ▀▄ ▄▀ ▄ $f2 ▄▄▄████▄▄▄ $f3 ▄██▄ $f4▄ ▀▄ ▄▀ ▄ $f5 ▄▄▄████▄▄▄ $f6 ▄██▄ $rst - $bld$f1█▄█▀███▀█▄█ $f2███▀▀██▀▀███ $f3▄█▀██▀█▄ $f4█▄█▀███▀█▄█ $f5███▀▀██▀▀███ $f6▄█▀██▀█▄$rst - $bld$f1▀█████████▀ $f2▀▀▀██▀▀██▀▀▀ $f3▀▀█▀▀█▀▀ $f4▀█████████▀ $f5▀▀▀██▀▀██▀▀▀ $f6▀▀█▀▀█▀▀$rst - $bld$f1 ▄▀ ▀▄ $f2▄▄▀▀ ▀▀ ▀▀▄▄ $f3▄▀▄▀▀▄▀▄ $f4 ▄▀ ▀▄ $f5▄▄▀▀ ▀▀ ▀▀▄▄ $f6▄▀▄▀▀▄▀▄$rst - - - $f7▌$rst - - $f7▌$rst - - $f7 ▄█▄ $rst - $f7▄█████████▄$rst - $f7▀▀▀▀▀▀▀▀▀▀▀$rst - -EOF - } -#/etc/lsb-release From 7da46f2cbd9d7d563da02144881fc5c9f4a2b086 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Mon, 18 Mar 2013 02:14:28 +0900 Subject: [PATCH 7/7] upddate function mkcd --- bashrc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/bashrc b/bashrc index 98f9dde..b015bd8 100755 --- a/bashrc +++ b/bashrc @@ -496,8 +496,14 @@ tb(){ } mkcd(){ - mkdir -p $1 - cd $1 + if test -d "$1" + then + echo "Dir \"$1\" already exists." + else + mkdir -p "$1" + echo "Dir \"$1\" created." + fi + cd "$1" } if test -n "$TMUX" && null type reattach-to-user-namespace