3 # Setup script for X11 configuration files.
5 # Copyright (C) 2011-2014 Simon Ruderich
7 # This program is free software: you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation, either version 3 of the License, or
10 # (at your option) any later version.
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
26 if installed stumpwm; then
27 link stumpwmrc ~/.stumpwmrc
29 if installed xmonad; then
32 if installed herbstluftwm; then
33 link herbstluftwm ~/.config/herbstluftwm
37 # Prevent code duplication. Term* rules are for all terminals; XTerm rules
38 # are for XTerm and UXTerm. At the moment XTerm, UXTerm and Rxvt are
40 generate Xresources .in perl -ne \
53 # Xresources uses ! as comment instead of #.
54 sed_i 's/^#/!/' Xresources
55 # Use urxvt's pseudo-transparency if neither compton nor xcompmgr are
56 # available. Better than nothing.
57 if ! installed compton && ! installed xcompmgr; then
58 echo 'Xresources: no compton found, enabling pseudo-transparency'
59 sed_i 's/^Rxvt\*background: \[/!&/' Xresources
60 sed_i 's/^!NO_COMPTON //' Xresources
63 if test ! "x`os`" = xdarwin; then
64 link xinitrc ~/.xinitrc
65 # Most display managers use ~/.xsession instead of ~/.xinitrc (which
66 # is used by e.g. startx). Provide both links.
67 link xinitrc ~/.xsession
69 if test -f xinitrc.local; then
70 link xinitrc.local ~/.xinitrc.local
72 link xmodmaprc ~/.xmodmaprc
73 link Xresources ~/.Xresources
74 link XCompose ~/.XCompose
77 if installed xscreensaver; then
78 link xscreensaver ~/.xscreensaver
81 if installed xpdf; then
84 if installed zathura; then
85 mkdir -p ~/.config/zathura
86 link zathurarc ~/.config/zathura/zathurarc
89 if installed feh; then
91 link feh ~/.config/feh
92 # Older feh versions only support theme options and configure them through
94 link feh/themes ~/.fehrc