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 aada6c0ef9a1b865e6bb1fd9f74b26e42d32c9a6
parent 4bd2cdb4f792a8d0933762e6974f39ff25687a04
Author: Anders Damsgaard <anders.damsgaard@geo.au.dk>
Date:   Sat, 26 Apr 2014 20:13:41 +0200

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

Diffstat:
M.bashrc | 38+++++++++++++++++++++++++++++++++-----
M.emacs.d/init.el | 17+++++++++++------
M.i3/config | 9+++++++++
M.xbindkeysrc | 31++++++++++++-------------------
M.xinitrc | 20++++++++++++--------
M.zshrc | 36+++++++++++++++++++++++++++++++++---
Abin/xlock | 5+++++
Mbin/zzz | 3++-
Mcreate_symlinks.sh | 2+-
9 files changed, 118 insertions(+), 43 deletions(-)

diff --git a/.bashrc b/.bashrc @@ -120,8 +120,6 @@ if [ `hostname` == "master" ] || export PYTHONPATH=/usr/local/lib/python2.7/dist-packages/:$PYTHONPATH fi -#source /home/adc/OpenFOAM/OpenFOAM-2.1.1/etc/bashrc - # LMGC90 if [ -z ${PYTHONPATH} ]; then export PYTHONPATH=/home/adc/code/lmgc90/LMGC90v2/builds/Lmgc90_v2 @@ -132,7 +130,37 @@ else fi export PATH=${PATH}:/home/adc/code/lmgc90/LMGC90v2/src/LMGC90v2_dev/addons -# OpenFOAM from unofficial Ubuntu repositories -if [ -f /opt/openfoam222/etc/bashrc ]; then - . /opt/openfoam222/etc/bashrc +HOSTNAME=$(hostname) +if [[ "$HOSTNAME" == "iddqd" ]]; then + + # OpenFOAM from unofficial Ubuntu repositories + #if [ -f /opt/openfoam222/etc/bashrc ]; then + # . /opt/openfoam222/etc/bashrc + #fi + + # Manual OpenFOAM installation + 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 + + # CFDEM vars + export CFDEM_VERSION=PUBLIC + export CFDEM_PROJECT_DIR=$HOME/CFDEM/CFDEMcoupling-$CFDEM_VERSION-$WM_PROJECT_VERSION + export CFDEM_SRC_DIR=$CFDEM_PROJECT_DIR/src + export CFDEM_SOLVER_DIR=$CFDEM_PROJECT_DIR/applications/solvers + export CFDEM_DOC_DIR=$CFDEM_PROJECT_DIR/doc + export CFDEM_UT_DIR=$CFDEM_PROJECT_DIR/applications/utilities + export CFDEM_TUT_DIR=$CFDEM_PROJECT_DIR/tutorials + export CFDEM_PROJECT_USER_DIR=$HOME/CFDEM/$LOGNAME-$CFDEM_VERSION-$WM_PROJECT_VERSION + export CFDEM_bashrc=$CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/bashrc + export CFDEM_LIGGGHTS_SRC_DIR=$HOME/LIGGGHTS/LIGGGHTS-PUBLIC/src + export CFDEM_LIGGGHTS_MAKEFILE_NAME=fedora_fpic + 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 + + alias lpp="python $CFDEM_LPP_DIR/lpp.py" + alias pizza="python $CFDEM_LPP_DIR/pizza.py" fi diff --git a/.emacs.d/init.el b/.emacs.d/init.el @@ -34,7 +34,7 @@ evil-surround ; like Tim Pope's surround plugin helm ; Emacs incremental and narrowing framework popup ; visual popup interface library - doxymacs ; doxygen integration + ;doxymacs ; doxygen integration powerline ; powerline for emacs rainbow-delimiters ; color nested parantheses magit ; emacs mode for git @@ -55,11 +55,11 @@ ;(when (el-get-executable-find "cvs") ;(add-to-list 'my:el-get-packages 'emacs-goodies-el)) ; the debian addons for emacs -(when (el-get-executable-find "svn") - (loop for p in '(psvn ; M-x svn-status - yasnippet ; powerful snippet mode - ) - do (add-to-list 'my:el-get-packages p))) +;(when (el-get-executable-find "svn") +; (loop for p in '(psvn ; M-x svn-status +; yasnippet ; powerful snippet mode +; ) +; do (add-to-list 'my:el-get-packages p))) (setq my:el-get-packages (append @@ -234,6 +234,11 @@ (when (fboundp 'imagemagick-register-types) (imagemagick-register-types)) +;; update interval +(setq + mu4e-get-mail-command "offlineimap" ;; or fetchmail, or ... + mu4e-update-interval 300) ;; update every 5 minutes + (custom-set-variables ;; custom-set-variables was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. diff --git a/.i3/config b/.i3/config @@ -70,6 +70,15 @@ bindsym $mod+b exec firefox bindsym $mod+c exec emacs bindsym $mod+t exec tor-browser.sh +# volume control with pulseaudio +#bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 -- +10% && killall -SIGUSR1 i3status +#bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -- -10% && killall -SIGUSR1 i3status + +# volume control with alsamixer +bindsym XF86AudioRaiseVolume exec --no-startup-id amixer set Master 5%+ unmute && killall -SIGUSR1 i3status +bindsym XF86AudioLowerVolume exec --no-startup-id amixer set Master 5%- unmute && killall -SIGUSR1 i3status +bindsym XF86AudioMute exec --no-startup-id amixer set Master toggle && killall -SIGUSR1 i3status + # mpd control bindsym $mod+Shift+p exec mpc toggle bindsym $mod+Shift+n exec mpc next diff --git a/.xbindkeysrc b/.xbindkeysrc @@ -1,8 +1,6 @@ -#"xbacklight -dec 5" "xbacklight -dec 10" XF86MonBrightnessDown -#"xbacklight -inc 5" "xbacklight -inc 10" XF86MonBrightnessUp @@ -18,31 +16,26 @@ "/home/adc/bin/kbd_backlight.sh up" XF86KbdBrightnessUp -"mpc prev" - XF86AudioPrev +#"mpc prev" +# XF86AudioPrev -"mpc toggle" - XF86AudioPlay +#"mpc toggle" +# XF86AudioPlay -"mpc next" - XF86AudioNext +#"mpc next" +# XF86AudioNext #"keyboard-layout-switch.sh" # Mod1+Mod4 + l -"amixer set Master toggle" - XF86AudioMute +#"amixer set Master toggle" +# XF86AudioMute -#"pactl set-sink-volume 0 -- -5%" -#"amixer set Master playback 2-" -"amixer set Master 5%-" - XF86AudioLowerVolume +#"amixer set Master 5%-" +# XF86AudioLowerVolume -#"pactl set-sink-volume 0 -- +5%" -#"amixer set Master playback 2+" -"amixer set Master 5%+" - XF86AudioRaiseVolume - #m:0x0 + c:123 +#"amixer set Master 5%+" +# XF86AudioRaiseVolume ## Mouse Buttons #"xvkbd -xsendevent -text "\[XF86Back]"" diff --git a/.xinitrc b/.xinitrc @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh HOSTNAME=`hostname` @@ -12,14 +12,15 @@ xsetroot -cursor_name left_ptr & #xsetroot -solid '#222222' & #hsetroot -cover ~/wallpapers/blue-gradient.jpg #hsetroot -tile ~/wallpapers/solarized-pattern.png -if [[ "$HOSTNAME" == 'iddqd' ]]; then +if [ "$HOSTNAME" = "iddqd" ] +then hsetroot -fill ~/wallpapers/octahedron-bg-gimp-double.png else hsetroot -cover ~/wallpapers/octahedron-bg-gimp.png fi -# Hide mouse on inactivity -unclutter -grab -noevents -root & +# Hide mouse on inactivity. unclutter messes up i3lock +#unclutter -grab -noevents -root & # Add shadows #compton & @@ -68,7 +69,7 @@ dunst & #pidgin & # if you're using pidgin. You can really put any programs here. #gnome-power-manager & # for laptops and stuff #gnome-volume-manager & # for mounting CDs, USB sticks, and such -eval `gnome-keyring-daemon` # SSH/GPG agent +#eval `gnome-keyring-daemon --start --components=secrets` # possible components: gpg,pkcs11,secrets,ssh # Enable tap-to-click on touchpad synclient TapButton1=1 TapButton2=2 TapButton3=3 @@ -76,7 +77,8 @@ synclient TapButton1=1 TapButton2=2 TapButton3=3 # Automatically suspend system after 20 mins of inactivity #xautolock -time 20 -locker "sudo pm-suspend" & # Automatically lock the screen after 10 mins of inactivity -xautolock -time 10 -locker "i3lock -c 1d1f21 && sleep 30; sudo pm-suspend" & +#xautolock -time 10 -locker "i3lock -c 1d1f21 && sleep 30; sudo pm-suspend" & +xautolock -time 10 -locker $HOME/bin/xlock & # Read .Xmodmap for modified keys setxkbmap -option ctrl:nocaps @@ -89,13 +91,15 @@ xbindkeys owncloud & # Setup two monitors at iddqd -if [[ "$HOSTNAME" == 'iddqd' ]]; then +if [ "$HOSTNAME" = "iddqd" ] +then xrandr --output DVI-D-0 --primary xrandr --output DP-1 --auto --left-of DVI-D-0 fi -if [[ "$HOSTNAME" != 'phony' ]]; then +if [ "$HOSTNAME" != "phony" ] +then redshift -l 56.09:10.12 & fi diff --git a/.zshrc b/.zshrc @@ -111,7 +111,37 @@ export XDG_CONFIG_HOME="/home/adc/.config" export PATH=/usr/local/bin:$PATH export PATH=$HOME/bin:$PATH -# OpenFOAM from unofficial Ubuntu repositories -if [ -f /opt/openfoam222/etc/bashrc ]; then - . /opt/openfoam222/etc/bashrc +HOSTNAME=$(hostname) +if [[ "$HOSTNAME" == "iddqd" ]]; then + + # OpenFOAM from unofficial Ubuntu repositories + #if [ -f /opt/openfoam222/etc/bashrc ]; then + # . /opt/openfoam222/etc/bashrc + #fi + + # Manual OpenFOAM installation + 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 + + # CFDEM vars + export CFDEM_VERSION=PUBLIC + export CFDEM_PROJECT_DIR=$HOME/CFDEM/CFDEMcoupling-$CFDEM_VERSION-$WM_PROJECT_VERSION + export CFDEM_SRC_DIR=$CFDEM_PROJECT_DIR/src + export CFDEM_SOLVER_DIR=$CFDEM_PROJECT_DIR/applications/solvers + export CFDEM_DOC_DIR=$CFDEM_PROJECT_DIR/doc + export CFDEM_UT_DIR=$CFDEM_PROJECT_DIR/applications/utilities + export CFDEM_TUT_DIR=$CFDEM_PROJECT_DIR/tutorials + export CFDEM_PROJECT_USER_DIR=$HOME/CFDEM/$LOGNAME-$CFDEM_VERSION-$WM_PROJECT_VERSION + export CFDEM_bashrc=$CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/bashrc + export CFDEM_LIGGGHTS_SRC_DIR=$HOME/LIGGGHTS/LIGGGHTS-PUBLIC/src + export CFDEM_LIGGGHTS_MAKEFILE_NAME=fedora_fpic + 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 + + alias lpp="python $CFDEM_LPP_DIR/lpp.py" + alias pizza="python $CFDEM_LPP_DIR/pizza.py" fi diff --git a/bin/xlock b/bin/xlock @@ -0,0 +1,5 @@ +#!/bin/bash +img=/tmp/screenshot.png +scrot $img +convert $img -blur 0x5 $img +i3lock -i $img diff --git a/bin/zzz b/bin/zzz @@ -10,7 +10,8 @@ if [[ "$HOSTNAME" == 'flaptop' ]]; then killall ssh fi mpc stop -xscreensaver-command --lock +#i3lock -c 1d1f21 +$HOME/bin/xlock if [[ "$HOSTNAME" == 'flaptop' ]]; then sudo pm-suspend-hybrid diff --git a/create_symlinks.sh b/create_symlinks.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/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; do