3 # Setup script for shell configuration files.
10 # Generate ~/.less with lesskey.
14 # As screen-256color is not widely supported use it only on machines known to
16 generate cat screenrc .in
17 if [ $hostname != asp -a $hostname != systemofadown ]; then
18 sed 's/Enable 256 color/Disable 256 color/;
19 s/screen-256color/screen/' screenrc > screenrc.tmp
20 mv screenrc.tmp screenrc
22 # I use some features of screen which are only in Git. Drop them on machines
23 # which have older versions. They are marked as "(GIT)".
24 if [ $hostname != asp ]; then
25 echo screenrc: removing Git features
26 grep -v '(GIT)' screenrc > screenrc.tmp
27 mv screenrc.tmp screenrc
29 # Rxvt doesn't need the attrcolor "fix". As I prefer rxvt assume I use it when
31 if installed rxvt; then
32 echo screenrc: removing attrcolor \"fix\"
33 sed 's/attrcolor b ".I"/#attrcolor b ".I"/' screenrc > screenrc.tmp
34 mv screenrc.tmp screenrc
36 # Display current battery charge on computers with a battery. Necessary lines
37 # are marked as "(BATTERY)".
38 if [ ! -d /sys/class/power_supply/BAT0 ]; then
39 echo screenrc: removing battery display
40 grep -v '(BATTERY)' screenrc > screenrc.tmp
41 mv screenrc.tmp screenrc
44 # Link setup for shells.
47 link bash/rc ~/.bashrc
48 link bash/profile ~/.bash_profile
49 link bash/logout ~/.bash_logout
50 if installed csh; then
54 link zsh/env ~/.zshenv
56 link zsh/logout ~/.zlogout
58 # Link setup for additional files.
59 link lessfilter ~/.lessfilter
60 if installed colordiff; then
61 link colordiffrc ~/.colordiffrc
63 link inputrc ~/.inputrc
64 link screenrc ~/.screenrc
66 # Create rlwrap history directory.