]> ruderich.org/simon Gitweb - config/dotfiles.git/blob - xinitrc
5c4c007cc49698b3fb00669ff4ad3e151f307f0c
[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     # -s to force bourne shell output. This file is a bourne shell script even
10     # if the environment might suggest otherwise.
11     eval `/usr/bin/ssh-agent -s`
12 fi
13
14 # Use a black background for the root window.
15 xsetroot -solid black
16
17 # Force English keyboard layout.
18 if [ -x /usr/bin/setxkbmap ]; then
19     setxkbmap us
20 fi
21
22 # Use my X11 key bindings.
23 xmodmap ~/.xmodmaprc
24
25 # Change the background if available.
26 if [ -f ~/.background ]; then
27     # But not on slow machines in the university.
28     HOSTNAME=`hostname`
29     if [ "x`echo $HOSTNAME | grep faui0sr`" = x ]; then
30         if [ -x /usr/bin/hsetroot ]; then
31             hsetroot -full ~/.background
32         elif [ -x /usr/bin/feh ]; then
33             feh --bg-scale ~/.background
34         fi
35     fi
36 fi
37
38 # Display reminders.
39 if [ -x /usr/bin/remind -a -f ~/.reminders ]; then
40     remind -z1 -k'.shell/bin/notify.py %s &' ~/.reminders &
41 fi
42
43 # Start XMonad.
44 xmonad
45
46 # vim: ft=sh