3 alias nls='gettext -d cursorconfig'
5 themes=`ls -d /usr/share/icons/*/cursors | sed -e 's,/usr/share/icons/,,;s,/cursors,,'`
8 echo "$(nls 'Welcome to the Xcursor theme configurator.')"
10 echo "$(nls 'Available themes are:')"
13 if [ -r ~/.Xresources ]; then
15 if [ -n `grep Xcursor.theme ~/.Xresources|sed -e "s/Xcursor\.theme:\ //g"` ]; then
16 default=`grep Xcursor.theme ~/.Xresources|sed -e "s/Xcursor\.theme:\ //g"`
20 elif [ -r ~/.Xdefaults ]; then
22 if [ -n `grep Xcursor.theme ~/.Xdefaults|sed -e "s/Xcursor\.theme:\ //g"` ]; then
23 default=`grep Xcursor.theme ~/.Xdefaults|sed -e "s/Xcursor\.theme:\ //g"`
27 echo "$(nls 'Currently active:') $default"
31 if [ -r ~/.Xresources ]; then
33 grep -v Xcursor.theme ~/.Xresources >> ~/.Xresources.tmp1
34 echo "Xcursor.theme: $1" >> ~/.Xresources.tmp1
35 mv -f ~/.Xresources.tmp1 ~/.Xresources
37 elif [ -r ~/.Xdefaults ]; then
39 grep -v Xcursor.theme ~/.Xdefaults >> ~/.Xdefaults.tmp1
40 echo "Xcursor.theme: $1" >> ~/.Xdefaults.tmp1
41 mv -f ~/.Xdefaults.tmp1 ~/.Xdefaults
45 echo "$(nls 'Switched to theme:') $1."