]> ruderich.org/simon Gitweb - config/dotfiles.git/blob - xinitrc
xinitrc: Start ssh-agent if a private SSH key is available.
[config/dotfiles.git] / xinitrc
1 #!/bin/sh
2
3 # startx configuration file.
4
5
6 # Start ssh-agent if we have private keys, thanks to
7 # http://code.haskell.org/XMonadContrib/scripts/xinitrc (read on 2011-06-19).
8 if [ -x /usr/bin/ssh-agent -a -f "$HOME/.ssh/id_rsa" ]; then
9     eval `ssh-agent`
10 fi
11
12 # Use a black background for the root window.
13 xsetroot -solid black
14
15 # Force English keyboard layout.
16 if [ -x /usr/bin/setxkbmap ]; then
17     setxkbmap us
18 fi
19
20 # Use my X11 key bindings.
21 xmodmap ~/.xmodmaprc
22
23 # Change the background if available.
24 if [ -f ~/.background ]; then
25     # But not on slow machines in the university.
26     HOSTNAME=`hostname`
27     if [ "x`echo $HOSTNAME | grep faui0sr`" = x ]; then
28         if [ -x /usr/bin/hsetroot ]; then
29             hsetroot -full ~/.background
30         elif [ -x /usr/bin/feh ]; then
31             feh --bg-scale ~/.background
32         fi
33     fi
34 fi
35
36 # Display reminders.
37 if [ -x /usr/bin/remind -a -f ~/.reminders ]; then
38     remind -z1 -k'.shell/bin/notify.py %s &' ~/.reminders &
39 fi
40
41 # Start XMonad.
42 xmonad
43
44 # vim: ft=sh