diff --git a/commonsh/10_alias b/commonsh/10_alias index d4011d5..3035b4e 100755 --- a/commonsh/10_alias +++ b/commonsh/10_alias @@ -28,6 +28,10 @@ case `uname -s` in alias grep='grep -d skip --color=auto' ;; FreeBSD|Darwin|DragonFly) + if ( command -v top >/dev/null 2>&1 ) ; then + alias top="top -o cpu" + fi + if ( command -v gls >/dev/null 2>&1 ) ; then alias ls="gls -h --color=auto" elif ( ls --version 2>/dev/null | grep GNU >/dev/null 2>&1 ) ; then diff --git a/vimrc b/vimrc index 7033707..c83c625 100644 --- a/vimrc +++ b/vimrc @@ -245,7 +245,6 @@ map Y y$ vmap K k " :W and :Q are annoying -command! -nargs=0 -bang X x command! -nargs=0 -bang Q q command! -nargs=0 -bang W w command! -nargs=0 -bang WQ wq diff --git a/xmonad.hs b/xmonad.hs index 797eef5..26e849a 100644 --- a/xmonad.hs +++ b/xmonad.hs @@ -11,6 +11,7 @@ import XMonad.Util.EZConfig(additionalKeysP) import XMonad.Prompt import XMonad.Prompt.Shell(shellPrompt) +import XMonad.Prompt.Window import System.IO(hPutStrLn) @@ -41,6 +42,8 @@ main = do } `additionalKeysP` [ ("M-p", shellPrompt defaultXPConfig { position = Top }) + , ("M-S-a", windowPromptGoto defaultXPConfig { position = Top }) + , ("M-a", windowPromptBring defaultXPConfig { position = Top }) , ("M-b", sendMessage ToggleStruts) , ("M-S-l", spawn "~/bin/lock") ] diff --git a/zsh/prompt b/zsh/prompt index ffd604b..ede4224 100755 --- a/zsh/prompt +++ b/zsh/prompt @@ -1,9 +1,7 @@ # prompt if [ -z "${SSH_TTY}" ] ; then PROMPT=$'%{\e[00;00m%}%{\e[01;32m%}%n@%m %{\e[01;34m%}%~ %(?..%{\e[01;31m%})%(!.#.$) %{\e[00;00m%}' - RPROMPT=$'%{\e[00;00m%}%1(j.%{\e[00;36m%}[%j].)%{\e[01;33m%}[%t]%{\e[00;00m%}' else - PROMPT=$'%{\e[00;00m%}%{\e[01;36m%}%n %(?..%{\e[01;31m%})%(!.#.$) %{\e[00;00m%}' - RPROMPT=$'%{\e[00;00m%}%{\e[01;33m%}%m %{\e[01;32m%}%~%{\e[00;00m%}' + PROMPT=$'%{\e[00;00m%}%{\e[01;36m%}%n@%m %{\e[01;34m%}%~ %(?..%{\e[01;31m%})%(!.#.$) %{\e[00;00m%}' fi - +RPROMPT=$'%{\e[00;00m%}%{\e[00;00m%}%1(j.%{\e[00;36m%}[%j].)%(?..%{\e[00;31m%}[%?])%{\e[01;33m%}%{\e[01;33m%}[%t]%{\e[00;00m%}' diff --git a/zsh/title b/zsh/title index 9f2e9d2..33093e1 100755 --- a/zsh/title +++ b/zsh/title @@ -3,7 +3,7 @@ precmd() { local termtitle - termtitle=`print -P "%n@%m"` + termtitle=`print -P "%n@%m[%l]"` title zsh "$termtitle" } @@ -15,7 +15,7 @@ preexec() local termtitle # Prepend this string to the title. - termtitle=`print -P "%n@%m:"` + termtitle=`print -P "%n@%m[%l]:"` case $cmd[1] in fg)