]> git.pld-linux.org Git - packages/XcursorTheme.git/blame - XcursorTheme-cursorconfig
- translated cursorconfig to sh, simplified, added NLS (with pl locale)
[packages/XcursorTheme.git] / XcursorTheme-cursorconfig
CommitLineData
a066aa1d
JB
1#!/bin/sh
2
3alias nls='gettext -d cursorconfig'
4
5themes=`ls -d /usr/share/icons/*/cursors | sed -e 's,/usr/share/icons/,,;s,/cursors,,'`
6
7if [ -z "$1" ]; then
8 echo "$(nls 'Welcome to the Xcursor theme configurator.')"
9 echo
10 echo "$(nls 'Available themes are:')"
11 echo ${themes}
12 echo
13 if [ -r ~/.Xresources ]; then
14
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"`
17 fi
18
19
20 elif [ -r ~/.Xdefaults ]; then
21
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"`
24 fi
25 fi
26
27 echo "$(nls 'Currently active:') $default"
28
29else
30
31 if [ -r ~/.Xresources ]; then
32
33 grep -v Xcursor.theme ~/.Xresources >> ~/.Xresources.tmp1
34 echo "Xcursor.theme: $1" >> ~/.Xresources.tmp1
35 mv -f ~/.Xresources.tmp1 ~/.Xresources
36
37 elif [ -r ~/.Xdefaults ]; then
38
39 grep -v Xcursor.theme ~/.Xdefaults >> ~/.Xdefaults.tmp1
40 echo "Xcursor.theme: $1" >> ~/.Xdefaults.tmp1
41 mv -f ~/.Xdefaults.tmp1 ~/.Xdefaults
42
43 fi
44
45 echo "$(nls 'Switched to theme:') $1."
46fi
This page took 0.050802 seconds and 4 git commands to generate.