Permalink
Browse files

Random changes, plus a new prompt.

  • Loading branch information...
1 parent f9979a3 commit 975bb70729b9f08b215f069eadba2d64be216b71 @raposalorx committed Jan 24, 2012
Showing with 119 additions and 16 deletions.
  1. +1 −1 .conky/hdd
  2. +0 −7 .irssi/config
  3. +1 −1 .muttrc
  4. +2 −1 .vim/.netrwhist
  5. +5 −1 .vimrc
  6. +1 −1 .xmonad/xmonad.hs
  7. +109 −4 .zshrc
View
@@ -3,4 +3,4 @@ update_interval 1.0
out_to_x no
f_empty ${rss http://www.reddit.com/message/inbox/.rss?feed=a5a65e59272ca39572830431dafc13601b61373f&user=lorxraposa 1 item_titles 1}}
TEXT
-^fg(\#00aaff)${execi 60 cat .mail/todo | formail -s grep -c To:\ Do | wc -l} ^fg(\#444444)I ^fg(\#00aaff)${execi 60 cat .mail/inbox | formail -s grep -c Status:\ RO | grep -o 0 | wc -l} ^fg(\#444444)C ^fg(\#00aaff)${execi 60 cat .mail/ckule | formail -s grep -c Status:\ RO | grep -o 0 | wc -l} ^fg()| ^fg(\#444444)/ ^fg(\#00aaff)${fs_used_perc}% ^fg(\#444444)SWAP ^fg(\#00aaff)${swapperc}%
+^fg(\#00aaff)${execi 60 cat .mail/todo | formail -s grep -c To:\ Do | wc -l} ^fg(\#444)R^fg(\#00aaff)${execi 60 cat .mail/rss | formail -s grep -c Status:\ RO | grep -o 0 | wc -l} ^fg(\#444444)I^fg(\#00aaff)${execi 60 cat .mail/inbox | formail -s grep -c Status:\ RO | grep -o 0 | wc -l} ^fg(\#444444)C^fg(\#00aaff)${execi 60 cat .mail/ckule | formail -s grep -c Status:\ RO | grep -o 0 | wc -l} ^fg()| ^fg(\#444444)/ ^fg(\#00aaff)${fs_used_perc}% ^fg(\#444444)SWAP ^fg(\#00aaff)${swapperc}%
View
@@ -371,13 +371,6 @@ statusbar = {
barend = { priority = "100"; alignment = "right"; };
};
};
- wl1 = {
- items = {
- barstar = { priority = "100"; };
- wlstat1 = { };
- barend = { priority = "100"; alignment = "right"; };
- };
- };
};
};
settings = {
View
@@ -37,7 +37,7 @@ set print_command="muttprint %s --printer TO_FILE:$HOME/Downloads/muttprint.eps
#======================================================#
# Watch these mailboxes for new mail, useful only if
# Procmail or Maildrop is used to sort mail.
-mailboxes ! +inbox +sent +todo +lojban +lojban-beginners +lojban-announce +xedbig +ckule +jbofanva
+mailboxes ! +inbox +sent +todo +rss +lojban +lojban-beginners +lojban-announce +xedbig +ckule +jbofanva
set sort_browser=reverse-size # Sort mailboxes by alpha(bet)
#======================================================#
View
@@ -1,3 +1,4 @@
let g:netrw_dirhistmax =10
-let g:netrw_dirhist_cnt =1
+let g:netrw_dirhist_cnt =2
let g:netrw_dirhist_1='/home/lorx/.irssi'
+let g:netrw_dirhist_2='/home/lorx/.rejoystickrc'
View
6 .vimrc
@@ -35,6 +35,8 @@ let mapleader = ","
" better search
nnoremap / /\v
vnoremap / /\v
+nnoremap ? ?\v
+vnoremap ? ?\v
set ignorecase
set smartcase
set gdefault
@@ -115,6 +117,9 @@ nnoremap <leader>sc :Scratch<CR>
nnoremap <leader>gu :GundoToggle<CR>
nnoremap <leader>yr :YRShow<CR>
nnoremap <leader>gv :Gitv<CR>
+nnoremap <leader>ch :changes<CR>
+nnoremap <leader>jm :jumps<CR>
+nnoremap <leader>mr :marks<CR>
map <F8> :setlocal spell spelllang=en_gb<CR>
@@ -126,4 +131,3 @@ set guioptions-=r
" never used record, it kept getting in the way
nnoremap q <Nop>
-
View
@@ -121,7 +121,7 @@ main = do
xmonad $ myUrgencyHook $ defaultConfig
{ manageHook = myManageHook
, layoutHook = avoidStruts $ myLayout
- , workspaces = ["term", "www", "media", "docs", "pics", "games", "art"] ++ (map show [8..10])
+ , workspaces = ["term", "www", "media", "docs", "pics"] ++ (map show [6..10])
, keys = newKeys
, logHook = dynamicLogWithPP $ myDzenPP dzen
, focusFollowsMouse = False
View
113 .zshrc
@@ -1,16 +1,121 @@
+fpath=( ~/.zsh_functions $fpath )
+[[ -d $HOME/.zsh_functions/VCS_Info ]] \
+ && fpath[1]=( ${fpath[1]} ~/.zsh_functions/**/*~*/(CVS)#(/) )
+
typeset -ga preexec_functions
typeset -ga precmd_functions
typeset -ga chpwd_functions
+autoload -U colors && colors
+autoload -U promptinit
+autoload -Uz vcs_info
+
setopt prompt_subst
-export PS1="$(print '%{\e[1;34m%}')$(git branch 2> /dev/null | grep '^*' | sed -e 's/^* \(.*\)/\1/')$(print '%{\e[0m%}%n%{\e[0;36m%}%~%{\e[0m%}%{\e[1;35m%}%?%{\e[0m%}> ')"
+local reset white gray green red yellow
+reset="%{${reset_color}%}"
+white="%{$fg[white]%}"
+gray="%{$fg_bold[black]%}"
+green="%{$fg_bold[green]%}"
+red="%{$fg[red]%}"
+yellow="%{$fg[yellow]%}"
+blue="%{$fg[blue]%}"
+bblue="%{$fg_bold[blue]%}"
+
+zstyle ':vcs_info:*' enable git
+zstyle ':vcs_info:git*:*' get-revision true
+zstyle ':vcs_info:git*:*' check-for-changes true
+
+# hash changes branch misc
+zstyle ':vcs_info:git*' formats "%u%c%b%m"
+zstyle ':vcs_info:git*' actionformats "(%s|%a) %12.12i %c%u %b%m"
+
+zstyle ':vcs_info:git*:*' stagedstr "${bblue}"
+zstyle ':vcs_info:git*:*' unstagedstr "${blue}"
+
+zstyle ':vcs_info:git*+set-message:*' hooks git-st git-stash
+
+# Show remote ref name and number of commits ahead-of or behind
+function +vi-git-st() {
+ local ahead behind remote
+ local -a gitstatus
-preexec_functions+='zsh_git_preexec_update_vars'
-zsh_git_preexec_update_vars() {
- export PS1="$(print '%{\e[1;34m%}')$(git branch 2> /dev/null | grep '^*' | sed -e 's/^* \(.*\)/\1/')$(print '%{\e[0m%}%n%{\e[0;36m%}%~%{\e[0m%}%{\e[1;35m%}%?%{\e[0m%}> ')"
+ # Are we on a remote-tracking branch?
+ remote=${$(git rev-parse --verify ${hook_com[branch]}@{upstream} \
+ --symbolic-full-name 2>/dev/null)/refs\/remotes\/}
+
+ if [[ -n ${remote} ]] ; then
+ # for git prior to 1.7
+ # ahead=$(git rev-list origin/${hook_com[branch]}..HEAD | wc -l)
+ ahead=$(git rev-list ${hook_com[branch]}@{upstream}..HEAD 2>/dev/null | wc -l)
+ (( $ahead )) && gitstatus+=( "${green}${c3}+${ahead}${c2}${reset}" )
+
+ # for git prior to 1.7
+ # behind=$(git rev-list HEAD..origin/${hook_com[branch]} | wc -l)
+ behind=$(git rev-list HEAD..${hook_com[branch]}@{upstream} 2>/dev/null | wc -l)
+ (( $behind )) && gitstatus+=( "${red}${c4}-${behind}${c2}${reset}" )
+
+ hook_com[branch]="${hook_com[branch]}[${remote}${(j:/:)gitstatus}]"
+ fi
}
+function +vi-git-stash() {
+ local -a stashes
+
+ if [[ -s ${hook_com[base]}/.git/refs/stash ]] ; then
+ stashes=$(git stash list 2>/dev/null | wc -l)
+ hook_com[misc]+="${yellow}${stashes}"
+ fi
+}
+
+function precmd {
+ vcs_info
+ setprompt
+ venv_rprompt
+}
+
+function preexec {
+ # if running gnu screen, set the window name to the last run command
+ # FIXME any way to make this not change certain window titles (by window
+ # number or if a title isn't already set?)
+# if [[ "$TERM" =~ "screen" ]]; then
+# local CMD=${1[(wr)^(*=*|ssh|sudo|-*)]}
+# echo -ne "\ek$CMD\e\\"
+# fi
+}
+
+function setprompt() {
+ local -a lines infoline
+
+ infoline+=( "%n" )
+ [[ -n $SSH_CLIENT ]] && infoline+=( "@%m" )
+
+ [[ -w $PWD ]] && infoline+=( ${bblue} ) || infoline+=( ${blue} )
+ infoline+=( "%~${reset}" )
+ infoline+=( "%(1j.${yellow}%j${reset}.)" )
+ infoline+=( "%(0?..${red}%?)${reset}" )
+
+ [[ -n ${vcs_info_msg_0_} ]] && lines+=( "${gray}${vcs_info_msg_0_}${reset}" )
+
+ lines+=( ${(j::)infoline} )
+ PROMPT="${lines}> "
+}
+
+venv_rprompt () {
+ if [[ -n $VIRTUAL_ENV ]]; then
+ RPROMPT="${white} venv:$(basename $VIRTUAL_ENV)${reset}"
+ else
+ RPROMPT=""
+ fi
+}
+
+#export PS1="$(print '%{\e[1;34m%}')$(git branch 2> /dev/null | grep '^*' | sed -e 's/^* \(.*\)/\1/')$(print '%{\e[0m%}%n%{\e[0;36m%}%~%{\e[0m%}%{\e[1;35m%}%?%{\e[0m%}> ')"
+
+#preexec_functions+='zsh_git_preexec_update_vars'
+#zsh_git_preexec_update_vars() {
+# export PS1="$(print '%{\e[1;34m%}')$(git branch 2> /dev/null | grep '^*' | sed -e 's/^* \(.*\)/\1/')$(print '%{\e[0m%}%n%{\e[0;36m%}%~%{\e[0m%}%{\e[1;35m%}%?%{\e[0m%}> ')"
+#}
+
# If I am using vi keys, I want to know what mode I'm currently using.
# # zle-keymap-select is executed every time KEYMAP changes.
# # From http://zshwiki.org/home/examples/zlewidgets

0 comments on commit 975bb70

Please sign in to comment.