Przeglądaj źródła

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

pull/1/head
10sr 11 lat temu
rodzic
commit
8111d17b1c
4 zmienionych plików z 83 dodań i 21 usunięć
  1. +4
    -5
      README.txt
  2. +57
    -2
      bashrc
  3. +20
    -12
      emacs.el
  4. +2
    -2
      setup.sh

+ 4
- 5
README.txt Wyświetl plik

@@ -10,16 +10,16 @@ __Do not go out of ways how the default environments work__.


There are many cases when I must work on foreign environments, and it is always
VERY irritating when things will not work as I expect, yet setting up my own
environment will be troublesome. So I avoid changing behaviors of tools,
except for emacs.
VERY irritating when things do not work as I expected, yet setting up my own
environment is troublesome. So I avoid changing behaviors of tools, except
for emacs.

Emacs is the editor I usually use for coding. I decided to change the behavior
of emacs as I want without thinking about other environments. When I cannot use
my emacs.el I'll use vi or vim instead.

Other tools like bash and vim basically work in the same ways even when using my
rc files. The main changes are related to showing informations, typically the
rc files. The main changes are related to showing informations, typically in the
bash prompt.


@@ -41,4 +41,3 @@ Sourcing flow
|--~/.dotfiles/xprofile
|
`--~/.dotfiles/xprograms


+ 57
- 2
bashrc Wyświetl plik

@@ -338,12 +338,66 @@ then
|| complete -o default -o nospace -F _git g
fi
git svn --help >/dev/null 2>&1 && alias gsvn="git svn"
null type gitmemo && alias m=gitmemo

null type gitmemo && alias m=gitmemo

alias setup.py="sudo python3 setup.py install --record files.txt"

datestr(){
# datestr yyyyMMdd-hhmmss
if test -z "$1" || test "$1" == "-h"
then
echo "datestr: usage: datestr <yyyyMMddhhmmss>"
return 1
fi

dfmt= # actual format for date command
while test -n "$1"
do
fmt="$1"
while test -n "$fmt"
do
case "$fmt" in
yyyy*) # year
dfmt="${dfmt}%Y"
fmt="`echo "$fmt" | cut -c 5-`"
;;
yy*) # last two digits of year
dfmt="${dfmt}%y"
fmt="`echo "$fmt" | cut -c 3-`"
;;
MM*) # month (01..12)
dfmt="${dfmt}%m"
fmt="`echo "$fmt" | cut -c 3-`"
;;
dd*) # day of month (01..12)
dfmt="${dfmt}%d"
fmt="`echo "$fmt" | cut -c 3-`"
;;
HH* | hh*) # hour (00..23)
dfmt="${dfmt}%H"
fmt="`echo "$fmt" | cut -c 3-`"
;;
mm*) # minute (00..59)
dfmt="${dfmt}%M"
fmt="`echo "$fmt" | cut -c 3-`"
;;
ss*) # second (00..60)
dfmt="${dfmt}%S"
fmt="`echo "$fmt" | cut -c 3-`"
;;
*)
char=`echo "$fmt" | cut -c 1`
dfmt="${dfmt}${char}"
fmt="`echo "$fmt" | cut -c 2-`"
;;
esac
done
shift
done
date +"$dfmt"
}

ssh(){
__my_set_screen_title ssh
command ssh "$@"
@@ -688,7 +742,8 @@ di(){
}

tb(){
local tb="$HOME/.my/tb"
local datenum=`date +%Y%m%d-%H%M%S`
local tb="$HOME/.my/tb/$datenum"
mkdir -p "$tb"
for file in "$@"
do


+ 20
- 12
emacs.el Wyświetl plik

@@ -1161,6 +1161,15 @@ If called intearctively, find word at point."
'("this-frame" nil (lambda (buf)
(memq buf (my-frame-buffer-get)))
".*" nil nil))
(add-to-list 'bs-configurations
'("files-and-terminals" nil nil nil
(lambda (buf)
(and (bs-visits-non-file buf)
(save-excursion
(set-buffer buf)
(not (memq major-mode
'(term-mode
eshell-mode))))))))
;; (setq bs-configurations (list
;; '("processes" nil get-buffer-process ".*" nil nil)
;; '("files-and-scratch" "^\\*scratch\\*$" nil nil
@@ -1168,11 +1177,11 @@ If called intearctively, find word at point."
)
;; (global-set-key "\C-x\C-b" 'bs-show)
(defalias 'list-buffers 'bs-show)
(setq bs-default-configuration "files")
(setq bs-default-configuration "files-and-terminals")
(setq bs-default-sort-name "by nothing")
(add-hook 'bs-mode-hook
(lambda ()
(setq bs-default-configuration "files")
;; (setq bs-default-configuration "files")
;; (and bs--show-all
;; (call-interactively 'bs-toggle-show-all))
(set (make-local-variable 'scroll-margin) 0))))
@@ -1855,23 +1864,22 @@ if arg given, use that eshell buffer, otherwise make new eshell buffer."
(pop-to-buffer my-term)
(setq my-term
(save-window-excursion
(funcall my-term-function)
))
(funcall my-term-function)))
(and my-term
(my-term))))

(defvar my-term-function nil
"Function to create terminal buffer.")

;; (setq my-term-function
;; (lambda ()
;; (if (eq system-type 'windows-nt)
;; (eshell)
;; (if (require 'multi-term nil t)
;; (multi-term)
;; (ansi-term shell-file-name)))))
(setq my-term-function
(lambda ()
(if (eq system-type 'windows-nt)
(eshell)
(if (require 'multi-term nil t)
(multi-term)
(ansi-term shell-file-name)))))

(setq my-term-function 'eshell)
;; (setq my-term-function 'eshell)

(defun my-delete-frame-or-kill-emacs ()
"delete frame when opening multiple frame, kill emacs when only one."


+ 2
- 2
setup.sh Wyświetl plik

@@ -124,8 +124,8 @@ mac_start_daemon(){

default(){
get_install_script \
http://www.frexx.de/xterm-256-notes/data/colortable16.sh \
http://www.frexx.de/xterm-256-notes/data/256colors2.pl
https://gist.github.com/10sr/6852317/raw/colortable16.sh \
https://gist.github.com/10sr/6852331/raw/256colors2.pl

git_config



Ładowanie…
Anuluj
Zapisz