New menu with icons
This commit is contained in:
parent
af47303253
commit
bf1954f01a
|
@ -37,12 +37,10 @@ showMenu=0
|
||||||
rootMessage
|
rootMessage
|
||||||
while [ ${showMenu} -eq 0 ] ; do
|
while [ ${showMenu} -eq 0 ] ; do
|
||||||
clear
|
clear
|
||||||
opcion=$(zenity --width=280 --height=380 --list --title "zenidrv-g203-lightsync ${VERSION} ($M_DATE)" \
|
opcion=$(zenity --width=280 --height=415 --list --title "zenidrv-g203-lightsync ${VERSION} ($M_DATE)" \
|
||||||
--window-icon=${iconPath} --column "Select effect or option :" "Solid" "Cycle" "Breathe" "Wave" "Blend" \
|
--window-icon=${iconPath} --imagelist --column "Icon" --column "Effect/Option" ${imagesPath}/solid.png "Solid" ${imagesPath}/cycle.png "Cycle" ${imagesPath}/breathe.png "Breathe" ${imagesPath}/wave.png "Wave" ${imagesPath}/blend.png "Blend" ${imagesPath}/intro-on.png "Intro (On)" ${imagesPath}/intro-off.png "Intro (Off)" ${imagesPath}/mouse-dpi.png "Set DPI" ${imagesPath}/light-off.png "Light off" ${imagesPath}/exit.png "Exit")
|
||||||
"Intro (On)" "Intro (Off)" "Set DPI" \
|
if [ "${opcion}" == "${imagesPath}/solid.png" ] ; then
|
||||||
"Light off" "Exit")
|
color_selected=$(zenity --list --width=260 --height=570 --title "zenidrv-g203-lightsync ${VERSION} ($M_DATE)" \
|
||||||
if [ "${opcion}" == "Solid" ] ; then
|
|
||||||
color_selected=$(zenity --list --width=260 --height=565 --title "zenidrv-g203-lightsync ${VERSION} ($M_DATE)" \
|
|
||||||
--window-icon=${iconPath} --imagelist --column "Color" --column "Name color" ${imagesPath}/black.png Black \
|
--window-icon=${iconPath} --imagelist --column "Color" --column "Name color" ${imagesPath}/black.png Black \
|
||||||
${imagesPath}/white.png White ${imagesPath}/red.png Red ${imagesPath}/lime.png Lime ${imagesPath}/blue.png Blue \
|
${imagesPath}/white.png White ${imagesPath}/red.png Red ${imagesPath}/lime.png Lime ${imagesPath}/blue.png Blue \
|
||||||
${imagesPath}/yellow.png Yellow ${imagesPath}/cyan.png Cyan ${imagesPath}/magenta.png Magenta \
|
${imagesPath}/yellow.png Yellow ${imagesPath}/cyan.png Cyan ${imagesPath}/magenta.png Magenta \
|
||||||
|
@ -98,7 +96,7 @@ while [ ${showMenu} -eq 0 ] ; do
|
||||||
else
|
else
|
||||||
color_apply="none"
|
color_apply="none"
|
||||||
fi
|
fi
|
||||||
elif [ "${opcion}" == "Cycle" ] ; then
|
elif [ "${opcion}" == "${imagesPath}/cycle.png" ] ; then
|
||||||
sleep 2 | zenity --progress --title "zenidrv-g203-lightsync ${VERSION} (${M_DATE})" --text "Applying Cycle effect" \
|
sleep 2 | zenity --progress --title "zenidrv-g203-lightsync ${VERSION} (${M_DATE})" --text "Applying Cycle effect" \
|
||||||
--window-icon=${iconPath} --pulsate --no-cancel --auto-close
|
--window-icon=${iconPath} --pulsate --no-cancel --auto-close
|
||||||
g203-led.py lightsync cycle
|
g203-led.py lightsync cycle
|
||||||
|
@ -109,7 +107,7 @@ while [ ${showMenu} -eq 0 ] ; do
|
||||||
zenity --title "zenidrv-g203-lightsync ${VERSION} ($M_DATE)" --error --window-icon=${iconPath} --width=280 \
|
zenity --title "zenidrv-g203-lightsync ${VERSION} ($M_DATE)" --error --window-icon=${iconPath} --width=280 \
|
||||||
--text "Device not found or connected"
|
--text "Device not found or connected"
|
||||||
fi
|
fi
|
||||||
elif [ "${opcion}" == "Breathe" ] ; then
|
elif [ "${opcion}" == "${imagesPath}/breathe.png" ] ; then
|
||||||
color_selected=$(zenity --list --width=260 --height=565 --title "zenidrv-g203-lightsync ${VERSION} ($M_DATE)" \
|
color_selected=$(zenity --list --width=260 --height=565 --title "zenidrv-g203-lightsync ${VERSION} ($M_DATE)" \
|
||||||
--window-icon=${iconPath} --imagelist --column "Color" --column "Name color" ${imagesPath}/black.png Black \
|
--window-icon=${iconPath} --imagelist --column "Color" --column "Name color" ${imagesPath}/black.png Black \
|
||||||
${imagesPath}/white.png White ${imagesPath}/red.png Red ${imagesPath}/lime.png Lime ${imagesPath}/blue.png Blue \
|
${imagesPath}/white.png White ${imagesPath}/red.png Red ${imagesPath}/lime.png Lime ${imagesPath}/blue.png Blue \
|
||||||
|
@ -166,7 +164,7 @@ while [ ${showMenu} -eq 0 ] ; do
|
||||||
else
|
else
|
||||||
color_apply="none"
|
color_apply="none"
|
||||||
fi
|
fi
|
||||||
elif [ "${opcion}" == "Wave" ] ; then
|
elif [ "${opcion}" == "${imagesPath}/wave.png" ] ; then
|
||||||
sleep 2 | zenity --progress --title "zenidrv-g203-lightsync ${VERSION} (${M_DATE})" --text "Applying Wave effect" \
|
sleep 2 | zenity --progress --title "zenidrv-g203-lightsync ${VERSION} (${M_DATE})" --text "Applying Wave effect" \
|
||||||
--window-icon=${iconPath} --pulsate --no-cancel --auto-close
|
--window-icon=${iconPath} --pulsate --no-cancel --auto-close
|
||||||
g203-led.py lightsync wave
|
g203-led.py lightsync wave
|
||||||
|
@ -177,7 +175,7 @@ while [ ${showMenu} -eq 0 ] ; do
|
||||||
zenity --title "zenidrv-g203-lightsync ${VERSION} ($M_DATE)" --error --window-icon=${iconPath} --width=280 \
|
zenity --title "zenidrv-g203-lightsync ${VERSION} ($M_DATE)" --error --window-icon=${iconPath} --width=280 \
|
||||||
--text "Device not found or connected"
|
--text "Device not found or connected"
|
||||||
fi
|
fi
|
||||||
elif [ "${opcion}" == "Blend" ] ; then
|
elif [ "${opcion}" == "${imagesPath}/blend.png" ] ; then
|
||||||
sleep 2 | zenity --progress --title "zenidrv-g203-lightsync ${VERSION} (${M_DATE})" --text "Applying Blend effect" \
|
sleep 2 | zenity --progress --title "zenidrv-g203-lightsync ${VERSION} (${M_DATE})" --text "Applying Blend effect" \
|
||||||
--window-icon=${iconPath} --pulsate --no-cancel --auto-close
|
--window-icon=${iconPath} --pulsate --no-cancel --auto-close
|
||||||
g203-led.py lightsync blend
|
g203-led.py lightsync blend
|
||||||
|
@ -188,7 +186,7 @@ while [ ${showMenu} -eq 0 ] ; do
|
||||||
zenity --title "zenidrv-g203-lightsync ${VERSION} ($M_DATE)" --error --window-icon=${iconPath} --width=280 \
|
zenity --title "zenidrv-g203-lightsync ${VERSION} ($M_DATE)" --error --window-icon=${iconPath} --width=280 \
|
||||||
--text "Device not found or connected"
|
--text "Device not found or connected"
|
||||||
fi
|
fi
|
||||||
elif [ "${opcion}" == "Intro (On)" ] ; then
|
elif [ "${opcion}" == "${imagesPath}/intro-on.png" ] ; then
|
||||||
sleep 2 | zenity --progress --title "zenidrv-g203-lightsync ${VERSION} (${M_DATE})" --text "Enabling startup effect" \
|
sleep 2 | zenity --progress --title "zenidrv-g203-lightsync ${VERSION} (${M_DATE})" --text "Enabling startup effect" \
|
||||||
--window-icon=${iconPath} --pulsate --no-cancel --auto-close
|
--window-icon=${iconPath} --pulsate --no-cancel --auto-close
|
||||||
g203-led.py lightsync intro on
|
g203-led.py lightsync intro on
|
||||||
|
@ -199,7 +197,7 @@ while [ ${showMenu} -eq 0 ] ; do
|
||||||
zenity --title "zenidrv-g203-lightsync ${VERSION} ($M_DATE)" --error --window-icon=${iconPath} --width=280 \
|
zenity --title "zenidrv-g203-lightsync ${VERSION} ($M_DATE)" --error --window-icon=${iconPath} --width=280 \
|
||||||
--text "Device not found or connected"
|
--text "Device not found or connected"
|
||||||
fi
|
fi
|
||||||
elif [ "${opcion}" == "Intro (Off)" ] ; then
|
elif [ "${opcion}" == "${imagesPath}/intro-off.png" ] ; then
|
||||||
sleep 2 | zenity --progress --title "zenidrv-g203-lightsync ${VERSION} (${M_DATE})" --text "Disabling startup effect" \
|
sleep 2 | zenity --progress --title "zenidrv-g203-lightsync ${VERSION} (${M_DATE})" --text "Disabling startup effect" \
|
||||||
--window-icon=${iconPath} --pulsate --no-cancel --auto-close
|
--window-icon=${iconPath} --pulsate --no-cancel --auto-close
|
||||||
g203-led.py lightsync intro off
|
g203-led.py lightsync intro off
|
||||||
|
@ -210,7 +208,7 @@ while [ ${showMenu} -eq 0 ] ; do
|
||||||
zenity --title "zenidrv-g203-lightsync ${VERSION} ($M_DATE)" --error --window-icon=${iconPath} --width=280 \
|
zenity --title "zenidrv-g203-lightsync ${VERSION} ($M_DATE)" --error --window-icon=${iconPath} --width=280 \
|
||||||
--text "Device not found or connected"
|
--text "Device not found or connected"
|
||||||
fi
|
fi
|
||||||
elif [ "${opcion}" == "Set DPI" ] ; then
|
elif [ "${opcion}" == "${imagesPath}/mouse-dpi.png" ] ; then
|
||||||
dpi_number=$(zenity --entry --title "Set DPI (from 50 to 8000)" --window-icon=${iconPath} --text "Enter DPI number (from 50 to 8000):" --entry-text "800")
|
dpi_number=$(zenity --entry --title "Set DPI (from 50 to 8000)" --window-icon=${iconPath} --text "Enter DPI number (from 50 to 8000):" --entry-text "800")
|
||||||
sleep 2 | zenity --progress --title "zenidrv-g203-lightsync ${VERSION} (${M_DATE})" --text "Setting DPI to ${dpi_number}" \
|
sleep 2 | zenity --progress --title "zenidrv-g203-lightsync ${VERSION} (${M_DATE})" --text "Setting DPI to ${dpi_number}" \
|
||||||
--window-icon=${iconPath} --pulsate --no-cancel --auto-close
|
--window-icon=${iconPath} --pulsate --no-cancel --auto-close
|
||||||
|
@ -222,7 +220,7 @@ while [ ${showMenu} -eq 0 ] ; do
|
||||||
zenity --title "zenidrv-g203-lightsync ${VERSION} ($M_DATE)" --error --window-icon=${iconPath} --width=280 \
|
zenity --title "zenidrv-g203-lightsync ${VERSION} ($M_DATE)" --error --window-icon=${iconPath} --width=280 \
|
||||||
--text "Device not found or connected"
|
--text "Device not found or connected"
|
||||||
fi
|
fi
|
||||||
elif [ "${opcion}" == "Light off" ] ; then
|
elif [ "${opcion}" == "${imagesPath}/light-off.png" ] ; then
|
||||||
sleep 2 | zenity --progress --title "zenidrv-g203-lightsync ${VERSION} (${M_DATE})" --text "Turning off the light on the mouse" \
|
sleep 2 | zenity --progress --title "zenidrv-g203-lightsync ${VERSION} (${M_DATE})" --text "Turning off the light on the mouse" \
|
||||||
--window-icon=${iconPath} --pulsate --no-cancel --auto-close
|
--window-icon=${iconPath} --pulsate --no-cancel --auto-close
|
||||||
g203-led.py lightsync breathe 00FFFF 1000 0
|
g203-led.py lightsync breathe 00FFFF 1000 0
|
||||||
|
@ -233,7 +231,7 @@ while [ ${showMenu} -eq 0 ] ; do
|
||||||
zenity --title "zenidrv-g203-lightsync ${VERSION} ($M_DATE)" --error --window-icon=${iconPath} --width=280 \
|
zenity --title "zenidrv-g203-lightsync ${VERSION} ($M_DATE)" --error --window-icon=${iconPath} --width=280 \
|
||||||
--text "Device not found or connected"
|
--text "Device not found or connected"
|
||||||
fi
|
fi
|
||||||
elif [ "${opcion}" == "Exit" ] ; then
|
elif [ "${opcion}" == "${imagesPath}/exit.png" ] ; then
|
||||||
showMenu=1
|
showMenu=1
|
||||||
else
|
else
|
||||||
zenity --title "zenidrv-g203-lightsync ${VERSION} (${M_DATE})" --window-icon=${iconPath} --warning \
|
zenity --title "zenidrv-g203-lightsync ${VERSION} (${M_DATE})" --window-icon=${iconPath} --warning \
|
||||||
|
|
|
@ -37,11 +37,11 @@ showMenu=0
|
||||||
rootMessage
|
rootMessage
|
||||||
while [ ${showMenu} -eq 0 ] ; do
|
while [ ${showMenu} -eq 0 ] ; do
|
||||||
clear
|
clear
|
||||||
opcion=$(zenity --width=280 --height=330 --list --title "zenidrv-g203-prodigy ${VERSION} ($M_DATE)" \
|
opcion=$(zenity --width=280 --height=365 --list --title "zenidrv-g203-prodigy ${VERSION} ($M_DATE)" \
|
||||||
--window-icon=${iconPath} --column "Select effect or option :" "Solid" "Cycle" "Breathe" "Intro (On)" "Intro (Off)" "Set DPI" \
|
--window-icon=${iconPath} --imagelist --column "Icon" --column "Effect/Option" ${imagesPath}/solid.png "Solid" ${imagesPath}/cycle.png "Cycle" ${imagesPath}/breathe.png "Breathe" ${imagesPath}/intro-on.png "Intro (On)" ${imagesPath}/intro-off.png "Intro (Off)" ${imagesPath}/mouse-dpi.png "Set DPI" \
|
||||||
"Light off" "Exit")
|
${imagesPath}/light-off.png "Light off" ${imagesPath}/exit.png "Exit")
|
||||||
if [ "${opcion}" == "Solid" ] ; then
|
if [ "${opcion}" == "${imagesPath}/solid.png" ] ; then
|
||||||
color_selected=$(zenity --list --width=260 --height=565 --title "zenidrv-g203-prodigy ${VERSION} ($M_DATE)" \
|
color_selected=$(zenity --list --width=260 --height=570 --title "zenidrv-g203-prodigy ${VERSION} ($M_DATE)" \
|
||||||
--window-icon=${iconPath} --imagelist --column "Color" --column "Name color" ${imagesPath}/black.png Black \
|
--window-icon=${iconPath} --imagelist --column "Color" --column "Name color" ${imagesPath}/black.png Black \
|
||||||
${imagesPath}/white.png White ${imagesPath}/red.png Red ${imagesPath}/lime.png Lime ${imagesPath}/blue.png Blue \
|
${imagesPath}/white.png White ${imagesPath}/red.png Red ${imagesPath}/lime.png Lime ${imagesPath}/blue.png Blue \
|
||||||
${imagesPath}/yellow.png Yellow ${imagesPath}/cyan.png Cyan ${imagesPath}/magenta.png Magenta \
|
${imagesPath}/yellow.png Yellow ${imagesPath}/cyan.png Cyan ${imagesPath}/magenta.png Magenta \
|
||||||
|
@ -97,7 +97,7 @@ while [ ${showMenu} -eq 0 ] ; do
|
||||||
else
|
else
|
||||||
color_apply="none"
|
color_apply="none"
|
||||||
fi
|
fi
|
||||||
elif [ "${opcion}" == "Cycle" ] ; then
|
elif [ "${opcion}" == "${imagesPath}/cycle.png" ] ; then
|
||||||
sleep 2 | zenity --progress --title "zenidrv-g203-prodigy ${VERSION} (${M_DATE})" --text "Applying Cycle effect" \
|
sleep 2 | zenity --progress --title "zenidrv-g203-prodigy ${VERSION} (${M_DATE})" --text "Applying Cycle effect" \
|
||||||
--window-icon=${iconPath} --pulsate --no-cancel --auto-close
|
--window-icon=${iconPath} --pulsate --no-cancel --auto-close
|
||||||
g203-led.py cycle
|
g203-led.py cycle
|
||||||
|
@ -108,7 +108,7 @@ while [ ${showMenu} -eq 0 ] ; do
|
||||||
zenity --title "zenidrv-g203-prodigy ${VERSION} ($M_DATE)" --error --window-icon=${iconPath} --width=280 \
|
zenity --title "zenidrv-g203-prodigy ${VERSION} ($M_DATE)" --error --window-icon=${iconPath} --width=280 \
|
||||||
--text "Device not found or connected"
|
--text "Device not found or connected"
|
||||||
fi
|
fi
|
||||||
elif [ "${opcion}" == "Breathe" ] ; then
|
elif [ "${opcion}" == "${imagesPath}/breathe.png" ] ; then
|
||||||
color_selected=$(zenity --list --width=260 --height=565 --title "zenidrv-g203-prodigy ${VERSION} ($M_DATE)" \
|
color_selected=$(zenity --list --width=260 --height=565 --title "zenidrv-g203-prodigy ${VERSION} ($M_DATE)" \
|
||||||
--window-icon=${iconPath} --imagelist --column "Color" --column "Name color" ${imagesPath}/black.png Black \
|
--window-icon=${iconPath} --imagelist --column "Color" --column "Name color" ${imagesPath}/black.png Black \
|
||||||
${imagesPath}/white.png White ${imagesPath}/red.png Red ${imagesPath}/lime.png Lime ${imagesPath}/blue.png Blue \
|
${imagesPath}/white.png White ${imagesPath}/red.png Red ${imagesPath}/lime.png Lime ${imagesPath}/blue.png Blue \
|
||||||
|
@ -165,7 +165,7 @@ while [ ${showMenu} -eq 0 ] ; do
|
||||||
else
|
else
|
||||||
color_apply="none"
|
color_apply="none"
|
||||||
fi
|
fi
|
||||||
elif [ "${opcion}" == "Intro (On)" ] ; then
|
elif [ "${opcion}" == "${imagesPath}/intro-on.png" ] ; then
|
||||||
sleep 2 | zenity --progress --title "zenidrv-g203-prodigy ${VERSION} (${M_DATE})" --text "Enabling startup effect" \
|
sleep 2 | zenity --progress --title "zenidrv-g203-prodigy ${VERSION} (${M_DATE})" --text "Enabling startup effect" \
|
||||||
--window-icon=${iconPath} --pulsate --no-cancel --auto-close
|
--window-icon=${iconPath} --pulsate --no-cancel --auto-close
|
||||||
g203-led.py intro on
|
g203-led.py intro on
|
||||||
|
@ -176,7 +176,7 @@ while [ ${showMenu} -eq 0 ] ; do
|
||||||
zenity --title "zenidrv-g203-prodigy ${VERSION} ($M_DATE)" --error --window-icon=${iconPath} --width=280 \
|
zenity --title "zenidrv-g203-prodigy ${VERSION} ($M_DATE)" --error --window-icon=${iconPath} --width=280 \
|
||||||
--text "Device not found or connected"
|
--text "Device not found or connected"
|
||||||
fi
|
fi
|
||||||
elif [ "${opcion}" == "Intro (Off)" ] ; then
|
elif [ "${opcion}" == "${imagesPath}/intro-off.png" ] ; then
|
||||||
sleep 2 | zenity --progress --title "zenidrv-g203-prodigy ${VERSION} (${M_DATE})" --text "Disabling startup effect" \
|
sleep 2 | zenity --progress --title "zenidrv-g203-prodigy ${VERSION} (${M_DATE})" --text "Disabling startup effect" \
|
||||||
--window-icon=${iconPath} --pulsate --no-cancel --auto-close
|
--window-icon=${iconPath} --pulsate --no-cancel --auto-close
|
||||||
g203-led.py intro off
|
g203-led.py intro off
|
||||||
|
@ -187,7 +187,7 @@ while [ ${showMenu} -eq 0 ] ; do
|
||||||
zenity --title "zenidrv-g203-prodigy ${VERSION} ($M_DATE)" --error --window-icon=${iconPath} --width=280 \
|
zenity --title "zenidrv-g203-prodigy ${VERSION} ($M_DATE)" --error --window-icon=${iconPath} --width=280 \
|
||||||
--text "Device not found or connected"
|
--text "Device not found or connected"
|
||||||
fi
|
fi
|
||||||
elif [ "${opcion}" == "Set DPI" ] ; then
|
elif [ "${opcion}" == "${imagesPath}/mouse-dpi.png" ] ; then
|
||||||
dpi_number=$(zenity --entry --title "Set DPI (from 200 to 8000)" --window-icon=${iconPath} --text "Enter DPI number (from 200 to 8000):" --entry-text "800")
|
dpi_number=$(zenity --entry --title "Set DPI (from 200 to 8000)" --window-icon=${iconPath} --text "Enter DPI number (from 200 to 8000):" --entry-text "800")
|
||||||
sleep 2 | zenity --progress --title "zenidrv-g203-prodigy ${VERSION} (${M_DATE})" --text "Setting DPI to ${dpi_number}" \
|
sleep 2 | zenity --progress --title "zenidrv-g203-prodigy ${VERSION} (${M_DATE})" --text "Setting DPI to ${dpi_number}" \
|
||||||
--window-icon=${iconPath} --pulsate --no-cancel --auto-close
|
--window-icon=${iconPath} --pulsate --no-cancel --auto-close
|
||||||
|
@ -199,7 +199,7 @@ while [ ${showMenu} -eq 0 ] ; do
|
||||||
zenity --title "zenidrv-g203-prodigy ${VERSION} ($M_DATE)" --error --window-icon=${iconPath} --width=280 \
|
zenity --title "zenidrv-g203-prodigy ${VERSION} ($M_DATE)" --error --window-icon=${iconPath} --width=280 \
|
||||||
--text "Device not found or connected"
|
--text "Device not found or connected"
|
||||||
fi
|
fi
|
||||||
elif [ "${opcion}" == "Light off" ] ; then
|
elif [ "${opcion}" == "${imagesPath}/light-off.png" ] ; then
|
||||||
sleep 2 | zenity --progress --title "zenidrv-g203-prodigy ${VERSION} (${M_DATE})" --text "Turning off the light on the mouse" \
|
sleep 2 | zenity --progress --title "zenidrv-g203-prodigy ${VERSION} (${M_DATE})" --text "Turning off the light on the mouse" \
|
||||||
--window-icon=${iconPath} --pulsate --no-cancel --auto-close
|
--window-icon=${iconPath} --pulsate --no-cancel --auto-close
|
||||||
g203-led.py breathe 00FFFF 1000 0
|
g203-led.py breathe 00FFFF 1000 0
|
||||||
|
@ -210,7 +210,7 @@ while [ ${showMenu} -eq 0 ] ; do
|
||||||
zenity --title "zenidrv-g203-prodigy ${VERSION} ($M_DATE)" --error --window-icon=${iconPath} --width=280 \
|
zenity --title "zenidrv-g203-prodigy ${VERSION} ($M_DATE)" --error --window-icon=${iconPath} --width=280 \
|
||||||
--text "Device not found or connected"
|
--text "Device not found or connected"
|
||||||
fi
|
fi
|
||||||
elif [ "${opcion}" == "Exit" ] ; then
|
elif [ "${opcion}" == "${imagesPath}/exit.png" ] ; then
|
||||||
showMenu=1
|
showMenu=1
|
||||||
else
|
else
|
||||||
zenity --title "zenidrv-g203-prodigy ${VERSION} (${M_DATE})" --window-icon=${iconPath} --warning \
|
zenity --title "zenidrv-g203-prodigy ${VERSION} (${M_DATE})" --window-icon=${iconPath} --warning \
|
||||||
|
|
Loading…
Reference in New Issue
Block a user