dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit e1b62bdb4b2bdc1fccb88a72ad658b8756421f3c
parent b77cd5aec3540f4bfc14d9654c79bf6542885323
Author: Anders Damsgaard <anders.damsgaard@geo.au.dk>
Date:   Sun, 26 Oct 2014 19:18:12 +0100

Merge branch 'master' of https://github.com/anders-dc/dotfiles

Diffstat:
M.bashrc | 1+
A.ctags | 4++++
M.emacs.d/init.el | 1+
M.tmuxinator/article2.yml | 2+-
M.vimrc | 37+++++++++++++++++++++++++++++--------
M.xinitrc | 10++++++----
M.zshrc | 14++++++++++++--
Mbin/tor-browser-update.sh | 17++++++++++-------
Mcreate_symlinks.sh | 2+-
9 files changed, 65 insertions(+), 23 deletions(-)

diff --git a/.bashrc b/.bashrc @@ -53,6 +53,7 @@ unset color_prompt force_color_prompt alias ll='ls -alF' alias la='ls -A' alias l='ls -CF' +alias vi='vim -u NONE' #alias ls='ls $LS_OPTIONS -hF' alias play='mpg123 --title -C' # Set bash title for certain terminals diff --git a/.ctags b/.ctags @@ -0,0 +1,4 @@ +--python-kinds=-i +--exclude=build +--exclude=dist +--exclude=output diff --git a/.emacs.d/init.el b/.emacs.d/init.el @@ -98,6 +98,7 @@ (require 'evil) (evil-mode 1) (global-evil-leader-mode) ;; enable evil-leader in every evil buffer +(evil-leader/set-leader "<SPC>") (evil-leader/set-key "e" 'find-file "b" 'switch-to-buffer diff --git a/.tmuxinator/article2.yml b/.tmuxinator/article2.yml @@ -19,4 +19,4 @@ root: ~/articles/own/2-org # tmux_command: byobu windows: - - editor: emacs article2.org & && zathura article2.pdf + - editor: zathura article2.pdf & ; emacs article2.org & diff --git a/.vimrc b/.vimrc @@ -79,7 +79,7 @@ NeoBundle 'tpope/vim-speeddating' " support for Julia NeoBundle 'JuliaLang/julia-vim' -" SnipMate +" SnipMate for boilerplate code NeoBundle 'msanders/snipmate.vim' " vim motion on speed @@ -142,6 +142,7 @@ set shiftwidth=4 " width for autoindents "set showcmd set smartcase " case-sensitive search if any caps set softtabstop=4 " makes the tab key indent by four spaces +set splitright " new vertical splits on the right side set tabstop=4 " a tab is 4 characters wide set wildmenu " show a navigable menu for tab completion set wildmode=longest,list,full @@ -231,12 +232,23 @@ nmap ZX :w<CR> " use , instead of \ as leader let mapleader="," +" use space instead of \ as leader +let mapleader="\<Space>" " Shortcut to reload .vimrc nmap <leader>r :source $MYVIMRC<CR> " Shortcut to switch background color -nmap <leader>w :ToggleBG<CR> +"nmap <leader>w :ToggleBG<CR> + +" Save file +nmap <Leader>w :w<CR> + +" Quit +nmap <Leader>q :q<CR> + +" Save and quit +nmap <Leader>x :x<CR> " Explore buffers nmap <leader>b :BufExplorer<CR> @@ -261,11 +273,17 @@ nmap <leader>e :VimProcBang nmap <leader>E :VimProcRead nmap <leader>c :VimProcBang make -k -" Resize with <C-h>, <C-j>, <C-k> and <C-l> -map <C-h> <C-w>h -map <C-j> <C-w>j -map <C-k> <C-w>k -map <C-l> <C-w>l +" Switch split focus with leader+hjkl +nmap <leader>h <C-w>h +nmap <leader>j <C-w>j +nmap <leader>k <C-w>k +nmap <leader>l <C-w>l + +" Switch split focus with <C-h>, <C-j>, <C-k> and <C-l> +"map <C-h> <C-w>h +"map <C-j> <C-w>j +"map <C-k> <C-w>k +"map <C-l> <C-w>l " Use home row keys as Esc inoremap jk <Esc> @@ -280,8 +298,11 @@ imap <Right> <Nop> imap <Up> <Nop> imap <Down> <Nop> +" check current folder and all parent folders for tags files +set tags=tags;/ + " Update ctags -nmap <leader>t :!ctags -R --verbose --langmap=c++:.cu,c++:.cuh .<CR> +nmap <leader>t :!ctags -R --python-kinds=-i --langmap=c++:.cu,c++:.cuh .<CR> " useful tags commands: " :tag or :ta <function> Go to definition of the function " :ts or :tselect Show the list of tags diff --git a/.xinitrc b/.xinitrc @@ -14,7 +14,8 @@ xsetroot -cursor_name left_ptr & #hsetroot -tile ~/wallpapers/solarized-pattern.png if [ "$HOSTNAME" = "iddqd" ] then - hsetroot -fill ~/wallpapers/octahedron-bg-gimp-double.png + #hsetroot -fill ~/wallpapers/octahedron-bg-gimp-double.png # dual screen + hsetroot -fill ~/wallpapers/octahedron-bg-gimp.png # single screen else hsetroot -cover ~/wallpapers/octahedron-bg-gimp.png fi @@ -92,9 +93,7 @@ setxkbmap -option ctrl:nocaps xbindkeys # cloud clients -if [ "$HOSTNAME" = "iddqd" ]; then - owncloud & -fi +owncloud & #seafile-applet & # Setup two monitors at iddqd @@ -119,6 +118,9 @@ xset dpms 300 600 900 # Automatic display configuration script nohup bash ~/code/dotfiles/bin/xrandr-auto.sh & +if [ "$HOSTNAME" == "flaptop" ]; then + xrandr --dpi 135 +fi exec i3 #exec herbstluftwm --locked diff --git a/.zshrc b/.zshrc @@ -37,6 +37,7 @@ if [[ "$ARCH" != 'Darwin' ]]; then function open() { xdg-open $1 &> /dev/null &disown; } fi function lt() { ls -ltrsa "$@" | tail; } +function lT() { ls -ltrsa "$@" | head; } function psgrep() { ps axuf | grep -v grep | grep "$@" -i --color=auto; } function fname() { find . -iname "*$@*"; } function say() { echo "$@" | festival --tts; } @@ -48,6 +49,7 @@ function sayfile() { festival --tts $@; } alias svim='sudoedit' alias e='emacs -nw' alias v='vim' +alias vi='vim -u NONE' alias gs='git status' alias gl='git log --oneline' alias ga='git add' @@ -58,6 +60,7 @@ alias gpu='git pull' alias gcgp='git commit && git push' alias gcagp='git commit -a && git push' alias clear='clear && tmux clear-history' +alias ct='ctags -R .' alias zshreload="source ~/.zshrc" @@ -82,6 +85,9 @@ alias ll='ls -alFh' alias la='ls -A' alias lla='ls -lA' alias l='ls -CF' +alias ipython-prof='ipython -m cProfile -s time' +alias python-prof='python -m cProfile -s time' +alias pipupgrade='pip freeze --local | grep -v '^\-e' | cut -d = -f 1 | xargs pip install -U' # enable color support of ls and also add handy aliases if [[ "$ARCH" != 'Darwin' ]]; then @@ -129,7 +135,7 @@ if [[ "$HOSTNAME" == "iddqd" ]]; then export FOAM_INST_DIR=$HOME/OpenFOAM #foamDotFile=$FOAM_INST_DIR/OpenFOAM-2.1.x/etc/bashrc foamDotFile=$FOAM_INST_DIR/OpenFOAM-2.2.x/etc/bashrc - [ -f $foamDotFile ] && . $foamDotFile + #[ -f $foamDotFile ] && . $foamDotFile # CFDEM vars export CFDEM_VERSION=PUBLIC @@ -146,10 +152,14 @@ if [[ "$HOSTNAME" == "iddqd" ]]; then export CFDEM_LPP_DIR=$HOME/LIGGGHTS/mylpp/src #export CFDEM_PIZZA_DIR=$HOME/LIGGGHTS/PIZZA/gran_pizza_17Aug10/src export CFDEM_PIZZA_DIR=$CFDEM_LPP_DIR - . $CFDEM_bashrc + #. $CFDEM_bashrc alias lpp="python $CFDEM_LPP_DIR/lpp.py" alias pizza="python $CFDEM_LPP_DIR/pizza.py" + + # PETSc + + fi [ -f $HOME/code/julia/julia ] && export PATH=$HOME/code/julia:$PATH diff --git a/bin/tor-browser-update.sh b/bin/tor-browser-update.sh @@ -1,6 +1,9 @@ #!/bin/bash -# Gets latest Tor Browser Bundle (TBB) development version for Linux x86_64, +# stop on error +set -e + +# Gets latest Tor Browser Bundle (TBB) stable version for Linux x86_64, # downloads it, verifies it, and extracts it. # The scripts downloads the files using "torify", if available. @@ -16,7 +19,7 @@ TORFOLDER=~/tor # Remote folder containing the TBB archives UNAMESTR=`uname` if [[ "$UNAMESTR" == 'Linux' ]]; then - DIR="https://www.torproject.org/dist/torbrowser/3.5/" + DIR="https://www.torproject.org/dist/torbrowser/4.0/" elif [[ "$UNAMESTR" == 'Darwin' ]]; then DIR="https://www.torproject.org/dist/torbrowser/osx/" else @@ -34,15 +37,15 @@ else fi # Find latest TBB version -echo "Determining latest Tor Browser Bundle development version" +echo "Determining latest Tor Browser Bundle stable version" TMPFILENAME=/tmp/tordownloadpage.html $DOWNLOADCMD https://www.torproject.org/projects/torbrowser.html.en#downloads -O $TMPFILENAME && \ -LATESTTBB=`grep '_en-US.tar.xz">64-bit' $TMPFILENAME | sed 's/.*tor-browser/tor-browser/' | sed 's/tar.xz.*/tar.xz/'` && \ -echo "Latest Tor Browser Bundle dev. version is $LATESTTBB" -rm $TMPFILENAME +LATESTTBB=`grep '_en-US.tar.xz">64-bit' $TMPFILENAME | head -n 1 | sed 's/.*tor-browser/tor-browser/' | sed 's/tar.xz.*/tar.xz/'` && \ +echo "Latest Tor Browser Bundle stable version is $LATESTTBB" +#rm $TMPFILENAME # Check if the TBB version is already downloaded -if [ -e $TORFOLDER/$LATESTTBB ]; then +if [ -e "$TORFOLDER/$LATESTTBB" ]; then echo "The installed TBB version is up to date." exit fi diff --git a/create_symlinks.sh b/create_symlinks.sh @@ -1,7 +1,7 @@ #!/bin/bash # Home folder dotfiles -for F in .bashrc .vimrc .inputrc .tmux.conf .xpdfrc .signature .Xresources .Xmodmap .xinitrc .xprofile .zshrc .conkyrc .xbindkeysrc .gitconfig .vimperatorrc .vimpcrc .compton.conf .locale; do +for F in .bashrc .vimrc .inputrc .tmux.conf .xpdfrc .signature .Xresources .Xmodmap .xinitrc .xprofile .zshrc .conkyrc .xbindkeysrc .gitconfig .vimperatorrc .vimpcrc .compton.conf .locale .ctags; do SOURCE=$PWD/$F TARGET=~/$F