23 |
--command|-c) shift; argv_command="$1" ;; |
--command|-c) shift; argv_command="$1" ;; |
24 |
--icon|-i) shift; argv_icon="$1" ;; |
--icon|-i) shift; argv_icon="$1" ;; |
25 |
--filename|-f) shift; argv_filename="$1" ;; |
--filename|-f) shift; argv_filename="$1" ;; |
26 |
--xres|-x) shift; argv_xres="$1" ;; |
--xpos|-x) shift; argv_xpos="$1" ;; |
27 |
--yres|-y) shift; argv_yres="$1" ;; |
--ypos|-y) shift; argv_ypos="$1" ;; |
28 |
--icon-width|-w) shift; argv_iwidth="$1" ;; |
--icon-width|-w) shift; argv_iwidth="$1" ;; |
29 |
--icon-height|-h) shift; argv_iheight="$1" ;; |
--icon-height|-h) shift; argv_iheight="$1" ;; |
30 |
--default-icon) shift; argv_deficon="$1" ;; |
--default-icon) shift; argv_deficon="$1" ;; |
44 |
name="${argv_name}" |
name="${argv_name}" |
45 |
command="${argv_command}" |
command="${argv_command}" |
46 |
filename="${argv_filename}" |
filename="${argv_filename}" |
47 |
xres="${argv_xres}" |
xpos="${argv_xpos}" |
48 |
yres="${argv_yres}" |
ypos="${argv_ypos}" |
49 |
icon="${argv_icon}" |
icon="${argv_icon}" |
50 |
deficon="${argv_deficon}" |
deficon="${argv_deficon}" |
51 |
iwidth="${argv_iwidth}" |
iwidth="${argv_iwidth}" |
57 |
|
|
58 |
[[ -z ${filename} ]] && filename="${name}" |
[[ -z ${filename} ]] && filename="${name}" |
59 |
|
|
60 |
# use some defaults for icon, dest, {x,y}res |
# use some defaults for icon, dest, {x,y}pos |
61 |
[[ -z ${xres} ]] && xres=50 |
[[ -z ${xpos} ]] && xpos=50 |
62 |
[[ -z ${yres} ]] && yres=50 |
[[ -z ${ypos} ]] && ypos=50 |
63 |
if [[ -z ${icon} ]] |
if [[ -z ${icon} ]] |
64 |
then |
then |
65 |
# if no default icon is given use default.png |
# if no default icon is given use default.png |
73 |
--command "${command}" \ |
--command "${command}" \ |
74 |
--icon "${icon}" \ |
--icon "${icon}" \ |
75 |
--filename "${filename}" \ |
--filename "${filename}" \ |
76 |
--xres "${xres}" \ |
--xpos "${xpos}" \ |
77 |
--yres "${yres}" \ |
--ypos "${ypos}" \ |
78 |
--icon-width "${iwidth}" \ |
--icon-width "${iwidth}" \ |
79 |
--icon-height "${iheight}" \ |
--icon-height "${iheight}" \ |
80 |
--default-icon "${deficon}" \ |
--default-icon "${deficon}" \ |
89 |
[[ -n ${argv_name} ]] && name="${argv_name}" |
[[ -n ${argv_name} ]] && name="${argv_name}" |
90 |
[[ -n ${argv_command} ]] && command="${argv_command}" |
[[ -n ${argv_command} ]] && command="${argv_command}" |
91 |
[[ -n ${argv_filename} ]] && filename="${argv_filename}" |
[[ -n ${argv_filename} ]] && filename="${argv_filename}" |
92 |
[[ -n ${argv_xres} ]] && xres="${argv_xres}" |
[[ -n ${argv_xpos} ]] && xpos="${argv_xpos}" |
93 |
[[ -n ${argv_yres} ]] && yres="${argv_yres}" |
[[ -n ${argv_ypos} ]] && ypos="${argv_ypos}" |
94 |
[[ -n ${argv_icon} ]] && icon="${argv_icon}" |
[[ -n ${argv_icon} ]] && icon="${argv_icon}" |
95 |
[[ -n ${argv_deficon} ]] && deficon="${argv_deficon}" |
[[ -n ${argv_deficon} ]] && deficon="${argv_deficon}" |
96 |
[[ -n ${argv_iwidth} ]] && iwidth="${argv_iwidth}" |
[[ -n ${argv_iwidth} ]] && iwidth="${argv_iwidth}" |
117 |
addconfig " Caption: ${name}" |
addconfig " Caption: ${name}" |
118 |
addconfig " Command: ${command}" |
addconfig " Command: ${command}" |
119 |
addconfig " Icon: ${icon_path}/${icon}" |
addconfig " Icon: ${icon_path}/${icon}" |
120 |
addconfig " X: ${xres}" |
addconfig " X: ${xpos}" |
121 |
addconfig " Y: ${yres}" |
addconfig " Y: ${ypos}" |
122 |
|
|
123 |
# add these only if not zero |
# add these only if not zero |
124 |
if [[ ! -z ${iwidth} ]] && [[ ! -z ${iheight} ]] |
if [[ ! -z ${iwidth} ]] && [[ ! -z ${iheight} ]] |
141 |
[[ -n ${argv_name} ]] && name="${argv_name}" |
[[ -n ${argv_name} ]] && name="${argv_name}" |
142 |
[[ -n ${argv_command} ]] && command="${argv_command}" |
[[ -n ${argv_command} ]] && command="${argv_command}" |
143 |
[[ -n ${argv_filename} ]] && filename="${argv_filename}" |
[[ -n ${argv_filename} ]] && filename="${argv_filename}" |
144 |
[[ -n ${argv_xres} ]] && xres="${argv_xres}" |
[[ -n ${argv_xpos} ]] && xpos="${argv_xpos}" |
145 |
[[ -n ${argv_yres} ]] && yres="${argv_yres}" |
[[ -n ${argv_ypos} ]] && ypos="${argv_ypos}" |
146 |
[[ -n ${argv_icon} ]] && icon="${argv_icon}" |
[[ -n ${argv_icon} ]] && icon="${argv_icon}" |
147 |
[[ -n ${argv_deficon} ]] && deficon="${argv_deficon}" |
[[ -n ${argv_deficon} ]] && deficon="${argv_deficon}" |
148 |
[[ -n ${argv_iwidth} ]] && iwidth="${argv_iwidth}" |
[[ -n ${argv_iwidth} ]] && iwidth="${argv_iwidth}" |