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 b77cd5aec3540f4bfc14d9654c79bf6542885323
parent 6ae1b44346246fd1d2e9a5b534c60f978cdefa75
Author: Anders Damsgaard <anders.damsgaard@geo.au.dk>
Date:   Mon,  6 Oct 2014 12:35:35 +0200

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

Diffstat:
M.Xresources | 29+++++++++++++++--------------
M.i3/config | 10+++++++---
M.mutt/colors | 4+++-
M.vimrc | 8++++++--
M.xinitrc | 5++++-
Mbin/keyboard-layout-switch.sh | 3+++
Abin/xrandr-auto.sh | 46++++++++++++++++++++++++++++++++++++++++++++++
7 files changed, 84 insertions(+), 21 deletions(-)

diff --git a/.Xresources b/.Xresources @@ -10,7 +10,9 @@ Xcursor.size: 22 ! fonts ---------------------------------------------------------------------- Xft*dpi: 96 Xft*antialias: true -Xft*hinting: full +Xft*rgba: rgb +Xft*hinting: true +Xft*hintstyle: hintslight ! urxvt ---------------------------------------------------------------------- urxvt*perl-lib: /usr/lib/urxvt/perl @@ -23,7 +25,6 @@ urxvt*urlLauncher: /usr/bin/firefox !urxvt*cursorUnderline: 1 urxvt*cursorUnderline: 0 urxvt*cursorColor: #FF00FF -urxvt*letterspace: -5 urxvt*fading: 0 !urxvt*fadeColor: #000000 urxvt*cursorBlink: true @@ -46,21 +47,21 @@ URxvt.iso14755_52: false !URxvt.keysym.C-8: command:\033]710;xft:DejaVu Sans Mono for Powerline:size=16\007\033]711;xft:DejaVu Sans Mono Bold for Powerline:size=16\007 !URxvt.keysym.C-9: command:\033]710;xft:DejaVu Sans Mono for Powerline:size=18\007\033]711;xft:DejaVu Sans Mono Bold for Powerline:size=18\007 !URxvt.keysym.C-0: command:\033]710;xft:DejaVu Sans Mono for Powerline:size=20\007\033]711;xft:DejaVu Sans Mono Bold for Powerline:size=20\007 -URxvt.keysym.C-1: command:\033]710;xft:PragmataPro:size=7\007\033]711;xft:PragmataPro:size=7\007 -URxvt.keysym.C-2: command:\033]710;xft:PragmataPro:size=7.5\007\033]711;xft:PragmataPro:size=7.5\007 -URxvt.keysym.C-3: command:\033]710;xft:PragmataPro:size=8\007\033]711;xft:PragmataPro:size=8\007 -URxvt.keysym.C-4: command:\033]710;xft:PragmataPro:size=9\007\033]711;xft:PragmataPro:size=9\007 -URxvt.keysym.C-5: command:\033]710;xft:PragmataPro:size=10\007\033]711;xft:PragmataPro:size=10\007 -URxvt.keysym.C-6: command:\033]710;xft:PragmataPro:size=12\007\033]711;xft:PragmataPro:size=12\007 -URxvt.keysym.C-7: command:\033]710;xft:PragmataPro:size=14\007\033]711;xft:PragmataPro:size=14\007 -URxvt.keysym.C-8: command:\033]710;xft:PragmataPro:size=16\007\033]711;xft:PragmataPro:size=16\007 -URxvt.keysym.C-9: command:\033]710;xft:PragmataPro:size=18\007\033]711;xft:PragmataPro:size=18\007 -URxvt.keysym.C-0: command:\033]710;xft:PragmataPro:size=20\007\033]711;xft:PragmataPro:size=20\007 +URxvt.keysym.C-1: command:\033]710;xft:PragmataPro:size=7\007\033]711;xft:PragmataPro:size=7:style=Bold\007 +URxvt.keysym.C-2: command:\033]710;xft:PragmataPro:size=7.5\007\033]711;xft:PragmataPro:size=7.5:style=Bold\007 +URxvt.keysym.C-3: command:\033]710;xft:PragmataPro:size=8\007\033]711;xft:PragmataPro:size=8:style=Bold\007 +URxvt.keysym.C-4: command:\033]710;xft:PragmataPro:size=9\007\033]711;xft:PragmataPro:size=9:style=Bold\007 +URxvt.keysym.C-5: command:\033]710;xft:PragmataPro:size=10\007\033]711;xft:PragmataPro:size=10:style=Bold\007 +URxvt.keysym.C-6: command:\033]710;xft:PragmataPro:size=12\007\033]711;xft:PragmataPro:size=12:style=Bold\007 +URxvt.keysym.C-7: command:\033]710;xft:PragmataPro:size=14\007\033]711;xft:PragmataPro:size=14:style=Bold\007 +URxvt.keysym.C-8: command:\033]710;xft:PragmataPro:size=16\007\033]711;xft:PragmataPro:size=16:style=Bold\007 +URxvt.keysym.C-9: command:\033]710;xft:PragmataPro:size=18\007\033]711;xft:PragmataPro:size=18:style=Bold\007 +URxvt.keysym.C-0: command:\033]710;xft:PragmataPro:size=20\007\033]711;xft:PragmataPro:size=20:style=Bold\007 !URxvt.keysym.C-9: command:\033]710;-*-termsynu-medium-r-*-*-13-*-*-*-*-*-*-*\007\033]711;-*-termsynu-medium-r-*-*-13-*-*-*-*-*-*-*\007 !URxvt.keysym.C-0: command:\033]710;-*-termsynu-medium-r-*-*-14-*-*-*-*-*-*-*\007\033]711;-*-termsynu-medium-r-*-*-14-*-*-*-*-*-*-*\007 ! looks good with DejaVi Sans Mono: -!URxvt.letterSpace: -1 +URxvt.letterSpace: -1 !urxvt*font: -*-lemon-*-*-*-*-*-*-*-*-*-*-*-* !urxvt*boldFont: -*-lemon-*-*-*-*-*-*-*-*-*-*-*-* @@ -77,7 +78,7 @@ URxvt.keysym.C-0: command:\033]710;xft:PragmataPro:size=20\007\033]711;xft:Pragm !urxvt*font: xft:DejaVu Sans Mono for Powerline:size=8 !urxvt*boldfont: xft:DejaVu Sans Mono for Powerline:size=8 urxvt*font: xft:PragmataPro:size=8 -urxvt*boldfont: xft:PragmataPro:size=8 +urxvt*boldfont: xft:PragmataPro:size=8:style=Bold !urxvt*boldfont: xft:DejaVu Sans Mono Bold for Powerline:size=8 ! shading: 0-99 darkens, 101-200 lightens diff --git a/.i3/config b/.i3/config @@ -94,8 +94,11 @@ bindsym $mod+Shift+b exec mpc prev bindsym $mod+Shift+s exec mpc stop # Light X colors -bindsym $mod+Shift+w exec --no-startup-id /home/adc/bin/solarized-light.sh -bindsym $mod+Shift+d exec --no-startup-id /home/adc/bin/solarized-dark.sh +#bindsym $mod+Shift+w exec --no-startup-id /home/adc/bin/solarized-light.sh +#bindsym $mod+Shift+d exec --no-startup-id /home/adc/bin/solarized-dark.sh + +# configura displays +bindsym $mod+Shift+d exec --no-startup-id bash /home/adc/code/dotfiles/bin/xrandr-auto.sh # screen lock bindsym $mod+z exec /home/adc/bin/zzz @@ -269,4 +272,5 @@ bar { #exec --no-startup-id wicd-client --tray exec --no-startup-id nm-applet #exec --no-startup-id i3-msg 'workspace 2; exec emacs; workspace 3; exec firefox; workspace 1; exec urxvt -e tmux-utility.sh' -exec --no-startup-id i3-msg 'workspace 2; exec firefox; workspace 1; exec urxvt -e tmuxinator utility' +#exec --no-startup-id i3-msg 'workspace 2; exec firefox; workspace 1; exec urxvt -e tmuxinator utility' +exec --no-startup-id i3-msg 'workspace 1; exec urxvt -e tmuxinator utility' diff --git a/.mutt/colors b/.mutt/colors @@ -14,7 +14,9 @@ color quoted4 green default color quoted5 default default #color indicator white default -color indicator blue default +#color indicator blue default +#color indicator black gray +color indicator white black #color message yellow black color message yellow default #color status white black diff --git a/.vimrc b/.vimrc @@ -49,7 +49,8 @@ NeoBundle 'tpope/vim-dispatch' NeoBundle 'bufexplorer.zip' " Vim-LaTeX suite -NeoBundle 'git://git.code.sf.net/p/vim-latex/vim-latex' +"NeoBundle 'git://git.code.sf.net/p/vim-latex/vim-latex' +NeoBundle 'LaTeX-Box-Team/LaTeX-Box' " Use <Tab> to autocomplete in insert mode NeoBundle 'ervandew/supertab' @@ -110,7 +111,7 @@ set background=dark " adjust colors for better contrast "colorscheme desert colorscheme solarized "colorscheme Tomorrow-Night-Eighties -"call togglebg#map("<F3>") +call togglebg#map("<F3>") "let g:airline_theme = 'ubaryd' let g:airline_theme = 'solarized' "let g:airline_theme = 'tomorrow' @@ -228,6 +229,9 @@ highlight SpecialKey ctermfg=10 guifg=DarkGray " Save with ZX nmap ZX :w<CR> +" use , instead of \ as leader +let mapleader="," + " Shortcut to reload .vimrc nmap <leader>r :source $MYVIMRC<CR> diff --git a/.xinitrc b/.xinitrc @@ -95,7 +95,7 @@ xbindkeys if [ "$HOSTNAME" = "iddqd" ]; then owncloud & fi -seafile-applet & +#seafile-applet & # Setup two monitors at iddqd if [ "$HOSTNAME" = "iddqd" ]; then @@ -116,6 +116,9 @@ fi #xwrits breaktime=5:00 typetime=55:00 +clock +breakclock +mouse & xset dpms 300 600 900 +# Automatic display configuration script +nohup bash ~/code/dotfiles/bin/xrandr-auto.sh & + exec i3 #exec herbstluftwm --locked diff --git a/bin/keyboard-layout-switch.sh b/bin/keyboard-layout-switch.sh @@ -17,6 +17,7 @@ if [ ! -f $LAYOUTFILE ]; then echo "us" > $LAYOUTFILE setxkbmap $LANG1 $OPTS xmodmap ~/.Xmodmap + notify-send $LANG1 exit fi @@ -26,9 +27,11 @@ CURRLANG="`cat $LAYOUTFILE`" if [ "$CURRLANG" == "$LANG1" ]; then echo $LANG2 > $LAYOUTFILE setxkbmap $LANG2 $OPTS + notify-send $LANG2 xmodmap ~/.Xmodmap else echo $LANG1 > $LAYOUTFILE setxkbmap $LANG1 $OPTS + notify-send $LANG1 xmodmap ~/.Xmodmap fi diff --git a/bin/xrandr-auto.sh b/bin/xrandr-auto.sh @@ -0,0 +1,46 @@ +#!/bin/bash + +LAPTOPSCR=eDP1 +EXTSCR=DP1 +#PROJECTOR= + +# default monitor is LVDS1 +MONITOR=$LAPTOPSCR + +# functions to switch from LVDS1 to VGA and vice versa +function ActivateEXT { + #echo "Switching to EXTSCR" + xrandr --output $EXTSCR --auto --output $LAPTOPSCR --off + MONITOR=$EXTSCR + #notify-send "Activating $EXTSCR" +} +function DeactivateEXT { + #echo "Switching to $LAPTOPSCR" + #xrandr --output $EXTSCR --off --output $LAPTOPSCR --auto + xrandr --auto + MONITOR=$LAPTOPSCR + #notify-send "Activating $LAPTOPSCR" +} + +# functions to check if EXT is connected and in use +function EXTActive { + [ $MONITOR = "$EXTSCR" ] +} +function EXTConnected { + ! xrandr | grep "^$EXTSCR" | grep disconnected +} + +#while true +#do +if ! EXTActive && EXTConnected +then + ActivateEXT +fi + +if EXTActive && ! EXTConnected +then + DeactivateEXT +fi + +#sleep 5s +#done