3 alias nls='gettext -d cursorconfig'
4 themes="core `ls -d /usr/share/icons/*/cursors | sed -e 's,/usr/share/icons/,,;s,/cursors,,'`"
5 default=`grep -s Inherits ~/.icons/default/index.theme | cut -f2 -d=`
6 [ -z $default ] || default="($default)"
8 theme=`dialog --title 'Cursorconfig' \
9 --backtitle "$(nls 'PLD Linux X Cursor Configuration Utility')" \
11 --menu "$(nls 'Available themes:') $default" $(($(echo $themes | wc -w)+7)) 60 0 \
13 [ -z $theme ] && exit 0
15 mkdir -p ~/.icons/default || exit 1
16 echo "[Icon Theme]" > ~/.icons/default/index.theme
17 echo "Inherits=$theme" >> ~/.icons/default/index.theme