Merge remote-tracking branch 'gitorious/master' into phoenix
This commit is contained in:
commit
4857418dbd
9 changed files with 96 additions and 85 deletions
|
@ -94,7 +94,7 @@ function print_services() {
|
||||||
servicetxt="$servicetxt$separator$(status $j)"
|
servicetxt="$servicetxt$separator$(status $j)"
|
||||||
done
|
done
|
||||||
servicetxt_only=$(echo -n "$servicetxt" | sed 's.\^[^(]*([^)]*)..g')
|
servicetxt_only=$(echo -n "$servicetxt" | sed 's.\^[^(]*([^)]*)..g')
|
||||||
let servicetxt_width=$(textwidth "$font" "$servicetxt_only")/2
|
let servicetxt_width=($(textwidth "$font" "$servicetxt_only")+7)/2
|
||||||
|
|
||||||
echo -n "^p(_CENTER)^p(-$servicetxt_width)$servicetxt"
|
echo -n "^p(_CENTER)^p(-$servicetxt_width)$servicetxt"
|
||||||
}
|
}
|
||||||
|
@ -150,3 +150,7 @@ herbstclient pad $monitor2 -5 -5 -5 -5
|
||||||
done
|
done
|
||||||
} 2> /dev/null | dzen2 -w $width -x $x -y $y -fn "$font" -h $height \
|
} 2> /dev/null | dzen2 -w $width -x $x -y $y -fn "$font" -h $height \
|
||||||
-ta l -bg "$bgcolor"
|
-ta l -bg "$bgcolor"
|
||||||
|
|
||||||
|
# Local Variables:
|
||||||
|
# eval: (git-auto-commit-mode 1)
|
||||||
|
# End:
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
|
# -*- eval: (git-auto-commit-mode 1) -*-
|
||||||
auto-reload yes
|
auto-reload yes
|
||||||
browser "$BROWSER"
|
browser conkeror
|
||||||
confirm-exit yes
|
confirm-exit yes
|
||||||
feedlist-format "%-35t %?d?- %-35d&? %> %u"
|
feedlist-format "%-35t %?d?- %-35d&? %> %u"
|
||||||
max-items 500
|
max-items 500
|
||||||
|
|
|
@ -75,6 +75,7 @@ http://planet.emacsen.org/atom.xml emacs
|
||||||
http://emacsblog.org/feed/ emacs
|
http://emacsblog.org/feed/ emacs
|
||||||
http://www.emacswiki.org/emacs?action=rss emacs
|
http://www.emacswiki.org/emacs?action=rss emacs
|
||||||
http://feeds.feedburner.com/XahsEmacsBlog
|
http://feeds.feedburner.com/XahsEmacsBlog
|
||||||
|
http://www.masteringemacs.org/feed/
|
||||||
|
|
||||||
#-----[ N900 ]--------------------------------------------------------
|
#-----[ N900 ]--------------------------------------------------------
|
||||||
http://www.reddit.com/r/n900/.rss n900
|
http://www.reddit.com/r/n900/.rss n900
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
|
// -*- eval: (git-auto-commit-mode 1) -*-
|
||||||
require("favicon");
|
require("favicon");
|
||||||
|
|
||||||
add_hook("mode_line_hook", mode_line_adder(buffer_icon_widget, true));
|
add_hook("mode_line_hook", mode_line_adder(buffer_icon_widget, true));
|
||||||
add_hook("mode_line_hook", mode_line_adder(buffer_count_widget, true));
|
add_hook("mode_line_hook", mode_line_adder(buffer_count_widget, true));
|
||||||
|
add_hook("mode_line_hook", mode_line_adder(downloads_status_widget));
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
// -*- eval: (git-auto-commit-mode 1) -*-
|
||||||
cwd = make_file("/home/slash/downloads/");
|
cwd = make_file("/home/slash/downloads/");
|
||||||
url_remoting_fn = load_url_in_new_buffer;
|
url_remoting_fn = load_url_in_new_buffer;
|
||||||
read_buffer_show_icons = true;
|
read_buffer_show_icons = true;
|
||||||
|
@ -12,3 +13,5 @@ add_hook("before_quit_hook",
|
||||||
$options = ["y", "n"]));
|
$options = ["y", "n"]));
|
||||||
yield co_return(result);
|
yield co_return(result);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
remove_hook("download_added_hook", open_download_buffer_automatically);
|
||||||
|
|
|
@ -4,18 +4,38 @@
|
||||||
|
|
||||||
;;; Variables
|
;;; Variables
|
||||||
(define modkey 'mod4)
|
(define modkey 'mod4)
|
||||||
(define font "-misc-tamsyn-medium-r-normal-*-17-*-*-*-*-*-iso8859-*")
|
(define dmenu-font
|
||||||
|
"-misc-tamsyn-medium-r-normal-*-14-*-*-*-*-*-iso8859-*")
|
||||||
(define dmenu-cmd "dmenu")
|
(define dmenu-cmd "dmenu")
|
||||||
(define dmenu-args
|
(define dmenu-args
|
||||||
(string-append "-b -nb '#000000' -nf '#15abc3' -sb '#e0c625' -sf '#000000' -fn '" font "'"))
|
(string-append
|
||||||
|
"-b -nb '#000000' -nf '#15abc3' -sb '#e0c625' -sf '#000000' -fn '"
|
||||||
|
dmenu-font "'"))
|
||||||
|
(define dzen-font
|
||||||
|
"-misc-tamsyn-medium-r-normal-*-17-*-*-*-*-*-iso8859-*")
|
||||||
|
(define dzen-cmd "dzen2")
|
||||||
|
(define dzen-args
|
||||||
|
(string-append " -fn '" dzen-font
|
||||||
|
"' -x 5 -y 5 -bg '#000000' -fg '#15abc3'"))
|
||||||
(define dzen-pipe '())
|
(define dzen-pipe '())
|
||||||
|
|
||||||
|
(define previous-tag '())
|
||||||
|
(define current-tag "default")
|
||||||
|
|
||||||
;;; Macros
|
;;; Macros
|
||||||
(define-macro (cmd command)
|
(define-macro (cmd command)
|
||||||
`(lambda ()
|
`(lambda ()
|
||||||
(run-command ,command)
|
(run-command ,command)
|
||||||
(reset-main-binding)))
|
(reset-main-binding)))
|
||||||
|
|
||||||
|
(define-macro (create-map name binding . more)
|
||||||
|
`(define (,name)
|
||||||
|
(ungrab-all-keys)
|
||||||
|
(remove-all-keys)
|
||||||
|
(begin ,binding . ,more)
|
||||||
|
(xbindkey-function `(,modkey g) reset-main-binding)
|
||||||
|
(grab-all-keys)))
|
||||||
|
|
||||||
;;; Functions
|
;;; Functions
|
||||||
(define (reset-main-binding)
|
(define (reset-main-binding)
|
||||||
"reset first binding"
|
"reset first binding"
|
||||||
|
@ -26,11 +46,16 @@
|
||||||
(grab-all-keys))
|
(grab-all-keys))
|
||||||
|
|
||||||
(define (get-tags)
|
(define (get-tags)
|
||||||
|
"Get a list of tags"
|
||||||
(let* ((file (open-input-pipe
|
(let* ((file (open-input-pipe
|
||||||
"TAGS=( $(herbstclient tag_status 0 | tr \":\\!.+#\" \" \") ); echo ${TAGS[@]}"))
|
"TAGS=( $(herbstclient tag_status 0 | tr \":\\!.+#\" \" \") ); echo ${TAGS[@]}"))
|
||||||
(tags (string-split (read-line file) #\ )))
|
(tags (string-split (read-line file) #\ )))
|
||||||
(close-port file)
|
(close-port file)
|
||||||
tags))
|
(set! tags (delete current-tag tags))
|
||||||
|
(set! tags (delete previous-tag tags))
|
||||||
|
(if (not (null? previous-tag))
|
||||||
|
(append `(,previous-tag) (append tags `(,current-tag)))
|
||||||
|
(append tags `(,current-tag)))))
|
||||||
|
|
||||||
(define (choose-tag prompt tags)
|
(define (choose-tag prompt tags)
|
||||||
"Ask to choose a tag"
|
"Ask to choose a tag"
|
||||||
|
@ -49,6 +74,8 @@
|
||||||
(begin
|
(begin
|
||||||
(if (not (member tag tags))
|
(if (not (member tag tags))
|
||||||
(system (string-append "herbstclient add " tag)))
|
(system (string-append "herbstclient add " tag)))
|
||||||
|
(set! previous-tag current-tag)
|
||||||
|
(set! current-tag tag)
|
||||||
(run-command (string-append "herbstclient use " tag))))
|
(run-command (string-append "herbstclient use " tag))))
|
||||||
(reset-main-binding)))
|
(reset-main-binding)))
|
||||||
|
|
||||||
|
@ -82,10 +109,11 @@
|
||||||
-1)))
|
-1)))
|
||||||
|
|
||||||
(define (gui-print text)
|
(define (gui-print text)
|
||||||
(let ((width (+ (text-width font text) 10)))
|
(close-gui-window)
|
||||||
|
(let ((width (+ (text-width dzen-font text) 10)))
|
||||||
(set! dzen-pipe (open-output-pipe
|
(set! dzen-pipe (open-output-pipe
|
||||||
(string-append "dzen2 -w " (number->string width)
|
(string-append dzen-cmd " -w " (number->string width)
|
||||||
" -fn '" font "' -x 5 -y 5 -bg '#000000' -fg '#15abc3'"))))
|
" " dzen-args))))
|
||||||
(display text dzen-pipe)
|
(display text dzen-pipe)
|
||||||
(newline dzen-pipe))
|
(newline dzen-pipe))
|
||||||
|
|
||||||
|
@ -99,9 +127,9 @@
|
||||||
(define (main-binding)
|
(define (main-binding)
|
||||||
"First binding"
|
"First binding"
|
||||||
(xbindkey `(,modkey shift "1") (string-append "dmenu_run -p 'Run:' " dmenu-args))
|
(xbindkey `(,modkey shift "1") (string-append "dmenu_run -p 'Run:' " dmenu-args))
|
||||||
(xbindkey-function `(,modkey x) X-functions)
|
(xbindkey-function `(,modkey x) X-function-map)
|
||||||
(xbindkey-function `(,modkey w) W-functions)
|
(xbindkey-function `(,modkey w) W-function-map)
|
||||||
(xbindkey-function `(,modkey s) S-functions)
|
(xbindkey-function `(,modkey s) S-function-map)
|
||||||
(xbindkey `(,modkey Return) "urxvt")
|
(xbindkey `(,modkey Return) "urxvt")
|
||||||
(xbindkey '(control alt l) "i3lock -c 000000")
|
(xbindkey '(control alt l) "i3lock -c 000000")
|
||||||
(xbindkey '(XF86HomePage) "conkeror")
|
(xbindkey '(XF86HomePage) "conkeror")
|
||||||
|
@ -116,11 +144,8 @@
|
||||||
(xbindkey '(XF86Tools) "ncmpcpp")
|
(xbindkey '(XF86Tools) "ncmpcpp")
|
||||||
(xbindkey-function `(,modkey g) reset-main-binding))
|
(xbindkey-function `(,modkey g) reset-main-binding))
|
||||||
|
|
||||||
(define (X-functions)
|
(create-map X-function-map
|
||||||
"Second binding"
|
|
||||||
(gui-print "S-x")
|
(gui-print "S-x")
|
||||||
(ungrab-all-keys)
|
|
||||||
(remove-all-keys)
|
|
||||||
(xbindkey-function '(b) switch-tags)
|
(xbindkey-function '(b) switch-tags)
|
||||||
(xbindkey-function `(,modkey c) (cmd "herbstclient quit"))
|
(xbindkey-function `(,modkey c) (cmd "herbstclient quit"))
|
||||||
(xbindkey-function `(,modkey r) (cmd "herbstclient reload"))
|
(xbindkey-function `(,modkey r) (cmd "herbstclient reload"))
|
||||||
|
@ -133,14 +158,10 @@
|
||||||
(xbindkey-function '(shift f) (cmd "herbstclient fullscreen toggle"))
|
(xbindkey-function '(shift f) (cmd "herbstclient fullscreen toggle"))
|
||||||
(xbindkey-function '(p) (cmd "herbstclient pseudotile toggle"))
|
(xbindkey-function '(p) (cmd "herbstclient pseudotile toggle"))
|
||||||
(xbindkey-function '(r) resize-map)
|
(xbindkey-function '(r) resize-map)
|
||||||
(xbindkey-function '(m) move-to-tag)
|
(xbindkey-function '(m) move-to-tag))
|
||||||
(xbindkey-function `(,modkey g) reset-main-binding)
|
|
||||||
(grab-all-keys))
|
|
||||||
|
|
||||||
(define (W-functions)
|
(create-map W-function-map
|
||||||
(gui-print "S-w")
|
(gui-print "S-w")
|
||||||
(ungrab-all-keys)
|
|
||||||
(remove-all-keys)
|
|
||||||
(xbindkey-function '(k) (cmd "herbstclient close"))
|
(xbindkey-function '(k) (cmd "herbstclient close"))
|
||||||
(xbindkey-function '(w) (cmd "herbstclient cycle"))
|
(xbindkey-function '(w) (cmd "herbstclient cycle"))
|
||||||
(xbindkey-function '(o) (cmd "herbstclient cycle_all +1"))
|
(xbindkey-function '(o) (cmd "herbstclient cycle_all +1"))
|
||||||
|
@ -151,35 +172,19 @@
|
||||||
(xbindkey-function '(shift b) (cmd "herbstclient shift left"))
|
(xbindkey-function '(shift b) (cmd "herbstclient shift left"))
|
||||||
(xbindkey-function '(shift n) (cmd "herbstclient shift down"))
|
(xbindkey-function '(shift n) (cmd "herbstclient shift down"))
|
||||||
(xbindkey-function '(shift p) (cmd "herbstclient shift up"))
|
(xbindkey-function '(shift p) (cmd "herbstclient shift up"))
|
||||||
(xbindkey-function '(shift f) (cmd "herbstclient shift right"))
|
(xbindkey-function '(shift f) (cmd "herbstclient shift right")))
|
||||||
(xbindkey-function `(,modkey g) reset-main-binding)
|
|
||||||
(grab-all-keys))
|
|
||||||
|
|
||||||
(define (S-functions)
|
(create-map S-function-map
|
||||||
(gui-print "S-s")
|
(gui-print "S-s")
|
||||||
(ungrab-all-keys)
|
(xbindkey-function '(o) (cmd "herbstclient cycle_monitor")))
|
||||||
(remove-all-keys)
|
|
||||||
(xbindkey-function '(o) (cmd "herbstclient cycle_monitor"))
|
|
||||||
(xbindkey-function `(,modkey g) reset-main-binding)
|
|
||||||
(grab-all-keys))
|
|
||||||
|
|
||||||
(define (P-functions)
|
(create-map resize-map
|
||||||
(ungrab-all-keys)
|
|
||||||
(remove-all-keys)
|
|
||||||
|
|
||||||
(grab-all-keys))
|
|
||||||
|
|
||||||
(define (resize-map)
|
|
||||||
(gui-print "Resizing")
|
(gui-print "Resizing")
|
||||||
(ungrab-all-keys)
|
|
||||||
(remove-all-keys)
|
|
||||||
(xbindkey `(,modkey b) "herbstclient resize left +0.05")
|
(xbindkey `(,modkey b) "herbstclient resize left +0.05")
|
||||||
(xbindkey `(,modkey n) "herbstclient rezise down +0.05")
|
(xbindkey `(,modkey n) "herbstclient resize down +0.05")
|
||||||
(xbindkey `(,modkey p) "herbstclient resize up +0.05")
|
(xbindkey `(,modkey p) "herbstclient resize up +0.05")
|
||||||
(xbindkey `(,modkey f) "herbstclient resize right +0.05")
|
(xbindkey `(,modkey f) "herbstclient resize right +0.05")
|
||||||
(xbindkey-function '(Return) reset-main-binding)
|
(xbindkey-function '(Return) reset-main-binding))
|
||||||
(xbindkey-function `(,modkey g) reset-main-binding)
|
|
||||||
(grab-all-keys))
|
|
||||||
|
|
||||||
;;; Main
|
;;; Main
|
||||||
(main-binding)
|
(main-binding)
|
||||||
|
|
|
@ -4,17 +4,12 @@ local pac_cnt=$(get_cnt updates)
|
||||||
local aur_cnt=$(get_cnt aur)
|
local aur_cnt=$(get_cnt aur)
|
||||||
local hostname=$(hostname | cut -d . -f 1)
|
local hostname=$(hostname | cut -d . -f 1)
|
||||||
|
|
||||||
printf "%s " \
|
|
||||||
"%B%(?.%{${fg[green]}%}^_^.%{${fg[red]}%}T_T)%b%{${fg[default]}%}"
|
|
||||||
line 4 15
|
|
||||||
printf " %s " "$(date +%Y%m%d%H.%M)"
|
|
||||||
|
|
||||||
if [ $pac_cnt -gt 0 -o $aur_cnt -gt 0 ]; then
|
if [ $pac_cnt -gt 0 -o $aur_cnt -gt 0 ]; then
|
||||||
printf "%s%d%s/%s%d%s:" \
|
printf "%s%d%s/%s%d%s:" \
|
||||||
"%{${fg[cyan]}%}" $pac_cnt "%{${fg[default]}%}" \
|
"%{${fg[cyan]}%}" $pac_cnt "%{${fg[default]}%}" \
|
||||||
"%{${fg[cyan]}%}" $aur_cnt "%{${fg[default]}%}"
|
"%{${fg[cyan]}%}" $aur_cnt "%{${fg[default]}%}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
printf '%s %s%s%s:%s%s%s ' \
|
printf '%s%s%s:%s%s%s%s ' \
|
||||||
"%{${fg[magenta]}%}" $hostname "%{${fg[default]}%}" \
|
"%{${fg[magenta]}%}" $hostname "%{${fg[default]}%}" \
|
||||||
"%{${fg[green]}%}" "%~" "%{${fg[default]}%}"
|
"%(?.%{${fg[green]}%}.%{${fg[red]}%})" "%~" "%{${fg[default]}%}"
|
||||||
|
|
1
.zshenv
1
.zshenv
|
@ -9,7 +9,6 @@ export LESS_TERMCAP_so=$'\e[1;47;30m'
|
||||||
export LESS_TERMCAP_ue=$'\e[0m'
|
export LESS_TERMCAP_ue=$'\e[0m'
|
||||||
export LESS_TERMCAP_us=$'\e[0;36m'
|
export LESS_TERMCAP_us=$'\e[0;36m'
|
||||||
|
|
||||||
export BROWSER=firefox
|
|
||||||
export PAGER=$LESSCMD
|
export PAGER=$LESSCMD
|
||||||
export EDITOR="emacsclient -c"
|
export EDITOR="emacsclient -c"
|
||||||
|
|
||||||
|
|
5
.zshrc
5
.zshrc
|
@ -4,6 +4,7 @@ PATH="${HOME}/bin:${PATH}:/usr/local/bin"
|
||||||
INFOPATH="${HOME}/documents/info:${INFOPATH}"
|
INFOPATH="${HOME}/documents/info:${INFOPATH}"
|
||||||
|
|
||||||
export INFOPATH
|
export INFOPATH
|
||||||
|
export BROWSER=conkeror
|
||||||
|
|
||||||
HISTFILE=~/.zsh/histfile
|
HISTFILE=~/.zsh/histfile
|
||||||
HISTSIZE=1000
|
HISTSIZE=1000
|
||||||
|
@ -91,6 +92,8 @@ bindkey "\e0F" end-of-line
|
||||||
bindkey "\e[H" beginning-of-line
|
bindkey "\e[H" beginning-of-line
|
||||||
bindkey "\e[F" end-of-line
|
bindkey "\e[F" end-of-line
|
||||||
|
|
||||||
|
bindkey "^W" backward-delete-char
|
||||||
|
|
||||||
# Show syntax highlighting when we're not running in emacs
|
# Show syntax highlighting when we're not running in emacs
|
||||||
if [ -z $EMACS ]; then
|
if [ -z $EMACS ]; then
|
||||||
source ~/.zsh/syntax-highlighting/zsh-syntax-highlighting.zsh
|
source ~/.zsh/syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||||
|
@ -98,5 +101,3 @@ if [ -z $EMACS ]; then
|
||||||
ZSH_HIGHLIGHT_STYLES[double-hyphen-option]='fg=blue'
|
ZSH_HIGHLIGHT_STYLES[double-hyphen-option]='fg=blue'
|
||||||
ZSH_HIGHLIGHT_STYLES[single-hyphen-option]='fg=blue'
|
ZSH_HIGHLIGHT_STYLES[single-hyphen-option]='fg=blue'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
welcome
|
|
||||||
|
|
Loading…
Reference in a new issue