Magellan Linux

Diff of /alx-src/branches/alxconf-060/functions/config_sessions.sh

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

alx-src/branches/alxconf_20060908/alxconfig-ng/functions/config_sessions.sh revision 543 by niro, Wed Feb 4 19:51:39 2009 UTC alx-src/branches/alxconf_20060908/functions/config_sessions.sh revision 1642 by niro, Tue Dec 28 12:46:26 2010 UTC
# Line 237  generate_icon() Line 237  generate_icon()
237   [ -z "${command}" ] && return 1   [ -z "${command}" ] && return 1
238    
239   # use some defaults for icon, dest, {x,y}res   # use some defaults for icon, dest, {x,y}res
240   [ -z "${xres}" ] && xres=20   [ -z "${xres}" ] && xres=30
241   [ -z "${yres}" ] && xres=20   [ -z "${yres}" ] && xres=30
242   [ -z "${dest}" ] && dest="${ALX_UNPRIV_HOME}/.xtdesktop/${name}.lnk"   [ -z "${dest}" ] && dest="${ALX_UNPRIV_HOME}/.xtdesktop/${name}.lnk"
243   if [ -z "${icon}" ] || [ ! -f "${icon}" ]   if [ -z "${icon}" ] || [ ! -f "${icon}" ]
244   then   then
# Line 298  generate_all_desktop_icons() Line 298  generate_all_desktop_icons()
298    
299    
300   # default settings   # default settings
301   declare -i x=20   declare -i x=30
302   declare -i y=20   declare -i y=30
303    
304   # first all ica sessions   # first all ica sessions
305   local count=${#ALX_SESSIONS[*]}   local count=${#ALX_SESSIONS[*]}
# Line 316  generate_all_desktop_icons() Line 316  generate_all_desktop_icons()
316    
317   # new line if x > xres   # new line if x > xres
318   if [ ${x} -ge ${xres} ];then   if [ ${x} -ge ${xres} ];then
319   x=20   x=30
320   y=$((${y} + 80))   y=$((${y} + 80))
321   fi   fi
322    
323   # new row if y > yres   # new row if y > yres
324   if [ ${y} -ge ${yres} ];then   if [ ${y} -ge ${yres} ];then
325   x=$((${x} + 120))   x=$((${x} + 120))
326   y=20   y=30
327    
328   # re-check x   # re-check x
329   [ ${x} -ge ${xres} ] && x=20   [ ${x} -ge ${xres} ] && x=30
330   fi   fi
331    
332   # ica icons   # ica icons
# Line 334  generate_all_desktop_icons() Line 334  generate_all_desktop_icons()
334   basename_item="$(basename ${item} .ica)"   basename_item="$(basename ${item} .ica)"
335   generate_icon \   generate_icon \
336   --name "${basename_item}" \   --name "${basename_item}" \
337   --command "nice -n 19 wfica ${ALX_ICA_SESSIONS}/${item}" \   --command "numlockx on && nice -n 19 wfica ${ALX_ICA_SESSIONS}/${item}" \
338   --icon "${ALX_SESSIONS_ICONS}/${basename_item}.png" \   --icon "${ALX_SESSIONS_ICONS}/${basename_item}.png" \
339   --dest "${ALX_UNPRIV_HOME}/.xtdesktop/${basename_item}.lnk" \   --dest "${ALX_UNPRIV_HOME}/.xtdesktop/${basename_item}.lnk" \
340   --xres "${x}" \   --xres "${x}" \
# Line 356  generate_all_desktop_icons() Line 356  generate_all_desktop_icons()
356    
357   # new line if x > xres   # new line if x > xres
358   if [ ${x} -ge ${xres} ];then   if [ ${x} -ge ${xres} ];then
359   x=20   x=30
360   y=$((${y} + 80))   y=$((${y} + 80))
361   fi   fi
362    
363   # new row if y > yres   # new row if y > yres
364   if [ ${y} -ge ${yres} ];then   if [ ${y} -ge ${yres} ];then
365   x=$((${x} + 120))   x=$((${x} + 120))
366   y=20   y=30
367    
368   # re-check x   # re-check x
369   [ ${x} -ge ${xres} ] && x=20   [ ${x} -ge ${xres} ] && x=30
370   fi   fi
371    
372   generate_icon \   generate_icon \
# Line 485  config_sessions() Line 485  config_sessions()
485   for (( i=0; i < count; i++ ))   for (( i=0; i < count; i++ ))
486   do   do
487   [ -n "${ALX_SESSIONS[${i}]}" ] && \   [ -n "${ALX_SESSIONS[${i}]}" ] && \
488   echo "[exec] ($(basename ${ALX_SESSIONS[${i}]} .ica)) {nice -n 19 wfica ${ALX_ICA_SESSIONS}/${ALX_SESSIONS[${i}]}}" \   echo "[exec] ($(basename ${ALX_SESSIONS[${i}]} .ica)) {numlockx on && nice -n 19 wfica ${ALX_ICA_SESSIONS}/${ALX_SESSIONS[${i}]}}" \
489   >> ${ALX_UNPRIV_HOME}/.fluxbox/menu   >> ${ALX_UNPRIV_HOME}/.fluxbox/menu
490   done   done
491    

Legend:
Removed from v.543  
changed lines
  Added in v.1642