Переглянути джерело

Merge branch 'master' of github.com:10sr/dotfiles

pull/1/head
10sr 12 роки тому
джерело
коміт
3bbf994c74
4 змінених файлів з 56 додано та 24 видалено
  1. +11
    -9
      bashrc
  2. +14
    -3
      emacs.el
  3. +30
    -10
      setup.sh
  4. +1
    -2
      xprograms

+ 11
- 9
bashrc Переглянути файл

@@ -176,9 +176,10 @@ null type pacmatic && {
export PACMAN="pacmatic"
}

alias ubuntu-upgrade="sudo apt-get autoremove --yes && sudo apt-get update --yes && sudo apt-get upgrade --yes"
alias arch-upgrade="sudo pacman -Syu"
alias port-upgrade="sudo port selfupdate && sudo port upgrade outdated && sudo port uninstall leaves"
null type apt-get && \
alias aupgrade="sudo apt-get autoremove --yes && sudo apt-get update --yes && sudo apt-get upgrade --yes"
null type port && \
alias pupgrade="sudo port selfupdate && sudo port upgrade outdated && sudo port uninstall leaves"

if iscygwin; then
null type windate || alias windate="/c/Windows/System32/cmd.exe //c 'echo %DATE%-%TIME%'"
@@ -216,12 +217,6 @@ tmux(){
fi
}

__my_moc_state(){
type mocp >/dev/null 2>&1 || return
test "`mocp -Q %state 2>/dev/null`" == PLAY || return
printf "$1" "`mocp -Q %title 2>/dev/null`"
}

mcrypt-stream(){
test $# -eq 2 || return 1
case $1 in
@@ -346,6 +341,7 @@ open_file(){
cmd.exe //c start "" "$@"
elif isdarwin
then
touch "$@"
open "$@"
elif islinux
then
@@ -379,6 +375,12 @@ convmv-sjis2utf8-notest(){
convmv -r -f sjis -t utf8 * --notest
}

__my_moc_state(){
type mocp >/dev/null 2>&1 || return
test "`mocp -Q %state 2>/dev/null`" == PLAY || return
printf "$1" "`mocp -Q %title 2>/dev/null`"
}

__my_parse_svn_branch() {
local LANG=C
local svn_url=$(svn info 2>/dev/null | sed -ne 's#^URL: ##p')


+ 14
- 3
emacs.el Переглянути файл

@@ -634,10 +634,21 @@ drill-instructor.el"
(add-hook 'diff-mode-hook
(lambda ()
(view-mode 1)
(set-face-foreground 'diff-file-header-face nil)
(set-face-foreground 'diff-header-face nil)
(let ((s 'diff-header))
(set-face-foreground s nil)
(set-face-background s nil)
(set-face-bold-p s t))
(let ((s 'diff-file-header))
(set-face-foreground s nil)
(set-face-background s nil)
(set-face-bold-p s t))
(set-face-foreground 'diff-index-face "blue")
(set-face-foreground 'diff-hunk-header-face "cyan")
(let ((s 'diff-hunk-header))
(set-face-foreground s "cyan")
(set-face-bold-p s nil))
(let ((s 'diff-context))
;; (set-face-foreground s "white")
(set-face-bold-p s t))
(set-face-foreground 'diff-context-face nil)
(set-face-foreground 'diff-removed-face "red")
(set-face-foreground 'diff-added-face "green")


+ 30
- 10
setup.sh Переглянути файл

@@ -3,7 +3,13 @@
mkdir -p ~/.my/log
mkdir -p ~/.local/bin

_my_install_script(){
gen_source_script(){
# _gen_source_script file lines
test $# -eq 2 || return 1
head -n $2 $1 | \grep -v '^#!' | sed -e 's/^..//g'
}

get_install_script(){
local dir="$HOME/.local/bin"
mkdir -p "$dir"
for f in "$@"
@@ -23,7 +29,7 @@ _my_install_script(){
done
}

_my_install_symlink_script(){
install_symlink_script(){
mkdir -p "$HOME/.local/bin/"
for f in "$@"
do
@@ -31,7 +37,9 @@ _my_install_symlink_script(){
done
}

_my_git_config(){
git_config(){
type git >/dev/null 2>&1 || return 1

git config --global user.name '10sr'
git config --global user.email '8slashes+git@gmail.com'
git config --global core.autocrlf false
@@ -53,17 +61,29 @@ _my_git_config(){
# git config --global alias.my-ls "ls-files | xargs ls"
# git config --global alias.ll "!git ls-files | xargs ls -l -CFG --color=auto --time-style=long-iso"
git config --global alias.addi "add -i"
if false; then
if false iswindows; then
git config --global core.fileMode false
fi
}

_gen_source_script(){
# _gen_source_script file lines
test $# -eq 2 || return 1
head -n $2 $1 | \grep -v '^#!' | sed -e 's/^..//g'
mac_defaults(){
test "`uname`" = Darwin || return 1

# add quit entry in menu
defaults write com.apple.finder QuitMenuItem -bool YES
# show full path on titlebar
defaults write com.apple.finder _FXShowPosixPathInTitle -bool YES
# do not show desktop icons
defaults write com.apple.finder CreateDesktop -boolean false

killall finder

# disable dashboard
#defaults write com.apple.dashboard mcx-disabled -bool YES
}

_my_install_script http://www.frexx.de/xterm-256-notes/data/colortable16.sh http://www.frexx.de/xterm-256-notes/data/256colors2.pl
get_install_script http://www.frexx.de/xterm-256-notes/data/colortable16.sh http://www.frexx.de/xterm-256-notes/data/256colors2.pl

git_config

type git >/dev/null 2>&1 && _my_git_config
mac_defaults

+ 1
- 2
xprograms Переглянути файл

@@ -1,6 +1,6 @@
#!/bin/sh
# Programs run in background when starting x.
# Japanese IM settings are not included in this list.
# Japanese IM settings are not included in this script.

_feh(){
test -f "$HOME/.fehbg" &&
@@ -64,4 +64,3 @@ for p in $@
do
_$p
done


Завантаження…
Відмінити
Зберегти