Magellan Linux

Diff of /mcore-src/trunk/mcore-tools/src/modules/idesk/idesk-generate-all-desktop-icons.in

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2397 by niro, Fri Aug 28 09:12:06 2015 UTC revision 2411 by niro, Mon Aug 31 09:35:35 2015 UTC
# Line 24  eval $(x11runas xinfo) Line 24  eval $(x11runas xinfo)
24  xres="${xorg_width}"  xres="${xorg_width}"
25  yres="${xorg_height}"  yres="${xorg_height}"
26    
27  # fallback to 800x600  # fallback to 1024x768
28  [[ -z ${xres} ]] && xres="800"  [[ -z ${xres} ]] && xres="1024"
29  [[ -z ${yres} ]] && xres="600"  [[ -z ${yres} ]] && xres="768"
30    
31  # top left edge of the icon is given in config file  # top left edge of the icon is given in config file
32  # remove a little bit to simulate the bottom-right edge  # remove a little bit to simulate the bottom-right edge
# Line 37  yres="$(( ${yres} - 80 ))" Line 37  yres="$(( ${yres} - 80 ))"
37  [ -d ${dest} ] && rm -rf ${dest}  [ -d ${dest} ] && rm -rf ${dest}
38  [ -f ${rc} ] && rm -f ${rc}  [ -f ${rc} ] && rm -f ${rc}
39  install -d ${dest}  install -d ${dest}
40    chown "${MCORE_UNPRIV_USER}":"${MCORE_UNPRIV_GROUP}" ${dest}
41    
42  # clean default reboot,shutdown icon info  # clean default reboot,shutdown icon info
43  for i in shutdown reboot  for i in shutdown reboot
# Line 73  do Line 74  do
74   [ ${x} -ge ${xres} ] && x=50   [ ${x} -ge ${xres} ] && x=50
75   fi   fi
76    
77   ${MCORE_LIBDIR}/idesk-generate-icon --add --resource "${icon_resource}" --xres "${x}" --yres "${y}"   ${MCORE_LIBDIR}/idesk-generate-icon --add --resource "${icon_resource}" --xpos "${x}" --ypos "${y}"
78    
79   y=$((${y} + 80))   y=$((${y} + 80))
80  done  done
# Line 109  do Line 110  do
110   --command "sudo /usr/sbin/${cmd}" \   --command "sudo /usr/sbin/${cmd}" \
111   --icon "${i}.png" \   --icon "${i}.png" \
112   --filename "${i}" \   --filename "${i}" \
113   --xres "${x}" \   --xpos "${x}" \
114   --yres "${y}" \   --ypos "${y}" \
115   --icon-width "40" \   --icon-width "40" \
116   --icon-height "40"   --icon-height "40"
117    
118   y=$((${y} + 80))   y=$((${y} + 80))
119  done  done
120    
121    # generate sysinfo
122    ${MCORE_LIBDIR}/idesk-sysinfo
123    ${MCORE_LIBDIR}/idesk-generate-icon --add \
124     --resource "${MROOT}/${MCORE_CONFIG_PATH}/icons/info/sysinfo.${ICON_INFO_SUFFIX}"
125    
126  # restart idesk  # restart idesk
127  killall idesk; x11runas "nohup idesk > /dev/null &"  if [[ -n $(pidof idesk) ]]
128    then
129     killall idesk; x11runas "nohup idesk > /dev/null &"
130    fi

Legend:
Removed from v.2397  
changed lines
  Added in v.2411