11 |
ICON_INFO_SUFFIX="@@ICON_INFO_SUFFIX@@" |
ICON_INFO_SUFFIX="@@ICON_INFO_SUFFIX@@" |
12 |
ICON_SUFFIX="@@ICON_SUFFIX@@" |
ICON_SUFFIX="@@ICON_SUFFIX@@" |
13 |
|
|
14 |
|
die() { echo "ERROR: $@"; exit 1; } |
15 |
|
|
16 |
dest="${MCORE_UNPRIV_HOME}/.idesktop" |
dest="${MCORE_UNPRIV_HOME}/.idesktop" |
17 |
rc="${MCORE_UNPRIV_HOME}/.ideskrc" |
rc="${MCORE_UNPRIV_HOME}/.ideskrc" |
18 |
|
|
34 |
[ -f ${rc} ] && rm -f ${rc} |
[ -f ${rc} ] && rm -f ${rc} |
35 |
install -d ${dest} |
install -d ${dest} |
36 |
|
|
37 |
|
# clean default reboot,shutdown icon info |
38 |
|
for i in shutdown reboot |
39 |
|
do |
40 |
|
if [ -f ${MROOT}/${MCORE_CONFIG_PATH}/icons/info/${i}.${ICON_INFO_SUFFIX} ] |
41 |
|
then |
42 |
|
rm ${MROOT}/${MCORE_CONFIG_PATH}/icons/info/${i}.${ICON_INFO_SUFFIX} |
43 |
|
fi |
44 |
|
done |
45 |
|
|
46 |
# default settings |
# default settings |
47 |
declare -i x=50 |
declare -i x=50 |
48 |
declare -i y=50 |
declare -i y=50 |
50 |
for icon_resource in $(find ${MROOT}/${MCORE_CONFIG_PATH}/icons/info -type f) |
for icon_resource in $(find ${MROOT}/${MCORE_CONFIG_PATH}/icons/info -type f) |
51 |
do |
do |
52 |
# abort if empty |
# abort if empty |
53 |
[[ -z ${i} ]] && continue |
[[ -z ${icon_resource} ]] && continue |
54 |
|
|
55 |
# new line if x > xres |
# new line if x > xres |
56 |
if [ ${x} -ge ${xres} ] |
if [ ${x} -ge ${xres} ] |
111 |
|
|
112 |
y=$((${y} + 80)) |
y=$((${y} + 80)) |
113 |
done |
done |
114 |
|
|
115 |
|
# restart idesk |
116 |
|
killall idesk; x11runas "nohup idesk > /dev/null &" |