diff --git a/zenidrv-g203-lightsync b/zenidrv-g203-lightsync index e925f34..3869446 100755 --- a/zenidrv-g203-lightsync +++ b/zenidrv-g203-lightsync @@ -37,12 +37,10 @@ showMenu=0 rootMessage while [ ${showMenu} -eq 0 ] ; do clear - opcion=$(zenity --width=280 --height=380 --list --title "zenidrv-g203-lightsync ${VERSION} ($M_DATE)" \ - --window-icon=${iconPath} --column "Select effect or option :" "Solid" "Cycle" "Breathe" "Wave" "Blend" \ - "Intro (On)" "Intro (Off)" "Set DPI" \ - "Light off" "Exit") - if [ "${opcion}" == "Solid" ] ; then - color_selected=$(zenity --list --width=260 --height=565 --title "zenidrv-g203-lightsync ${VERSION} ($M_DATE)" \ + opcion=$(zenity --width=280 --height=415 --list --title "zenidrv-g203-lightsync ${VERSION} ($M_DATE)" \ + --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") + if [ "${opcion}" == "${imagesPath}/solid.png" ] ; then + color_selected=$(zenity --list --width=260 --height=570 --title "zenidrv-g203-lightsync ${VERSION} ($M_DATE)" \ --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}/yellow.png Yellow ${imagesPath}/cyan.png Cyan ${imagesPath}/magenta.png Magenta \ @@ -98,7 +96,7 @@ while [ ${showMenu} -eq 0 ] ; do else color_apply="none" 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" \ --window-icon=${iconPath} --pulsate --no-cancel --auto-close 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 \ --text "Device not found or connected" 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)" \ --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 \ @@ -166,7 +164,7 @@ while [ ${showMenu} -eq 0 ] ; do else color_apply="none" 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" \ --window-icon=${iconPath} --pulsate --no-cancel --auto-close 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 \ --text "Device not found or connected" 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" \ --window-icon=${iconPath} --pulsate --no-cancel --auto-close 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 \ --text "Device not found or connected" 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" \ --window-icon=${iconPath} --pulsate --no-cancel --auto-close 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 \ --text "Device not found or connected" 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" \ --window-icon=${iconPath} --pulsate --no-cancel --auto-close 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 \ --text "Device not found or connected" 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") 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 @@ -222,7 +220,7 @@ while [ ${showMenu} -eq 0 ] ; do zenity --title "zenidrv-g203-lightsync ${VERSION} ($M_DATE)" --error --window-icon=${iconPath} --width=280 \ --text "Device not found or connected" 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" \ --window-icon=${iconPath} --pulsate --no-cancel --auto-close 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 \ --text "Device not found or connected" fi - elif [ "${opcion}" == "Exit" ] ; then + elif [ "${opcion}" == "${imagesPath}/exit.png" ] ; then showMenu=1 else zenity --title "zenidrv-g203-lightsync ${VERSION} (${M_DATE})" --window-icon=${iconPath} --warning \ diff --git a/zenidrv-g203-prodigy b/zenidrv-g203-prodigy index 840b6d5..ad2b5e1 100755 --- a/zenidrv-g203-prodigy +++ b/zenidrv-g203-prodigy @@ -37,11 +37,11 @@ showMenu=0 rootMessage while [ ${showMenu} -eq 0 ] ; do clear - opcion=$(zenity --width=280 --height=330 --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" \ - "Light off" "Exit") - if [ "${opcion}" == "Solid" ] ; then - color_selected=$(zenity --list --width=260 --height=565 --title "zenidrv-g203-prodigy ${VERSION} ($M_DATE)" \ + opcion=$(zenity --width=280 --height=365 --list --title "zenidrv-g203-prodigy ${VERSION} ($M_DATE)" \ + --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" \ + ${imagesPath}/light-off.png "Light off" ${imagesPath}/exit.png "Exit") + if [ "${opcion}" == "${imagesPath}/solid.png" ] ; then + 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 \ ${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 \ @@ -97,7 +97,7 @@ while [ ${showMenu} -eq 0 ] ; do else color_apply="none" 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" \ --window-icon=${iconPath} --pulsate --no-cancel --auto-close 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 \ --text "Device not found or connected" 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)" \ --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 \ @@ -165,7 +165,7 @@ while [ ${showMenu} -eq 0 ] ; do else color_apply="none" 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" \ --window-icon=${iconPath} --pulsate --no-cancel --auto-close 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 \ --text "Device not found or connected" 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" \ --window-icon=${iconPath} --pulsate --no-cancel --auto-close 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 \ --text "Device not found or connected" 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") 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 @@ -199,7 +199,7 @@ while [ ${showMenu} -eq 0 ] ; do zenity --title "zenidrv-g203-prodigy ${VERSION} ($M_DATE)" --error --window-icon=${iconPath} --width=280 \ --text "Device not found or connected" 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" \ --window-icon=${iconPath} --pulsate --no-cancel --auto-close 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 \ --text "Device not found or connected" fi - elif [ "${opcion}" == "Exit" ] ; then + elif [ "${opcion}" == "${imagesPath}/exit.png" ] ; then showMenu=1 else zenity --title "zenidrv-g203-prodigy ${VERSION} (${M_DATE})" --window-icon=${iconPath} --warning \