From 083a769cb6284cf4c40ed0d5f36ee6f12b264d12 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Thu, 26 Apr 2012 02:23:30 +0900 Subject: [PATCH 01/45] misc changes --- conkyrc | 5 +++++ emacs.el | 7 +++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/conkyrc b/conkyrc index 9d35811..306d0db 100644 --- a/conkyrc +++ b/conkyrc @@ -40,6 +40,8 @@ no_buffers yes uppercase no format_human_readable yes +if_up_strictness link + TEXT ${color0}${alignr}${sysname} ${kernel} (${machine}) ${color0}${alignr}${execi 30000 whoami}@${nodename} @@ -64,6 +66,9 @@ ${if_up wlan0}\ ${color2}if ${color1}|${color0} wlan:${addr wlan0} ${color2}ssid ${color1}|${color0} ${wireless_essid wlan0} ${wireless_link_qual_perc wlan0}% ${endif}\ +${if_up eth0}\ +${color2}if ${color1}|${color0} eth0:${addr eth0} +${endif}\ ${color0}${stippled_hr} ${color2}down ${color1}|${color0} ${downspeed}/s ${color4}${downspeedgraph ff0000 0000ff} diff --git a/emacs.el b/emacs.el index d5fa6bb..0da7cb4 100644 --- a/emacs.el +++ b/emacs.el @@ -124,6 +124,7 @@ return nil if LIB unfound and downloading failed, otherwise the path of LIB." (add-to-list 'default-frame-alist '(foreground-color . "gray10")) ;; (add-to-list 'default-frame-alist '(alpha . (80 100 100 100))) ; does not work? ) +;; (add-to-list 'default-frame-alist '(cursor-type . box)) (if window-system (menu-bar-mode 1) (menu-bar-mode 0)) (tool-bar-mode 0) (set-scroll-bar-mode nil) @@ -395,14 +396,12 @@ return nil if LIB unfound and downloading failed, otherwise the path of LIB." (and (dllib-if-unfound "set-modeline-color" "https://raw.github.com/10sr/emacs-lisp/master/set-modeline-color.el" t) - (progn (set-face-background 'mode-line "white") - ;(set-face-bold-p 'modeline-buffer-id t) - (require 'set-modeline-color nil t))) + (progn + (require 'set-modeline-color nil t))) (set-face-background 'mode-line-inactive (if (face-inverse-video-p 'mode-line) "white" "black")) (set-face-foreground 'mode-line-inactive (if (face-inverse-video-p 'mode-line) "black" "white")) - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; file handling From 9d558de528da5b76ff16b7c28f8017bf375551fa Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Thu, 26 Apr 2012 02:54:54 +0900 Subject: [PATCH 02/45] update mode-line-inactive face --- emacs.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/emacs.el b/emacs.el index 0da7cb4..80c1e4e 100644 --- a/emacs.el +++ b/emacs.el @@ -399,8 +399,10 @@ return nil if LIB unfound and downloading failed, otherwise the path of LIB." (progn (require 'set-modeline-color nil t))) -(set-face-background 'mode-line-inactive (if (face-inverse-video-p 'mode-line) "white" "black")) -(set-face-foreground 'mode-line-inactive (if (face-inverse-video-p 'mode-line) "black" "white")) +(let ((fg (face-foreground 'default)) + (bg (face-background 'default))) + (set-face-background 'mode-line-inactive (if (face-inverse-video-p 'mode-line) fg bg)) + (set-face-foreground 'mode-line-inactive (if (face-inverse-video-p 'mode-line) bg fg))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; file handling From 30339f7070b156596ca777750fa863394d5b0824 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Thu, 26 Apr 2012 03:07:31 +0900 Subject: [PATCH 03/45] update git-command so that minibuffer shows branch name --- emacs.el | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/emacs.el b/emacs.el index 80c1e4e..b3dcd97 100644 --- a/emacs.el +++ b/emacs.el @@ -1557,14 +1557,22 @@ when SEC is nil, stop auto save if enabled." (defalias 'qcalc 'quick-calc) -;; (when (require 'ansi-color nil t) -;; (ansi-color-for-comint-mode-on)) (defvar git-command-history nil "History list for git command.") +(defun my-git-branch-name () + "" + (interactive) + (with-temp-buffer + (shell-command "git branch --no-color" t) + (when (search-forward "*" nil t) + (forward-char 1) + (buffer-substring-no-properties (point) + (point-at-eol))))) (defun my-git-shell-command (cmd) "" - (interactive (list (read-shell-command (format "[%s] $ git : " - (abbreviate-file-name default-directory)) + (interactive (list (read-shell-command (format "[%s][GIT:%s] $ git : " + (abbreviate-file-name default-directory) + (my-git-branch-name)) nil 'git-command-history))) (let ((dir default-directory) From 52b014853d582becbb8124e2f2a0bcd80a0a9bf0 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Thu, 26 Apr 2012 03:07:52 +0900 Subject: [PATCH 04/45] update git alias.st --- bashrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bashrc b/bashrc index 029ae53..0fe997f 100755 --- a/bashrc +++ b/bashrc @@ -281,7 +281,7 @@ _my_git_config(){ git config --global status.relativePaths false git config --global status.showUntrackedFiles normal git config --global alias.graph "log --graph --date-order -C -M --pretty=tformat:\"<%h> %ad [%an] %Cgreen%d%Creset %s\" --all --date=iso" - git config --global alias.st "status -s" + git config --global alias.st "status -s -b" git config --global alias.b "branch" git config --global alias.ci "commit --verbose" git config --global alias.co "checkout" From 36dffd7580deece7a83857ed3ff551f481568d54 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Thu, 26 Apr 2012 03:14:51 +0900 Subject: [PATCH 05/45] update git-branch-name --- emacs.el | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/emacs.el b/emacs.el index b3dcd97..ab93aa5 100644 --- a/emacs.el +++ b/emacs.el @@ -1559,20 +1559,21 @@ when SEC is nil, stop auto save if enabled." (defvar git-command-history nil "History list for git command.") -(defun my-git-branch-name () +(defun my-git-branch-name (str) "" - (interactive) (with-temp-buffer (shell-command "git branch --no-color" t) - (when (search-forward "*" nil t) - (forward-char 1) - (buffer-substring-no-properties (point) - (point-at-eol))))) + (if (search-forward "*" nil t) + (progn (forward-char 1) + (format str + (buffer-substring-no-properties (point) + (point-at-eol)))) + ""))) (defun my-git-shell-command (cmd) "" - (interactive (list (read-shell-command (format "[%s][GIT:%s] $ git : " + (interactive (list (read-shell-command (format "[%s]%s $ git : " (abbreviate-file-name default-directory) - (my-git-branch-name)) + (my-git-branch-name "[GIT:%s]")) nil 'git-command-history))) (let ((dir default-directory) From a3e3aa90d2d9f5090ceb405f3a7140e3e0366aa0 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Thu, 26 Apr 2012 16:41:52 +0900 Subject: [PATCH 06/45] rearrange font-lock settings --- emacs.el | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/emacs.el b/emacs.el index ab93aa5..3aa557a 100644 --- a/emacs.el +++ b/emacs.el @@ -312,19 +312,19 @@ return nil if LIB unfound and downloading failed, otherwise the path of LIB." (standard-display-ascii ?\n "$\n") -(standard-display-ascii ?\f "---------------------------------------------------------------------------------------^L") -(defface my-pagebreak-face - '((t (:foreground "gray"))) - "pagebreak.") - (defvar my-eol-face '(("\n" . (0 font-lock-comment-face t nil))) ) -(defvar my-pagebreak-face - '(("\f" . 'my-pagebreak-face))) -(defvar my-highlight-face - '(("\t" . '(0 highlight t nil)) - (" " . '(0 highlight t nil)))) +(defvar my-tab-face + '(("\t" . '(0 highlight t nil)))) +(defvar my-jspace-face + '(("\u3000" . '(0 highlight t nil)))) + +(add-hook 'font-lock-mode-hook + (lambda () + (font-lock-add-keywords nil my-eol-face) + (font-lock-add-keywords nil my-jspace-face) + )) ;; highlight current line ;; http://wiki.riywo.com/index.php?Meadow @@ -349,12 +349,6 @@ return nil if LIB unfound and downloading failed, otherwise the path of LIB." '(not term-mode)) -(add-hook 'font-lock-mode-hook - (lambda () - (font-lock-add-keywords nil my-eol-face) - ;; (font-lock-add-keywords nil my-highlight-face) - )) - (set-face-foreground 'font-lock-regexp-grouping-backslash "#666") (set-face-foreground 'font-lock-regexp-grouping-construct "#f60") From 26fb0fb4b3a88ba4954dc4ca932c2914e39b6267 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Thu, 26 Apr 2012 20:06:25 +0900 Subject: [PATCH 07/45] add my-git-ps1, but its not perfect --- emacs.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/emacs.el b/emacs.el index 3aa557a..50ebf59 100644 --- a/emacs.el +++ b/emacs.el @@ -447,6 +447,7 @@ return nil if LIB unfound and downloading failed, otherwise the path of LIB." ;(pc-selection-mode 1) ; this make some already defined keybind back to default (delete-selection-mode 1) (cua-mode 0) +(setq line-move-visual nil) ;; key bindings ;; moving around @@ -1563,11 +1564,16 @@ when SEC is nil, stop auto save if enabled." (buffer-substring-no-properties (point) (point-at-eol)))) ""))) +(defun my-git-ps1 (str) + (shell-command-to-string (concat "bash -c " + (shell-quote-argument (concat ". /etc/bash_completion.d/git; __git_ps1 " + (shell-quote-argument str) + ";"))))) (defun my-git-shell-command (cmd) "" (interactive (list (read-shell-command (format "[%s]%s $ git : " (abbreviate-file-name default-directory) - (my-git-branch-name "[GIT:%s]")) + (my-git-ps1 "[GIT:%s]")) nil 'git-command-history))) (let ((dir default-directory) From dbf2280e54b060beb1f29b96a358b2ab248dffd0 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Thu, 26 Apr 2012 20:51:03 +0900 Subject: [PATCH 08/45] my-git-ps1 seems to work fine --- emacs.el | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/emacs.el b/emacs.el index 50ebf59..1af8c43 100644 --- a/emacs.el +++ b/emacs.el @@ -1565,10 +1565,17 @@ when SEC is nil, stop auto save if enabled." (point-at-eol)))) ""))) (defun my-git-ps1 (str) - (shell-command-to-string (concat "bash -c " - (shell-quote-argument (concat ". /etc/bash_completion.d/git; __git_ps1 " - (shell-quote-argument str) - ";"))))) + (with-temp-buffer + (insert ". /etc/bash_completion.d/git; __git_ps1 " + (shell-quote-argument str) + ";") + (shell-command-on-region (point-min) + (point-max) + "bash -s" + nil + t) + (buffer-substring-no-properties (point-min) + (point-max)))) (defun my-git-shell-command (cmd) "" (interactive (list (read-shell-command (format "[%s]%s $ git : " From 00750d06c2802fdf472a8d23d77870fd00baef96 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Thu, 26 Apr 2012 23:11:01 +0900 Subject: [PATCH 09/45] update conkyrc --- conkyrc | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/conkyrc b/conkyrc index 306d0db..6e20b0d 100644 --- a/conkyrc +++ b/conkyrc @@ -63,17 +63,22 @@ ${fs_bar /tmp} ${color2}i/o ${color1}|${color0} ${diskio} ${color0}${hr} ${if_up wlan0}\ -${color2}if ${color1}|${color0} wlan:${addr wlan0} +${color2}if ${color1}|${color0} wlan0:${addr wlan0} ${color2}ssid ${color1}|${color0} ${wireless_essid wlan0} ${wireless_link_qual_perc wlan0}% +${color0}${stippled_hr} +${color2}down ${color1}|${color0} ${downspeed wlan0}/s +${color4}${downspeedgraph wlan0 ff0000 0000ff} +${color2}up ${color1}|${color0} ${upspeed wlan0}/s +${color4}${upspeedgraph wlan0 0000ff ff0000} ${endif}\ ${if_up eth0}\ ${color2}if ${color1}|${color0} eth0:${addr eth0} -${endif}\ ${color0}${stippled_hr} -${color2}down ${color1}|${color0} ${downspeed}/s -${color4}${downspeedgraph ff0000 0000ff} -${color2}up ${color1}|${color0} ${upspeed}/s -${color4}${upspeedgraph 0000ff ff0000} +${color2}down ${color1}|${color0} ${downspeed eth0}/s +${color4}${downspeedgraph eth0 ff0000 0000ff} +${color2}up ${color1}|${color0} ${upspeed eth0}/s +${color4}${upspeedgraph eth0 0000ff ff0000} +${endif}\ ${color0}${alignr}conky ${conky_version} ${color0}${hr} ${color3}${alignr}${texeci 10 bash -c 'xrandr|grep " connected "|cut -f 1,3 -d " "'} From fca877936751170ae5de33012b274155d89c657d Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Thu, 26 Apr 2012 23:11:20 +0900 Subject: [PATCH 10/45] fix C-h --- emacs.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/emacs.el b/emacs.el index 1af8c43..dff871a 100644 --- a/emacs.el +++ b/emacs.el @@ -185,7 +185,8 @@ return nil if LIB unfound and downloading failed, otherwise the path of LIB." (setq drill-instructor-global t) (let ((map drill-instructor-key-map)) (define-key map (kbd "RET") nil) - (define-key map (kbd "DEL") nil))) + (define-key map (kbd "DEL") nil) + (define-key map (kbd "C-h") nil))) '(mapc (lambda (key) (global-set-key (read-kbd-macro key) 'ignore)) '("" "" "" "")) From 94fa42c1f9d2539fbcf45e4bf1b89e734a3a6113 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Sun, 29 Apr 2012 03:01:27 +0900 Subject: [PATCH 11/45] add ext view-page-source --- _keysnail.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/_keysnail.js b/_keysnail.js index 4898c0c..9781c5d 100644 --- a/_keysnail.js +++ b/_keysnail.js @@ -158,6 +158,10 @@ plugins.options["twitter_client.use_jmp"] = true; //////////////////////////////////////////// // my ext +ext.add('view-page-source', function(){ + window.content.location.href = "view-source:" + window.content.location.href; +}, 'view page source'); + ext.add('my-setpref', function(){ util.setPrefs( { From 3fc96ffce48cb2bbca4c8c43d22b20a7fc25d8c9 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Sun, 29 Apr 2012 21:08:46 +0900 Subject: [PATCH 12/45] modify wicd aliases --- bashrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bashrc b/bashrc index 0fe997f..0882e6f 100755 --- a/bashrc +++ b/bashrc @@ -114,8 +114,8 @@ alias sh="ENV=$HOME/.shrc PS1=\$\ sh" # type trash >/dev/null 2>&1 && alias rm=trash alias wic=wicd-curses -alias wlist="wicd-cli -y -l" -alias wcn="wicd-cli -y -c -n" +alias wil="wicd-cli -y -l | head" +alias wicn="wicd-cli -y -c -n" alias aptin="apt-get install" alias aptsearch="apt-cache search" From 62b605c084fa58d9ca43b19590059799ada6c4f4 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Mon, 30 Apr 2012 14:18:30 +0900 Subject: [PATCH 13/45] xprograms get arg for programs to start --- xprograms | 65 +++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 49 insertions(+), 16 deletions(-) diff --git a/xprograms b/xprograms index 9baa426..c980f55 100755 --- a/xprograms +++ b/xprograms @@ -3,28 +3,61 @@ # These programs are basically for Openbox Window Manager. # Japanese IM settings are not included in this list. -test -f "$HOME/.fehbg" && -type feh >/dev/null 2>&1 && -sh "$HOME/.fehbg" +# isarch && p="feh tint2 dropbox volumeicon conky udisksvm xcompmgr saku" +_feh(){ + test -f "$HOME/.fehbg" && + type feh >/dev/null 2>&1 && + sh "$HOME/.fehbg" +} + +_tint2(){ #tint2 -c ~/.dotfiles/tint2rc & -tint2 & + tint2 & +} +_dropbox(){ + dropboxd & # done by ~/.config/autostart/dropbox.desktop +} + +_volumeicon(){ + volumeicon & +} + +_conky(){ + conky -c ~/.dotfiles/conkyrc >~/.backup/log/conky.log 2>&1 & + conky -c ~/.dotfiles/conkyrc.2 >~/.backup/log/conky.2.log 2>&1 & +} +_wicd(){ +#wicd-client --tray & # done by /etc/xdg/autostart/wicd-client.desktop + true +} -dropboxd & # done by ~/.config/autostart/dropbox.desktop +_udisksvm(){ +# Detection of insertion of an optical disk + if ! pgrep -lf "udisks-daemon: polling /dev/sr0"; then + udisks --poll-for-media /dev/sr0 + fi + udisksvm >/dev/null & +} -volumeicon & +_xcompmgr(){ + xcompmgr -c & +} -conky -c ~/.dotfiles/conkyrc >~/.backup/log/conky.log 2>&1 & -conky -c ~/.dotfiles/conkyrc.2 >~/.backup/log/conky.2.log 2>&1 & +_saku(){ + (cd ~/src/saku-3.11.1/ && python2 saku.py) & +} -#wicd-client --tray & # done by /etc/xdg/autostart/wicd-client.desktop +_gkeyring(){ + LANG=C gnome-keyring-daemon & +} -# Detection of insertion of an optical disk -if ! pgrep -lf "udisks-daemon: polling /dev/sr0"; then - udisks --poll-for-media /dev/sr0 -fi -udisksvm >/dev/null & +_nmapplet(){ + nm-applet & +} -xcompmgr -c & +for p in $@ +do + _$p +done -(cd ~/src/saku-3.11.1/ && python2 saku.py) & From 805b7921b5f6ecebbbf57215f2c7f89dfb3a357e Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Mon, 30 Apr 2012 23:53:55 +0900 Subject: [PATCH 14/45] fix xprograms --- xprograms | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xprograms b/xprograms index c980f55..9b8d772 100755 --- a/xprograms +++ b/xprograms @@ -3,8 +3,6 @@ # These programs are basically for Openbox Window Manager. # Japanese IM settings are not included in this list. -# isarch && p="feh tint2 dropbox volumeicon conky udisksvm xcompmgr saku" - _feh(){ test -f "$HOME/.fehbg" && type feh >/dev/null 2>&1 && @@ -15,6 +13,7 @@ _tint2(){ #tint2 -c ~/.dotfiles/tint2rc & tint2 & } + _dropbox(){ dropboxd & # done by ~/.config/autostart/dropbox.desktop } @@ -27,9 +26,10 @@ _conky(){ conky -c ~/.dotfiles/conkyrc >~/.backup/log/conky.log 2>&1 & conky -c ~/.dotfiles/conkyrc.2 >~/.backup/log/conky.2.log 2>&1 & } + _wicd(){ -#wicd-client --tray & # done by /etc/xdg/autostart/wicd-client.desktop - true +# done by /etc/xdg/autostart/wicd-client.desktop + wicd-client --tray & } _udisksvm(){ From f2199eca61e0a57e6cd6b1c48df9de1fa09117fc Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Wed, 2 May 2012 12:37:03 +0900 Subject: [PATCH 15/45] fix gnome-keyring-daemon execute line --- xprograms | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xprograms b/xprograms index c980f55..eaacf30 100755 --- a/xprograms +++ b/xprograms @@ -49,7 +49,7 @@ _saku(){ } _gkeyring(){ - LANG=C gnome-keyring-daemon & + LANG=C gnome-keyring-daemon --start -c pkcs11 & } _nmapplet(){ From ea8303013d63b93571f26c432a455a23f1575b0e Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Wed, 2 May 2012 16:26:23 +0900 Subject: [PATCH 16/45] vi like keybind in copymode of tmux --- tmux.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/tmux.conf b/tmux.conf index 58e2dd4..41939e4 100644 --- a/tmux.conf +++ b/tmux.conf @@ -7,3 +7,4 @@ set -g default-terminal screen-256color #set -g status-left "" #set -g status-right "#H | %a, %d %b %Y %T %z #(tmux -V)" set -g status-right "#H | #(tmux -V) " +setw -g mode-keys vi From 54c25e5eee7139acf024c2753478d62252bb93a5 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Thu, 3 May 2012 16:16:14 +0900 Subject: [PATCH 17/45] modify git-command --- emacs.el | 38 +++++++++++++++----------------------- 1 file changed, 15 insertions(+), 23 deletions(-) diff --git a/emacs.el b/emacs.el index dff871a..bd67a5b 100644 --- a/emacs.el +++ b/emacs.el @@ -853,8 +853,6 @@ return nil if LIB unfound and downloading failed, otherwise the path of LIB." ;; (require 'vc) (setq vc-handled-backends '()) -(and (executable-find "git") - (add-to-list 'vc-handled-backends 'GIT)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; gauche-mode @@ -1555,28 +1553,22 @@ when SEC is nil, stop auto save if enabled." (defvar git-command-history nil "History list for git command.") -(defun my-git-branch-name (str) - "" - (with-temp-buffer - (shell-command "git branch --no-color" t) - (if (search-forward "*" nil t) - (progn (forward-char 1) - (format str - (buffer-substring-no-properties (point) - (point-at-eol)))) - ""))) (defun my-git-ps1 (str) - (with-temp-buffer - (insert ". /etc/bash_completion.d/git; __git_ps1 " - (shell-quote-argument str) - ";") - (shell-command-on-region (point-min) - (point-max) - "bash -s" - nil - t) - (buffer-substring-no-properties (point-min) - (point-max)))) + (let ((gcmpl "/etc/bash_completion.d/git")) + (if (file-readable-p gcmpl) + (with-temp-buffer + (insert ". " gcmpl + "; __git_ps1 " + (shell-quote-argument str) + ";") + (shell-command-on-region (point-min) + (point-max) + "bash -s" + nil + t) + (buffer-substring-no-properties (point-min) + (point-max))) + ""))) (defun my-git-shell-command (cmd) "" (interactive (list (read-shell-command (format "[%s]%s $ git : " From 59da815ae1e269bdd4c7b961e86d642ed8a37485 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Thu, 3 May 2012 16:41:50 +0900 Subject: [PATCH 18/45] add refcontrol pref --- _keysnail.js | 1 + 1 file changed, 1 insertion(+) diff --git a/_keysnail.js b/_keysnail.js index 9781c5d..62e00d2 100644 --- a/_keysnail.js +++ b/_keysnail.js @@ -192,6 +192,7 @@ ext.add('my-setpref', function(){ "extensions.tabutils.styles.unread":"{\"bold\":false,\"italic\":false,\"underline\":false,\"strikethrough\":false,\"color\":true,\"colorCode\":\"#CC0000\",\"bgColor\":false,\"bgColorCode\":\"undefined\",\"outline\":false,\"outlineColorCode\":\"undefined\"}", "extensions.yass.edgetype":0, "extensions.yass.selectedpreset":"red", + "refcontrol.actions":"@DEFAULT=@FORGE www.heartrails.com=@NORMAL www.pixiv.net=@NORMAL", "font.default.x-western":"sans-serif", "general.warnOnAboutConfig":false, "keyword.URL":"http://www.bing.com/search?q=", From eba434b762201508e8a391f1f11af3caeeda3fdb Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Thu, 3 May 2012 17:16:25 +0900 Subject: [PATCH 19/45] add dir-show, not usefull --- emacs.el | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/emacs.el b/emacs.el index bd67a5b..ad4e6eb 100644 --- a/emacs.el +++ b/emacs.el @@ -1549,6 +1549,16 @@ when SEC is nil, stop auto save if enabled." ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; misc funcs +(defun dir-show (&optional dir) + (interactive) + (let ((bf (get-buffer-create "*dir show*")) + (list-directory-brief-switches "-C")) + (with-current-buffer bf + (list-directory (or nil + default-directory) + nil)) + )) + (defalias 'qcalc 'quick-calc) (defvar git-command-history nil @@ -1570,7 +1580,7 @@ when SEC is nil, stop auto save if enabled." (point-max))) ""))) (defun my-git-shell-command (cmd) - "" + "Shell like git command interface." (interactive (list (read-shell-command (format "[%s]%s $ git : " (abbreviate-file-name default-directory) (my-git-ps1 "[GIT:%s]")) From 17d31282c19a60d5fac2d15cb93ec624f79a7e82 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Thu, 3 May 2012 17:16:39 +0900 Subject: [PATCH 20/45] fix --- _keysnail.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/_keysnail.js b/_keysnail.js index 62e00d2..3622b99 100644 --- a/_keysnail.js +++ b/_keysnail.js @@ -192,12 +192,11 @@ ext.add('my-setpref', function(){ "extensions.tabutils.styles.unread":"{\"bold\":false,\"italic\":false,\"underline\":false,\"strikethrough\":false,\"color\":true,\"colorCode\":\"#CC0000\",\"bgColor\":false,\"bgColorCode\":\"undefined\",\"outline\":false,\"outlineColorCode\":\"undefined\"}", "extensions.yass.edgetype":0, "extensions.yass.selectedpreset":"red", - "refcontrol.actions":"@DEFAULT=@FORGE www.heartrails.com=@NORMAL www.pixiv.net=@NORMAL", "font.default.x-western":"sans-serif", "general.warnOnAboutConfig":false, "keyword.URL":"http://www.bing.com/search?q=", "network.dns.disableIPv6":true, - "refcontrol.actions":"@DEFAULT=@FORGE", + "refcontrol.actions":"@DEFAULT=@FORGE www.heartrails.com=@NORMAL www.pixiv.net=@NORMAL", "scrapbook.tabs.open":true } ); From e895d47d7542201da3abc08d7bc256da79b5cd5a Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Thu, 3 May 2012 20:01:29 +0900 Subject: [PATCH 21/45] exec startx --- bashrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bashrc b/bashrc index 0882e6f..8be3259 100755 --- a/bashrc +++ b/bashrc @@ -169,7 +169,7 @@ x(){ #mkdir -p ~/.backup/log # nohup startx >~/.backup/log/xorg.log 2>&1 & # exit - startx + exec startx else echo "X cant be started! Maybe another X is already running or something." 1>&2 fi From 30f64898257d5459f76ea685f027b7623bfeef34 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Thu, 3 May 2012 21:06:13 +0900 Subject: [PATCH 22/45] add git-command lib prefs --- emacs.el | 48 ++++++------------------------------------------ 1 file changed, 6 insertions(+), 42 deletions(-) diff --git a/emacs.el b/emacs.el index ad4e6eb..d294104 100644 --- a/emacs.el +++ b/emacs.el @@ -729,6 +729,12 @@ return nil if LIB unfound and downloading failed, otherwise the path of LIB." (require 'gtkbm nil t) (global-set-key (kbd "C-x C-d") 'gtkbm)) +(and (dllib-if-unfound "git-command" + "https://raw.github.com/10sr/emacs-lisp/master/git-command.el" + t) + (require 'git-command nil t) + (define-key ctl-x-map "g" 'git-command)) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; term mode @@ -1561,48 +1567,6 @@ when SEC is nil, stop auto save if enabled." (defalias 'qcalc 'quick-calc) -(defvar git-command-history nil - "History list for git command.") -(defun my-git-ps1 (str) - (let ((gcmpl "/etc/bash_completion.d/git")) - (if (file-readable-p gcmpl) - (with-temp-buffer - (insert ". " gcmpl - "; __git_ps1 " - (shell-quote-argument str) - ";") - (shell-command-on-region (point-min) - (point-max) - "bash -s" - nil - t) - (buffer-substring-no-properties (point-min) - (point-max))) - ""))) -(defun my-git-shell-command (cmd) - "Shell like git command interface." - (interactive (list (read-shell-command (format "[%s]%s $ git : " - (abbreviate-file-name default-directory) - (my-git-ps1 "[GIT:%s]")) - nil - 'git-command-history))) - (let ((dir default-directory) - (bf (get-buffer-create "*Git Output*")) - ) - (delete-windows-on bf t) - (shell-command (concat "git " - cmd) - bf) - (with-current-buffer bf - (cd dir) - (and (require 'ansi-color nil t) - (ansi-color-apply-on-region (point-min) - (point-max))) - (setq buffer-read-only t) - (view-mode 1) - ))) -(define-key ctl-x-map "g" 'my-git-shell-command) - (defun my-kill-buffers () "" (interactive) From ae7a0f8af9e7d725e7cbe5b813273201efaa1af4 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Thu, 3 May 2012 21:15:56 +0900 Subject: [PATCH 23/45] modify dllib-if-unfound --- emacs.el | 42 ++++++++++++++++-------------------------- 1 file changed, 16 insertions(+), 26 deletions(-) diff --git a/emacs.el b/emacs.el index d294104..5b67eac 100644 --- a/emacs.el +++ b/emacs.el @@ -39,11 +39,12 @@ Each function is called with two args, the filename before changing and after ch (require 'url) -(defun dllib-if-unfound (lib url &optional bite-compile-p force-download-p) +(defun dllib-if-unfound (url &optional bite-compile-p force-download-p) "if LIB does not exist, download it from URL and locate it to \"~/emacs.d/lisp/LIB.el\". return nil if LIB unfound and downloading failed, otherwise the path of LIB." (let* ((dir (expand-file-name (concat user-emacs-directory "lisp/"))) - (lpath (concat dir lib ".el")) + (lib (file-name-nondirectory url)) + (lpath (concat dir lib)) (locate-p (locate-library lib))) (if (or force-download-p (not locate-p)) (progn (condition-case nil @@ -178,8 +179,7 @@ return nil if LIB unfound and downloading failed, otherwise the path of LIB." ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; global keys -(and (dllib-if-unfound "drill-instructor" - "https://raw.github.com/k1LoW/emacs-drill-instructor/master/drill-instructor.el" +(and (dllib-if-unfound "https://raw.github.com/k1LoW/emacs-drill-instructor/master/drill-instructor.el" t) (require 'drill-instructor nil t) (setq drill-instructor-global t) @@ -388,8 +388,7 @@ return nil if LIB unfound and downloading failed, otherwise the path of LIB." ;; (my-set-ascii-and-jp-font-with-size '("ProggyCleanTTSZ" 120 "takaogothic" 11)) ;; あ a -(and (dllib-if-unfound "set-modeline-color" - "https://raw.github.com/10sr/emacs-lisp/master/set-modeline-color.el" +(and (dllib-if-unfound "https://raw.github.com/10sr/emacs-lisp/master/set-modeline-color.el" t) (progn (require 'set-modeline-color nil t))) @@ -522,7 +521,7 @@ return nil if LIB unfound and downloading failed, otherwise the path of LIB." (require 'simple nil t) (and window-system - (dllib-if-unfound "save-window-size" "https://raw.github.com/10sr/emacs-lisp/master/save-window-size.el" t) + (dllib-if-unfound "https://raw.github.com/10sr/emacs-lisp/master/save-window-size.el" t) (require 'save-window-size nil t)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -541,7 +540,7 @@ return nil if LIB unfound and downloading failed, otherwise the path of LIB." (and (not x-select-enable-clipboard) (getenv "DISPLAY") (executable-find "xclip") - (dllib-if-unfound "xclip" "http://www.emacswiki.org/emacs/download/xclip.el" t) + (dllib-if-unfound "http://www.emacswiki.org/emacs/download/xclip.el" t) (require 'xclip nil t) (turn-on-xclip)) @@ -638,8 +637,7 @@ return nil if LIB unfound and downloading failed, otherwise the path of LIB." (add-to-list 'auto-mode-alist (cons "\\.md\\'" 'outline-mode)) (setq markdown-command (or (executable-find "markdown") (executable-find "markdown.pl"))) -(when (dllib-if-unfound "markdown-mode" - "http://jblevins.org/projects/markdown-mode/markdown-mode.el" +(when (dllib-if-unfound "http://jblevins.org/projects/markdown-mode/markdown-mode.el" t) (add-to-list 'auto-mode-alist (cons "\\.md\\'" 'markdown-mode)) (autoload 'markdown-mode "markdown-mode" "Major mode for editing Markdown files." nil) @@ -660,8 +658,7 @@ return nil if LIB unfound and downloading failed, otherwise the path of LIB." (c-toggle-hungry-state 1) )) -(when (dllib-if-unfound "js2-mode" - "https://raw.github.com/mooz/js2-mode/master/js2-mode.el" +(when (dllib-if-unfound "https://raw.github.com/mooz/js2-mode/master/js2-mode.el" t) (autoload 'js2-mode "js2-mode" nil t) (add-to-list 'auto-mode-alist '("\\.js\\'" . js2-mode)) @@ -723,14 +720,12 @@ return nil if LIB unfound and downloading failed, otherwise the path of LIB." (require 'session nil t) -(and (dllib-if-unfound "gtkbm" - "https://raw.github.com/10sr/emacs-lisp/master/gtkbm.el" +(and (dllib-if-unfound "https://raw.github.com/10sr/emacs-lisp/master/gtkbm.el" t) (require 'gtkbm nil t) (global-set-key (kbd "C-x C-d") 'gtkbm)) -(and (dllib-if-unfound "git-command" - "https://raw.github.com/10sr/emacs-lisp/master/git-command.el" +(and (dllib-if-unfound "https://raw.github.com/10sr/emacs-lisp/master/git-command.el" t) (require 'git-command nil t) (define-key ctl-x-map "g" 'git-command)) @@ -739,8 +734,7 @@ return nil if LIB unfound and downloading failed, otherwise the path of LIB." ;; term mode ;; (setq multi-term-program shell-file-name) -(and (dllib-if-unfound "multi-term" - "http://www.emacswiki.org/emacs/download/multi-term.el" +(and (dllib-if-unfound "http://www.emacswiki.org/emacs/download/multi-term.el" t) (require 'multi-term nil t) (setq multi-term-switch-after-close nil)) @@ -904,8 +898,7 @@ return nil if LIB unfound and downloading failed, otherwise the path of LIB." ;; http://d.hatena.ne.jp/kobapan/20090305/1236261804 ;; http://www.katch.ne.jp/~leque/software/repos/gauche-mode/gauche-mode.el -(when (dllib-if-unfound "gauche-mode" - "http://www.katch.ne.jp/~leque/software/repos/gauche-mode/gauche-mode.el" +(when (dllib-if-unfound "http://www.katch.ne.jp/~leque/software/repos/gauche-mode/gauche-mode.el" t) (setq auto-mode-alist (cons '("\.gosh\\'" . gauche-mode) auto-mode-alist)) @@ -937,8 +930,7 @@ return nil if LIB unfound and downloading failed, otherwise the path of LIB." (recentf-mode 1) ;; (add-to-list 'recentf-filename-handlers 'abbreviate-file-name) (add-to-list 'recentf-exclude (regexp-quote recentf-save-file)) - (and (dllib-if-unfound "recentf-show" - "https://raw.github.com/10sr/emacs-lisp/master/recentf-show.el" + (and (dllib-if-unfound "https://raw.github.com/10sr/emacs-lisp/master/recentf-show.el" t) (require 'recentf-show nil t) (define-key ctl-x-map (kbd "C-r") 'recentf-show))) @@ -1121,16 +1113,14 @@ return nil if LIB unfound and downloading failed, otherwise the path of LIB." (when (file-readable-p file) (delete-file file))))) -(and (dllib-if-unfound "pack" - "https://raw.github.com/10sr/emacs-lisp/master/pack.el" +(and (dllib-if-unfound "https://raw.github.com/10sr/emacs-lisp/master/pack.el" t) (require 'pack nil t) (add-hook 'dired-mode-hook (lambda () (define-key dired-mode-map "P" 'dired-do-pack-or-unpack)))) -(and (dllib-if-unfound "dired-list-all-mode" - "https://raw.github.com/10sr/emacs-lisp/master/dired-list-all-mode.el" +(and (dllib-if-unfound "https://raw.github.com/10sr/emacs-lisp/master/dired-list-all-mode.el" t) (require 'dired-list-all-mode nil t) (setq dired-listing-switches "-lhFG") From 3878163f94bfa4276e99e423b2630144507e0ca9 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Thu, 3 May 2012 21:29:39 +0900 Subject: [PATCH 24/45] update dllib function --- emacs.el | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/emacs.el b/emacs.el index 5b67eac..f6169f8 100644 --- a/emacs.el +++ b/emacs.el @@ -40,11 +40,11 @@ Each function is called with two args, the filename before changing and after ch (require 'url) (defun dllib-if-unfound (url &optional bite-compile-p force-download-p) - "if LIB does not exist, download it from URL and locate it to \"~/emacs.d/lisp/LIB.el\". -return nil if LIB unfound and downloading failed, otherwise the path of LIB." + "If library does not exist, download it from URL and locate it in \"~/emacs.d/lisp/\". +Return nil if library unfound and downloading failed, otherwise the path where the library installed." (let* ((dir (expand-file-name (concat user-emacs-directory "lisp/"))) - (lib (file-name-nondirectory url)) - (lpath (concat dir lib)) + (lib (file-name-sans-extension (file-name-nondirectory url))) + (lpath (concat dir lib ".el")) (locate-p (locate-library lib))) (if (or force-download-p (not locate-p)) (progn (condition-case nil @@ -53,8 +53,10 @@ return nil if LIB unfound and downloading failed, otherwise the path of LIB." lpath t) (when bite-compile-p + (and (file-writable-p (byte-compile-dest-file lpath)) + (delete-file (byte-compile-dest-file lpath))) (byte-compile-file lpath))) - (error (and (file-readable-p lpath) + (error (and (file-writable-p lpath) (delete-file lpath)) (message "downloading %s...something wrong happened!" url) nil)) From 014c6c9866c077312a3b9100e2e06d3fd9694c04 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Fri, 4 May 2012 04:22:59 +0900 Subject: [PATCH 25/45] add encrypt and decrypt stream func --- bashrc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/bashrc b/bashrc index 8be3259..e221b78 100755 --- a/bashrc +++ b/bashrc @@ -150,6 +150,16 @@ then || complete -o default -o nospace -F _git g fi +encrypt-stream(){ + test $# -eq 1 && + mcrypt --key $1 2>/dev/null | base64 +} + +decrypt-stream(){ + test $# -eq 1 && + base64 -d | mcrypt -d --key $1 2>/dev/null +} + showinfo(){ echo "Japanese letters are 表示可能" From 49742ba23e08e8a35eaaa005578761309c9a5baf Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Fri, 4 May 2012 17:10:52 +0900 Subject: [PATCH 26/45] modify emacs and tmux title tweaks --- emacs.el | 8 ++++---- tmux.conf | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/emacs.el b/emacs.el index f6169f8..9154f5e 100644 --- a/emacs.el +++ b/emacs.el @@ -41,7 +41,7 @@ Each function is called with two args, the filename before changing and after ch (defun dllib-if-unfound (url &optional bite-compile-p force-download-p) "If library does not exist, download it from URL and locate it in \"~/emacs.d/lisp/\". -Return nil if library unfound and downloading failed, otherwise the path where the library installed." +Return nil if library unfound and failed to download, otherwise the path where the library installed." (let* ((dir (expand-file-name (concat user-emacs-directory "lisp/"))) (lib (file-name-sans-extension (file-name-nondirectory url))) (lpath (concat dir lib ".el")) @@ -79,18 +79,18 @@ Return nil if library unfound and downloading failed, otherwise the path where t "] " '(:eval (symbol-name last-command)))) +(setq set-terminal-title-regexp "^\\(xterm\\|screen\\)") (defun set-terminal-title (&rest args) "" (interactive "sString to set as title: ") (let ((tty (frame-parameter nil 'tty-type))) (when (and tty - (eq t (compare-strings "xterm" 0 5 - tty 0 5))) + (string-match set-terminal-title-regexp + tty)) (send-string-to-terminal (apply 'concat "\033]0;" `(,@args "\007")))))) - (defun my-set-terminal-title () "" (set-terminal-title "[" diff --git a/tmux.conf b/tmux.conf index 41939e4..e160d4c 100644 --- a/tmux.conf +++ b/tmux.conf @@ -7,4 +7,5 @@ set -g default-terminal screen-256color #set -g status-left "" #set -g status-right "#H | %a, %d %b %Y %T %z #(tmux -V)" set -g status-right "#H | #(tmux -V) " +set -g set-titles on setw -g mode-keys vi From 71416e063a7db9060614085dae8f374abf3b370d Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Fri, 4 May 2012 19:00:19 +0900 Subject: [PATCH 27/45] update set terminal title prefs --- bashrc | 6 +++--- emacs.el | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bashrc b/bashrc index e221b78..8965636 100755 --- a/bashrc +++ b/bashrc @@ -461,15 +461,15 @@ __my_prompt_function(){ # used by PS1 __my_set_title(){ title="$(echo $@)" case $TERM in - (rxvt*|xterm*|aterm) + (rxvt*|xterm*|aterm|screen*) test -t 1 && test -n "$DISPLAY" && test -z "$EMACS" && - echo -n -e "\033]0;${1}\007" + echo -n -e "\033]0;${title}\007" ;; esac } -# export PROMPT_COMMAND="__my_set_title \${USER}@\${HOSTNAME}\ \${PWD};${PROMPT_COMMAND}" +export PROMPT_COMMAND="__my_set_title \${USER}@\${HOSTNAME}\ \${PWD};" # copied from https://wiki.archlinux.org/index.php/X_resources invader(){ diff --git a/emacs.el b/emacs.el index 9154f5e..cb16d7a 100644 --- a/emacs.el +++ b/emacs.el @@ -79,7 +79,7 @@ Return nil if library unfound and failed to download, otherwise the path where t "] " '(:eval (symbol-name last-command)))) -(setq set-terminal-title-regexp "^\\(xterm\\|screen\\)") +(setq set-terminal-title-regexp "^\\(rxvt\\|xterm\\|aterm$\\|screen\\)") (defun set-terminal-title (&rest args) "" (interactive "sString to set as title: ") From bb3703f4670d7fc813c0a67d6cf33742933178aa Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Fri, 4 May 2012 19:10:47 +0900 Subject: [PATCH 28/45] fix buffer-file-changed-functions --- emacs.el | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/emacs.el b/emacs.el index cb16d7a..a582e83 100644 --- a/emacs.el +++ b/emacs.el @@ -11,14 +11,14 @@ (require 'cl nil t) -(progn ; hook run when directory changed - (defvar buffer-file-changed-function nil "Hook run when buffer file changed. +(progn + (defvar buffer-file-changed-functions nil "Hook run when buffer file changed. Each function is called with two args, the filename before changing and after changing.") - (declare-function run-buffer-file-change-function "emacs.el") + (declare-function run-buffer-file-changed-functions "emacs.el") (add-hook 'post-command-hook - 'run-buffer-file-changed-function) + 'run-buffer-file-changed-functions) (lexical-let (previous-file) - (defun run-buffer-file-changed-function () + (defun run-buffer-file-changed-functions () "" (unless (and previous-file (equal previous-file @@ -28,8 +28,8 @@ Each function is called with two args, the filename before changing and after ch (cfile (expand-file-name (or buffer-file-name default-directory)))) (setq previous-file cfile) - (run-hook-with-args 'directory-changed-function pfile cfile))))) - ;; (add-hook 'directory-changed-function + (run-hook-with-args 'buffer-file-changed-functions pfile cfile))))) + ;; (add-hook 'buffer-file-changed-function ;; (lambda (pdir cdir) ;; (message "dir changed %s to %s !" pdir cdir))) ) @@ -101,7 +101,7 @@ Return nil if library unfound and failed to download, otherwise the path where t (symbol-name system-type) "] " (abbreviate-file-name (or buffer-file-name default-directory)))) -(add-hook 'directory-changed-function +(add-hook 'buffer-file-changed-functions (lambda (p c) (my-set-terminal-title))) (add-hook 'suspend-resume-hook From b7628018a799338a9d8e227795d7bca0ef31bb7f Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Sat, 5 May 2012 21:23:12 +0900 Subject: [PATCH 29/45] change keybind for eval --- _keysnail.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_keysnail.js b/_keysnail.js index 3622b99..2732e32 100644 --- a/_keysnail.js +++ b/_keysnail.js @@ -550,7 +550,7 @@ key.setGlobalKey('C-', function () { } }, '選択中のタブを左へ'); -key.setGlobalKey('M-:', function (ev) { +key.setViewKey('c', function (ev) { command.interpreter(); }, 'JavaScript のコードを評価'); From 26ff17992324d8f9e0f9701de89bf7ce6d67a1d4 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Wed, 9 May 2012 15:57:25 +0900 Subject: [PATCH 30/45] fix dllib bug --- emacs.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/emacs.el b/emacs.el index a582e83..53e7eb8 100644 --- a/emacs.el +++ b/emacs.el @@ -39,7 +39,7 @@ Each function is called with two args, the filename before changing and after ch (require 'url) -(defun dllib-if-unfound (url &optional bite-compile-p force-download-p) +(defun dllib-if-unfound (url &optional byte-compile-p force-download-p) "If library does not exist, download it from URL and locate it in \"~/emacs.d/lisp/\". Return nil if library unfound and failed to download, otherwise the path where the library installed." (let* ((dir (expand-file-name (concat user-emacs-directory "lisp/"))) @@ -52,10 +52,12 @@ Return nil if library unfound and failed to download, otherwise the path where t (url-copy-file url lpath t) - (when bite-compile-p - (and (file-writable-p (byte-compile-dest-file lpath)) + (when (and byte-compile-p + (require 'bytecomp nil t)) + (and (file-exists-p (byte-compile-dest-file lpath)) (delete-file (byte-compile-dest-file lpath))) - (byte-compile-file lpath))) + (byte-compile-file lpath)) + ) (error (and (file-writable-p lpath) (delete-file lpath)) (message "downloading %s...something wrong happened!" url) From 161f3331fee318bf6c051296e311704bb44ca455 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Wed, 9 May 2012 19:00:55 +0900 Subject: [PATCH 31/45] update font.conf --- fonts.conf | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/fonts.conf b/fonts.conf index 8d6178e..5c07a84 100644 --- a/fonts.conf +++ b/fonts.conf @@ -2,14 +2,19 @@ - + serif DejaVu Serif - monapo + serif + + monapo + + + sans-serif DejaVu Sans From 4fba8af256ae65d0a2352896d76993653ae174a0 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Thu, 10 May 2012 14:39:46 +0900 Subject: [PATCH 32/45] menu key treated as rctrl --- xinitrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xinitrc b/xinitrc index 316ecb2..0d36f75 100644 --- a/xinitrc +++ b/xinitrc @@ -2,7 +2,7 @@ test "`hostname`" == "arch-aspireone" && setxkbmap -model "acer_laptop" -layout "jp" # this line must comes first setxkbmap -option "ctrl:nocaps" -xmodmap -e 'keycode 135 = Alt_R Meta_R' # menu key as alt +setxkbmap -option "ctrl:menu_rctrl" xmodmap -e 'keycode 101 = Alt_R Meta_R' # hiragana key as alt #xmodmap -e 'remove Lock = Caps_Lock' #xmodmap -e 'add Control = Caps_Lock' From a4fbd38633a4e470551d1ca8815fad7a190fc9e0 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Thu, 10 May 2012 20:50:50 +0900 Subject: [PATCH 33/45] fix keyboard settings for usb keyboard --- 20-keyboard.conf | 9 +++++++++ xinitrc | 3 +-- 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 20-keyboard.conf diff --git a/20-keyboard.conf b/20-keyboard.conf new file mode 100644 index 0000000..b34b743 --- /dev/null +++ b/20-keyboard.conf @@ -0,0 +1,9 @@ +# ln -s this /etc/X11/xorg.conf.d + +Section "InputClass" + Identifier "Keyboard Defaults" + MatchIsKeyboard "yes" +# Option "XkbModel" "acer_laptop" +# Option "XkbLayout" "jp" + Option "XkbOptions" "ctrl:nocaps,ctrl:menu_rctrl" +EndSection diff --git a/xinitrc b/xinitrc index 316ecb2..acf792a 100644 --- a/xinitrc +++ b/xinitrc @@ -1,8 +1,7 @@ test "`hostname`" == "arch-aspireone" && setxkbmap -model "acer_laptop" -layout "jp" # this line must comes first -setxkbmap -option "ctrl:nocaps" -xmodmap -e 'keycode 135 = Alt_R Meta_R' # menu key as alt +setxkbmap -option "ctrl:nocaps,ctrl:menu_rctrl" xmodmap -e 'keycode 101 = Alt_R Meta_R' # hiragana key as alt #xmodmap -e 'remove Lock = Caps_Lock' #xmodmap -e 'add Control = Caps_Lock' From 0400c594291ddea42a43677fb0df05654bca498e Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Thu, 10 May 2012 21:17:27 +0900 Subject: [PATCH 34/45] add hok --- _keysnail.js | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/_keysnail.js b/_keysnail.js index 2732e32..07b620c 100644 --- a/_keysnail.js +++ b/_keysnail.js @@ -222,7 +222,8 @@ ext.add('auto-install-plugins', function(ev, arg){ 'https://raw.github.com/10sr/keysnail-plugin/master/dig-url.ks.js', 'https://raw.github.com/10sr/keysnail-plugin/master/instapaper.ks.js', 'https://raw.github.com/gist/1976942/firefox-addon-manager.ks.js', - 'https://raw.github.com/gist/1450594/mstranslator.ks.js' + 'https://raw.github.com/gist/1450594/mstranslator.ks.js', + 'https://raw.github.com/mooz/keysnail/master/plugins/hok.ks.js' ]; function inst(a){ @@ -550,14 +551,14 @@ key.setGlobalKey('C-', function () { } }, '選択中のタブを左へ'); -key.setViewKey('c', function (ev) { - command.interpreter(); -}, 'JavaScript のコードを評価'); - key.setGlobalKey('C-h', function (ev, arg) { return; }, 'ignore'); +key.setViewKey('c', function (ev) { + command.interpreter(); +}, 'JavaScript のコードを評価'); + key.setViewKey('D', function (ev, arg) { ext.exec("dig-url", arg, ev); }, 'dig url with selector', true); @@ -728,3 +729,7 @@ key.setViewKey('T', function (ev, arg) { key.setEditKey('C-', function (ev) { command.walkInputElement(command.elementsRetrieverTextarea, true, true); }, '次のテキストエリアへフォーカス'); + +key.setGlobalKey('C-l', function (ev, arg) { + ext.exec('hok-start-foreground-mode', arg, ev); +}, 'Start Hit a Hint foreground mode', true); From 929a8d37c7b048de4a08c9eb89225a6af2844b0c Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Thu, 10 May 2012 22:32:05 +0900 Subject: [PATCH 35/45] misc changes --- _keysnail.js | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/_keysnail.js b/_keysnail.js index 07b620c..65a31b4 100644 --- a/_keysnail.js +++ b/_keysnail.js @@ -222,8 +222,7 @@ ext.add('auto-install-plugins', function(ev, arg){ 'https://raw.github.com/10sr/keysnail-plugin/master/dig-url.ks.js', 'https://raw.github.com/10sr/keysnail-plugin/master/instapaper.ks.js', 'https://raw.github.com/gist/1976942/firefox-addon-manager.ks.js', - 'https://raw.github.com/gist/1450594/mstranslator.ks.js', - 'https://raw.github.com/mooz/keysnail/master/plugins/hok.ks.js' + 'https://raw.github.com/gist/1450594/mstranslator.ks.js' ]; function inst(a){ @@ -479,7 +478,7 @@ ext.add("list-tab-history", function () { // ========================= Special key settings ========================== // -key.quitKey = ""; +key.quitKey = "ESC"; key.helpKey = ""; key.escapeKey = "C-q"; key.macroStartKey = ""; @@ -555,6 +554,10 @@ key.setGlobalKey('C-h', function (ev, arg) { return; }, 'ignore'); +key.setGlobalKey('C-l', function (ev, arg) { + ext.exec("hok-start-foreground-mode", arg, ev); +}, 'Start Hit a Hint foreground mode', true); + key.setViewKey('c', function (ev) { command.interpreter(); }, 'JavaScript のコードを評価'); @@ -730,6 +733,8 @@ key.setEditKey('C-', function (ev) { command.walkInputElement(command.elementsRetrieverTextarea, true, true); }, '次のテキストエリアへフォーカス'); -key.setGlobalKey('C-l', function (ev, arg) { - ext.exec('hok-start-foreground-mode', arg, ev); -}, 'Start Hit a Hint foreground mode', true); +key.setGlobalKey('', function (ev, arg) { + let(elem = document.commandDispatcher.focusedElement) elem && elem.blur(); + gBrowser.focus(); + content.focus(); +}, 'コンテンツへフォーカス', true); From bfec2c51b57c1531d2a16dc3ea4c2fb805ba76e1 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Thu, 10 May 2012 22:37:03 +0900 Subject: [PATCH 36/45] do not use menukey as ctrl (in console menukey cant be used --- 20-keyboard.conf | 2 +- xinitrc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/20-keyboard.conf b/20-keyboard.conf index b34b743..a894040 100644 --- a/20-keyboard.conf +++ b/20-keyboard.conf @@ -5,5 +5,5 @@ Section "InputClass" MatchIsKeyboard "yes" # Option "XkbModel" "acer_laptop" # Option "XkbLayout" "jp" - Option "XkbOptions" "ctrl:nocaps,ctrl:menu_rctrl" + Option "XkbOptions" "ctrl:nocaps" EndSection diff --git a/xinitrc b/xinitrc index acf792a..25e2b41 100644 --- a/xinitrc +++ b/xinitrc @@ -1,7 +1,7 @@ test "`hostname`" == "arch-aspireone" && setxkbmap -model "acer_laptop" -layout "jp" # this line must comes first -setxkbmap -option "ctrl:nocaps,ctrl:menu_rctrl" +setxkbmap -option "ctrl:nocaps" xmodmap -e 'keycode 101 = Alt_R Meta_R' # hiragana key as alt #xmodmap -e 'remove Lock = Caps_Lock' #xmodmap -e 'add Control = Caps_Lock' From 59aee9a02ef70064c863970fbe685828441dbeff Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Fri, 11 May 2012 00:48:24 +0900 Subject: [PATCH 37/45] change left and right keys binding --- _keysnail.js | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/_keysnail.js b/_keysnail.js index 65a31b4..b7bfe37 100644 --- a/_keysnail.js +++ b/_keysnail.js @@ -558,6 +558,12 @@ key.setGlobalKey('C-l', function (ev, arg) { ext.exec("hok-start-foreground-mode", arg, ev); }, 'Start Hit a Hint foreground mode', true); +key.setGlobalKey('', function (ev, arg) { + let (elem = document.commandDispatcher.focusedElement) elem && elem.blur(); + gBrowser.focus(); + content.focus(); +}, 'コンテンツへフォーカス', true); + key.setViewKey('c', function (ev) { command.interpreter(); }, 'JavaScript のコードを評価'); @@ -684,14 +690,6 @@ key.setViewKey('a', function (ev, arg) { allTabs.open(); }, 'alltabs.open'); -key.setViewKey('', function (ev) { - goDoCommand("cmd_scrollPageUp"); -}, '一画面分スクロールアップ'); - -key.setViewKey('', function (ev) { - goDoCommand("cmd_scrollPageDown"); -}, '一画面スクロールダウン'); - key.setViewKey([[''], ['']], function (ev, arg) { return; }, 'ignore'); @@ -733,8 +731,10 @@ key.setEditKey('C-', function (ev) { command.walkInputElement(command.elementsRetrieverTextarea, true, true); }, '次のテキストエリアへフォーカス'); -key.setGlobalKey('', function (ev, arg) { - let(elem = document.commandDispatcher.focusedElement) elem && elem.blur(); - gBrowser.focus(); - content.focus(); -}, 'コンテンツへフォーカス', true); +key.setViewKey('', function (ev) { + getBrowser().mTabContainer.advanceSelectedTab(1, true); +}, 'ひとつ右のタブへ'); + +key.setViewKey('', function (ev) { + getBrowser().mTabContainer.advanceSelectedTab(-1, true); +}, 'ひとつ左のタブへ'); From cd41e07fa5643be9e654088a11025c78dc3b645d Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Fri, 11 May 2012 01:23:20 +0900 Subject: [PATCH 38/45] revert two commit related to disabling menu_as_ctrl --- 20-keyboard.conf | 2 +- _keysnail.js | 26 +++++++++++++------------- xinitrc | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/20-keyboard.conf b/20-keyboard.conf index a894040..b34b743 100644 --- a/20-keyboard.conf +++ b/20-keyboard.conf @@ -5,5 +5,5 @@ Section "InputClass" MatchIsKeyboard "yes" # Option "XkbModel" "acer_laptop" # Option "XkbLayout" "jp" - Option "XkbOptions" "ctrl:nocaps" + Option "XkbOptions" "ctrl:nocaps,ctrl:menu_rctrl" EndSection diff --git a/_keysnail.js b/_keysnail.js index b7bfe37..65a31b4 100644 --- a/_keysnail.js +++ b/_keysnail.js @@ -558,12 +558,6 @@ key.setGlobalKey('C-l', function (ev, arg) { ext.exec("hok-start-foreground-mode", arg, ev); }, 'Start Hit a Hint foreground mode', true); -key.setGlobalKey('', function (ev, arg) { - let (elem = document.commandDispatcher.focusedElement) elem && elem.blur(); - gBrowser.focus(); - content.focus(); -}, 'コンテンツへフォーカス', true); - key.setViewKey('c', function (ev) { command.interpreter(); }, 'JavaScript のコードを評価'); @@ -690,6 +684,14 @@ key.setViewKey('a', function (ev, arg) { allTabs.open(); }, 'alltabs.open'); +key.setViewKey('', function (ev) { + goDoCommand("cmd_scrollPageUp"); +}, '一画面分スクロールアップ'); + +key.setViewKey('', function (ev) { + goDoCommand("cmd_scrollPageDown"); +}, '一画面スクロールダウン'); + key.setViewKey([[''], ['']], function (ev, arg) { return; }, 'ignore'); @@ -731,10 +733,8 @@ key.setEditKey('C-', function (ev) { command.walkInputElement(command.elementsRetrieverTextarea, true, true); }, '次のテキストエリアへフォーカス'); -key.setViewKey('', function (ev) { - getBrowser().mTabContainer.advanceSelectedTab(1, true); -}, 'ひとつ右のタブへ'); - -key.setViewKey('', function (ev) { - getBrowser().mTabContainer.advanceSelectedTab(-1, true); -}, 'ひとつ左のタブへ'); +key.setGlobalKey('', function (ev, arg) { + let(elem = document.commandDispatcher.focusedElement) elem && elem.blur(); + gBrowser.focus(); + content.focus(); +}, 'コンテンツへフォーカス', true); diff --git a/xinitrc b/xinitrc index 25e2b41..acf792a 100644 --- a/xinitrc +++ b/xinitrc @@ -1,7 +1,7 @@ test "`hostname`" == "arch-aspireone" && setxkbmap -model "acer_laptop" -layout "jp" # this line must comes first -setxkbmap -option "ctrl:nocaps" +setxkbmap -option "ctrl:nocaps,ctrl:menu_rctrl" xmodmap -e 'keycode 101 = Alt_R Meta_R' # hiragana key as alt #xmodmap -e 'remove Lock = Caps_Lock' #xmodmap -e 'add Control = Caps_Lock' From 4f37f530cc72a03ab4bf2d77d789c04fb43d02ce Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Fri, 11 May 2012 10:15:16 +0900 Subject: [PATCH 39/45] update conkyrc --- conkyrc | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/conkyrc b/conkyrc index 6e20b0d..8c55169 100644 --- a/conkyrc +++ b/conkyrc @@ -71,6 +71,15 @@ ${color4}${downspeedgraph wlan0 ff0000 0000ff} ${color2}up ${color1}|${color0} ${upspeed wlan0}/s ${color4}${upspeedgraph wlan0 0000ff ff0000} ${endif}\ +${if_up wlan2}\ +${color2}if ${color1}|${color0} wlan0:${addr wlan2} +${color2}ssid ${color1}|${color0} ${wireless_essid wlan2} ${wireless_link_qual_perc wlan2}% +${color0}${stippled_hr} +${color2}down ${color1}|${color0} ${downspeed wlan2}/s +${color4}${downspeedgraph wlan2 ff0000 0000ff} +${color2}up ${color1}|${color0} ${upspeed wlan2}/s +${color4}${upspeedgraph wlan2 0000ff ff0000} +${endif}\ ${if_up eth0}\ ${color2}if ${color1}|${color0} eth0:${addr eth0} ${color0}${stippled_hr} @@ -79,6 +88,14 @@ ${color4}${downspeedgraph eth0 ff0000 0000ff} ${color2}up ${color1}|${color0} ${upspeed eth0}/s ${color4}${upspeedgraph eth0 0000ff ff0000} ${endif}\ +${if_up eth2}\ +${color2}if ${color1}|${color0} eth2:${addr eth2} +${color0}${stippled_hr} +${color2}down ${color1}|${color0} ${downspeed eth2}/s +${color4}${downspeedgraph eth2 ff0000 0000ff} +${color2}up ${color1}|${color0} ${upspeed eth2}/s +${color4}${upspeedgraph eth2 0000ff ff0000} +${endif}\ ${color0}${alignr}conky ${conky_version} ${color0}${hr} ${color3}${alignr}${texeci 10 bash -c 'xrandr|grep " connected "|cut -f 1,3 -d " "'} From 4afd21a5cf20c9f169f4cf2d183137690a84f5c5 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Fri, 11 May 2012 16:00:14 +0900 Subject: [PATCH 40/45] fix gkeyring --- xprograms | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xprograms b/xprograms index 53e69a2..6842ade 100755 --- a/xprograms +++ b/xprograms @@ -49,7 +49,8 @@ _saku(){ } _gkeyring(){ - LANG=C gnome-keyring-daemon --start -c pkcs11 & + /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1 & + eval $(gnome-keyring-daemon -s) & } _nmapplet(){ From 717f34cbba08b8fd9285ae2ddc46c82f30310eef Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Fri, 11 May 2012 16:00:40 +0900 Subject: [PATCH 41/45] update keybind --- _keysnail.js | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/_keysnail.js b/_keysnail.js index 65a31b4..1faca42 100644 --- a/_keysnail.js +++ b/_keysnail.js @@ -558,6 +558,12 @@ key.setGlobalKey('C-l', function (ev, arg) { ext.exec("hok-start-foreground-mode", arg, ev); }, 'Start Hit a Hint foreground mode', true); +key.setGlobalKey('', function (ev, arg) { + let (elem = document.commandDispatcher.focusedElement) elem && elem.blur(); + gBrowser.focus(); + content.focus(); +}, 'コンテンツへフォーカス', true); + key.setViewKey('c', function (ev) { command.interpreter(); }, 'JavaScript のコードを評価'); @@ -696,7 +702,12 @@ key.setViewKey([[''], ['']], function (ev, arg) { return; }, 'ignore'); -key.setViewKey([[':'], ['P']], function (ev, arg) { +key.setViewKey(':', function (ev, arg) { + return !document.getElementById("keysnail-prompt").hidden && + document.getElementById("keysnail-prompt-textbox").focus(); +}, 'KeySnail のプロンプトへフォーカス', true); + +key.setGlobalKey('C-p', function (ev, arg) { return !document.getElementById("keysnail-prompt").hidden && document.getElementById("keysnail-prompt-textbox").focus(); }, 'KeySnail のプロンプトへフォーカス', true); @@ -732,9 +743,3 @@ key.setViewKey('T', function (ev, arg) { key.setEditKey('C-', function (ev) { command.walkInputElement(command.elementsRetrieverTextarea, true, true); }, '次のテキストエリアへフォーカス'); - -key.setGlobalKey('', function (ev, arg) { - let(elem = document.commandDispatcher.focusedElement) elem && elem.blur(); - gBrowser.focus(); - content.focus(); -}, 'コンテンツへフォーカス', true); From 85be0ca922224e73097e5386a76318c2d5d4e666 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Sun, 13 May 2012 01:12:04 +0900 Subject: [PATCH 42/45] i find how to use gpg for easy encryption --- bashrc | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/bashrc b/bashrc index 8965636..ea3efed 100755 --- a/bashrc +++ b/bashrc @@ -150,16 +150,28 @@ then || complete -o default -o nospace -F _git g fi -encrypt-stream(){ - test $# -eq 1 && - mcrypt --key $1 2>/dev/null | base64 +crypt-stream(){ + test $# -eq 2 || return 1 + case $1 in + en) + mcrypt --key $2 | base64 ;; + de) + base64 -d | mcrypt -d --key $2 ;; + esac } - -decrypt-stream(){ - test $# -eq 1 && - base64 -d | mcrypt -d --key $1 2>/dev/null +gpg-stream(){ + test $# -eq 2 || return 1 + case $1 in + en) + gpg --passphrase $2 -c --batch |base64 ;; + de) + base64 -d|gpg --passphrase $2 -d --batch ;; + esac } +alias enst="gpg-stream en" +alias dest="gpg-stream de" + showinfo(){ echo "Japanese letters are 表示可能" @@ -290,6 +302,7 @@ _my_git_config(){ git config --global color.ui auto git config --global status.relativePaths false git config --global status.showUntrackedFiles normal + git config --global log.date iso git config --global alias.graph "log --graph --date-order -C -M --pretty=tformat:\"<%h> %ad [%an] %Cgreen%d%Creset %s\" --all --date=iso" git config --global alias.st "status -s -b" git config --global alias.b "branch" From f3b589680cabc0261eb6b01ad3b21cdf9e87d2c4 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Sun, 13 May 2012 01:16:59 +0900 Subject: [PATCH 43/45] misc changes --- emacs.el | 4 ++++ tmux.conf | 1 + 2 files changed, 5 insertions(+) diff --git a/emacs.el b/emacs.el index 53e7eb8..58afbb7 100644 --- a/emacs.el +++ b/emacs.el @@ -506,6 +506,8 @@ Return nil if library unfound and failed to download, otherwise the path where t ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; buffer killing +(defun my-delete-window-killing-buffer () nil) + (defun my-query-kill-this-buffer () "" (interactive) @@ -514,6 +516,8 @@ Return nil if library unfound and failed to download, otherwise the path where t (substitute-key-definition 'kill-buffer 'my-query-kill-this-buffer global-map) ;;(global-set-key "\C-xk" 'my-query-kill-this-buffer) +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; package '(setq package-archives '(("ELPA" . "http://tromey.com/elpa/") ("gnu" . "http://elpa.gnu.org/packages/") diff --git a/tmux.conf b/tmux.conf index e160d4c..0ca4267 100644 --- a/tmux.conf +++ b/tmux.conf @@ -1,6 +1,7 @@ unbind C-b set -g prefix C-z bind-key C-z send-prefix +bind-key C command-prompt "new-window '%%'" set -g default-command /bin/bash set -g default-terminal screen-256color From 0854873e37acde457c78c4cdcceac427a2fbead9 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Sun, 13 May 2012 14:40:10 +0900 Subject: [PATCH 44/45] add ENV DMENU_FONT for my use --- bashrc | 3 ++- xinitrc | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/bashrc b/bashrc index ea3efed..cd58a08 100755 --- a/bashrc +++ b/bashrc @@ -150,7 +150,7 @@ then || complete -o default -o nospace -F _git g fi -crypt-stream(){ +mcrypt-stream(){ test $# -eq 2 || return 1 case $1 in en) @@ -159,6 +159,7 @@ crypt-stream(){ base64 -d | mcrypt -d --key $2 ;; esac } + gpg-stream(){ test $# -eq 2 || return 1 case $1 in diff --git a/xinitrc b/xinitrc index acf792a..de31f75 100644 --- a/xinitrc +++ b/xinitrc @@ -18,6 +18,7 @@ xset dpms 1810 1820 1830 # standby, suspend and off seem not to be differ unset LC_MESSAGES export LANG=ja_JP.utf8 export BROWSER=firefox +export DMENU_FONT='-*-dejavu sans mono-*-r-*-*-11-*-*-*-*-*-*-*' __upper(){ echo $1 | tr '[:lower:]' '[:upper:]' From b67f1de9d475e6a44704bf5f3053bf0bc2b4cab9 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Tue, 15 May 2012 16:01:47 +0900 Subject: [PATCH 45/45] update keybind --- _keysnail.js | 52 ++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 38 insertions(+), 14 deletions(-) diff --git a/_keysnail.js b/_keysnail.js index 1faca42..1b359af 100644 --- a/_keysnail.js +++ b/_keysnail.js @@ -554,7 +554,7 @@ key.setGlobalKey('C-h', function (ev, arg) { return; }, 'ignore'); -key.setGlobalKey('C-l', function (ev, arg) { +key.setViewKey('L', function (ev, arg) { ext.exec("hok-start-foreground-mode", arg, ev); }, 'Start Hit a Hint foreground mode', true); @@ -564,6 +564,11 @@ key.setGlobalKey('', function (ev, arg) { content.focus(); }, 'コンテンツへフォーカス', true); +key.setGlobalKey('C-p', function (ev, arg) { + return !document.getElementById("keysnail-prompt").hidden && + document.getElementById("keysnail-prompt-textbox").focus(); +}, 'KeySnail のプロンプトへフォーカス', true); + key.setViewKey('c', function (ev) { command.interpreter(); }, 'JavaScript のコードを評価'); @@ -658,10 +663,6 @@ key.setViewKey('!', function (ev, arg) { shell.input(); }, 'Command system'); -key.setViewKey('b', function (ev, arg) { - BarTap.putOnTap(gBrowser.mCurrentTab, gBrowser); -}, 'bartab put on tab'); - key.setViewKey('R', function () { BrowserReloadSkipCache(); }, '更新(キャッシュを無視)'); @@ -707,19 +708,10 @@ key.setViewKey(':', function (ev, arg) { document.getElementById("keysnail-prompt-textbox").focus(); }, 'KeySnail のプロンプトへフォーカス', true); -key.setGlobalKey('C-p', function (ev, arg) { - return !document.getElementById("keysnail-prompt").hidden && - document.getElementById("keysnail-prompt-textbox").focus(); -}, 'KeySnail のプロンプトへフォーカス', true); - key.setViewKey('H', function (ev, arg) { ext.exec("open-hatebu-comment", arg, ev); }, 'hatebu', true); -key.setViewKey('l', function (ev) { - command.focusToById("urlbar"); -}, 'ロケーションバーへフォーカス', true); - key.setViewKey('0', function (ev) { BrowserCloseTabOrWindow(); }, 'タブ / ウィンドウを閉じる'); @@ -743,3 +735,35 @@ key.setViewKey('T', function (ev, arg) { key.setEditKey('C-', function (ev) { command.walkInputElement(command.elementsRetrieverTextarea, true, true); }, '次のテキストエリアへフォーカス'); + +key.setViewKey('j', function (ev) { + key.generateKey(ev.originalTarget, KeyEvent.DOM_VK_DOWN, true); +}, '一行スクロールダウン'); + +key.setViewKey('k', function (ev) { + key.generateKey(ev.originalTarget, KeyEvent.DOM_VK_UP, true); +}, '一行スクロールアップ'); + +key.setViewKey('J', function (ev) { + getBrowser().mTabContainer.advanceSelectedTab(1, true); +}, 'ひとつ右のタブへ'); + +key.setViewKey('K', function (ev) { + getBrowser().mTabContainer.advanceSelectedTab(-1, true); +}, 'ひとつ左のタブへ'); + +key.setViewKey('b', function (ev) { + BrowserBack(); +}, '戻る'); + +key.setViewKey('B', function (ev) { + BrowserForward(); +}, '進む'); + +key.setViewKey('l', function (ev) { + goDoCommand("cmd_scrollPageDown"); +}, '一画面スクロールダウン'); + +key.setViewKey('h', function (ev) { + goDoCommand("cmd_scrollPageUp"); +}, '一画面分スクロールアップ');