diff --git a/zenidrv-g203-lightsync b/zenidrv-g203-lightsync index cc30355..a579462 100755 --- a/zenidrv-g203-lightsync +++ b/zenidrv-g203-lightsync @@ -213,15 +213,19 @@ while [ ${showMenu} -eq 0 ] ; do fi 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 - g203-led.py lightsync dpi ${dpi_number} - device_error=$? - if [ ${device_error} -eq 0 ] ; then + if [ -z ${dpi_number} ] ; then echo > /dev/null else - zenity --title "zenidrv-g203-lightsync ${VERSION} ($M_DATE)" --error --window-icon=${iconPath} --width=280 \ - --text "Device not found or connected" + 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 + g203-led.py lightsync dpi ${dpi_number} + device_error=$? + if [ ${device_error} -eq 0 ] ; then + echo > /dev/null + else + zenity --title "zenidrv-g203-lightsync ${VERSION} ($M_DATE)" --error --window-icon=${iconPath} --width=280 \ + --text "Device not found or connected" + fi fi 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" \ diff --git a/zenidrv-g203-prodigy b/zenidrv-g203-prodigy index e31a484..026765a 100755 --- a/zenidrv-g203-prodigy +++ b/zenidrv-g203-prodigy @@ -191,15 +191,19 @@ while [ ${showMenu} -eq 0 ] ; do fi 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 - g203-led.py dpi ${dpi_number} - device_error=$? - if [ ${device_error} -eq 0 ] ; then + if [ -z ${dpi_number} ] ; then echo > /dev/null else - zenity --title "zenidrv-g203-prodigy ${VERSION} ($M_DATE)" --error --window-icon=${iconPath} --width=280 \ - --text "Device not found or connected" + 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 + g203-led.py dpi ${dpi_number} + device_error=$? + if [ ${device_error} -eq 0 ] ; then + echo > /dev/null + else + zenity --title "zenidrv-g203-prodigy ${VERSION} ($M_DATE)" --error --window-icon=${iconPath} --width=280 \ + --text "Device not found or connected" + fi fi 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" \