diff --git a/zenidrv-g203-lightsync b/zenidrv-g203-lightsync index da265ea..e925f34 100755 --- a/zenidrv-g203-lightsync +++ b/zenidrv-g203-lightsync @@ -12,6 +12,7 @@ M_DATE="060721" # Variables iconPath="/usr/share/icons/logitech/logitech-black.png" +imagesPath="/usr/share/icons/logitech/images" # Function to check admin rights. function rootMessage() { @@ -41,42 +42,46 @@ while [ ${showMenu} -eq 0 ] ; do "Intro (On)" "Intro (Off)" "Set DPI" \ "Light off" "Exit") if [ "${opcion}" == "Solid" ] ; then - color_selected=$(zenity --width=260 --height=520 --list --title "zenidrv-g203-lightsync ${VERSION} ($M_DATE)" \ - --window-icon=${iconPath} --column "Select color from list :" "Black" "White" "Red" "Lime" "Blue" "Yellow" "Cyan" "Magenta" \ - "Silver" "Gray" "Maroon" "Olive" "Green" "Purple" "Teal" "Navy" ) + 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 \ + ${imagesPath}/yellow.png Yellow ${imagesPath}/cyan.png Cyan ${imagesPath}/magenta.png Magenta \ + ${imagesPath}/silver.png Silver ${imagesPath}/gray.png Gray ${imagesPath}/maroon.png Maroon \ + ${imagesPath}/olive.png Olive ${imagesPath}/green.png Green ${imagesPath}/purple.png Purple ${imagesPath}/teal.png Teal \ + ${imagesPath}/navy.png Navy) canceled=$? if [ ${canceled} -eq 0 ] ; then - if [ "${color_selected}" == "Black" ] ; then + if [ "${color_selected}" == "${imagesPath}/black.png" ] ; then color_apply="000000" - elif [ "${color_selected}" == "White" ] ; then + elif [ "${color_selected}" == "${imagesPath}/white.png" ] ; then color_apply="FFFFFF" - elif [ "${color_selected}" == "Red" ] ; then + elif [ "${color_selected}" == "${imagesPath}/red.png" ] ; then color_apply="FF0000" - elif [ "${color_selected}" == "Lime" ] ; then + elif [ "${color_selected}" == "${imagesPath}/lime.png" ] ; then color_apply="00FF00" - elif [ "${color_selected}" == "Blue" ] ; then + elif [ "${color_selected}" == "${imagesPath}/blue.png" ] ; then color_apply="0000FF" - elif [ "${color_selected}" == "Yellow" ] ; then + elif [ "${color_selected}" == "${imagesPath}/yellow.png" ] ; then color_apply="FFFF00" - elif [ "${color_selected}" == "Cyan" ] ; then + elif [ "${color_selected}" == "${imagesPath}/cyan.png" ] ; then color_apply="00FFFF" - elif [ "${color_selected}" == "Magenta" ] ; then + elif [ "${color_selected}" == "${imagesPath}/magenta.png" ] ; then color_apply="FF00FF" - elif [ "${color_selected}" == "Silver" ] ; then + elif [ "${color_selected}" == "${imagesPath}/silver.png" ] ; then color_apply="C0C0C0" - elif [ "${color_selected}" == "Gray" ] ; then + elif [ "${color_selected}" == "${imagesPath}/gray.png" ] ; then color_apply="808080" - elif [ "${color_selected}" == "Maroon" ] ; then + elif [ "${color_selected}" == "${imagesPath}/maroon.png" ] ; then color_apply="800000" - elif [ "${color_selected}" == "Olive" ] ; then + elif [ "${color_selected}" == "${imagesPath}/olive.png" ] ; then color_apply="808000" - elif [ "${color_selected}" == "Green" ] ; then + elif [ "${color_selected}" == "${imagesPath}/green.png" ] ; then color_apply="008000" - elif [ "${color_selected}" == "Purple" ] ; then + elif [ "${color_selected}" == "${imagesPath}/purple.png" ] ; then color_apply="800080" - elif [ "${color_selected}" == "Teal" ] ; then + elif [ "${color_selected}" == "${imagesPath}/teal.png" ] ; then color_apply="008080" - elif [ "${color_selected}" == "Navy" ] ; then + elif [ "${color_selected}" == "${imagesPath}/navy.png" ] ; then color_apply="000080" fi sleep 2 | zenity --progress --title "zenidrv-g203-lightsync ${VERSION} (${M_DATE})" --text "Applying Solid effect" \ @@ -105,42 +110,46 @@ while [ ${showMenu} -eq 0 ] ; do --text "Device not found or connected" fi elif [ "${opcion}" == "Breathe" ] ; then - color_selected=$(zenity --width=260 --height=520 --list --title "zenidrv-g203-lightsync ${VERSION} ($M_DATE)" \ - --window-icon=${iconPath} --column "Select color from list :" "Black" "White" "Red" "Lime" "Blue" "Yellow" "Cyan" "Magenta" \ - "Silver" "Gray" "Maroon" "Olive" "Green" "Purple" "Teal" "Navy" ) + 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 \ + ${imagesPath}/yellow.png Yellow ${imagesPath}/cyan.png Cyan ${imagesPath}/magenta.png Magenta \ + ${imagesPath}/silver.png Silver ${imagesPath}/gray.png Gray ${imagesPath}/maroon.png Maroon \ + ${imagesPath}/olive.png Olive ${imagesPath}/green.png Green ${imagesPath}/purple.png Purple ${imagesPath}/teal.png Teal \ + ${imagesPath}/navy.png Navy) canceled=$? if [ ${canceled} -eq 0 ] ; then - if [ "${color_selected}" == "Black" ] ; then + if [ "${color_selected}" == "${imagesPath}/black.png" ] ; then color_apply="000000" - elif [ "${color_selected}" == "White" ] ; then + elif [ "${color_selected}" == "${imagesPath}/white.png" ] ; then color_apply="FFFFFF" - elif [ "${color_selected}" == "Red" ] ; then + elif [ "${color_selected}" == "${imagesPath}/red.png" ] ; then color_apply="FF0000" - elif [ "${color_selected}" == "Lime" ] ; then + elif [ "${color_selected}" == "${imagesPath}/lime.png" ] ; then color_apply="00FF00" - elif [ "${color_selected}" == "Blue" ] ; then + elif [ "${color_selected}" == "${imagesPath}/blue.png" ] ; then color_apply="0000FF" - elif [ "${color_selected}" == "Yellow" ] ; then + elif [ "${color_selected}" == "${imagesPath}/yellow.png" ] ; then color_apply="FFFF00" - elif [ "${color_selected}" == "Cyan" ] ; then + elif [ "${color_selected}" == "${imagesPath}/cyan.png" ] ; then color_apply="00FFFF" - elif [ "${color_selected}" == "Magenta" ] ; then + elif [ "${color_selected}" == "${imagesPath}/magenta.png" ] ; then color_apply="FF00FF" - elif [ "${color_selected}" == "Silver" ] ; then + elif [ "${color_selected}" == "${imagesPath}/silver.png" ] ; then color_apply="C0C0C0" - elif [ "${color_selected}" == "Gray" ] ; then + elif [ "${color_selected}" == "${imagesPath}/gray.png" ] ; then color_apply="808080" - elif [ "${color_selected}" == "Maroon" ] ; then + elif [ "${color_selected}" == "${imagesPath}/maroon.png" ] ; then color_apply="800000" - elif [ "${color_selected}" == "Olive" ] ; then + elif [ "${color_selected}" == "${imagesPath}/olive.png" ] ; then color_apply="808000" - elif [ "${color_selected}" == "Green" ] ; then + elif [ "${color_selected}" == "${imagesPath}/green.png" ] ; then color_apply="008000" - elif [ "${color_selected}" == "Purple" ] ; then + elif [ "${color_selected}" == "${imagesPath}/purple.png" ] ; then color_apply="800080" - elif [ "${color_selected}" == "Teal" ] ; then + elif [ "${color_selected}" == "${imagesPath}/teal.png" ] ; then color_apply="008080" - elif [ "${color_selected}" == "Navy" ] ; then + elif [ "${color_selected}" == "${imagesPath}/navy.png" ] ; then color_apply="000080" fi sleep 2 | zenity --progress --title "zenidrv-g203-lightsync ${VERSION} (${M_DATE})" --text "Applying Breathe effect" \ diff --git a/zenidrv-g203-prodigy b/zenidrv-g203-prodigy index e854b93..840b6d5 100755 --- a/zenidrv-g203-prodigy +++ b/zenidrv-g203-prodigy @@ -12,6 +12,7 @@ M_DATE="060721" # Variables iconPath="/usr/share/icons/logitech/logitech-black.png" +imagesPath="/usr/share/icons/logitech/images" # Function to check admin rights. function rootMessage() { @@ -40,42 +41,46 @@ while [ ${showMenu} -eq 0 ] ; do --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 --width=260 --height=520 --list --title "zenidrv-g203-lightsync ${VERSION} ($M_DATE)" \ - --window-icon=${iconPath} --column "Select color from list :" "Black" "White" "Red" "Lime" "Blue" "Yellow" "Cyan" "Magenta" \ - "Silver" "Gray" "Maroon" "Olive" "Green" "Purple" "Teal" "Navy" ) + 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 \ + ${imagesPath}/yellow.png Yellow ${imagesPath}/cyan.png Cyan ${imagesPath}/magenta.png Magenta \ + ${imagesPath}/silver.png Silver ${imagesPath}/gray.png Gray ${imagesPath}/maroon.png Maroon \ + ${imagesPath}/olive.png Olive ${imagesPath}/green.png Green ${imagesPath}/purple.png Purple ${imagesPath}/teal.png Teal \ + ${imagesPath}/navy.png Navy) canceled=$? if [ ${canceled} -eq 0 ] ; then - if [ "${color_selected}" == "Black" ] ; then + if [ "${color_selected}" == "${imagesPath}/black.png" ] ; then color_apply="000000" - elif [ "${color_selected}" == "White" ] ; then + elif [ "${color_selected}" == "${imagesPath}/white.png" ] ; then color_apply="FFFFFF" - elif [ "${color_selected}" == "Red" ] ; then + elif [ "${color_selected}" == "${imagesPath}/red.png" ] ; then color_apply="FF0000" - elif [ "${color_selected}" == "Lime" ] ; then + elif [ "${color_selected}" == "${imagesPath}/lime.png" ] ; then color_apply="00FF00" - elif [ "${color_selected}" == "Blue" ] ; then + elif [ "${color_selected}" == "${imagesPath}/blue.png" ] ; then color_apply="0000FF" - elif [ "${color_selected}" == "Yellow" ] ; then + elif [ "${color_selected}" == "${imagesPath}/yellow.png" ] ; then color_apply="FFFF00" - elif [ "${color_selected}" == "Cyan" ] ; then + elif [ "${color_selected}" == "${imagesPath}/cyan.png" ] ; then color_apply="00FFFF" - elif [ "${color_selected}" == "Magenta" ] ; then + elif [ "${color_selected}" == "${imagesPath}/magenta.png" ] ; then color_apply="FF00FF" - elif [ "${color_selected}" == "Silver" ] ; then + elif [ "${color_selected}" == "${imagesPath}/silver.png" ] ; then color_apply="C0C0C0" - elif [ "${color_selected}" == "Gray" ] ; then + elif [ "${color_selected}" == "${imagesPath}/gray.png" ] ; then color_apply="808080" - elif [ "${color_selected}" == "Maroon" ] ; then + elif [ "${color_selected}" == "${imagesPath}/maroon.png" ] ; then color_apply="800000" - elif [ "${color_selected}" == "Olive" ] ; then + elif [ "${color_selected}" == "${imagesPath}/olive.png" ] ; then color_apply="808000" - elif [ "${color_selected}" == "Green" ] ; then + elif [ "${color_selected}" == "${imagesPath}/green.png" ] ; then color_apply="008000" - elif [ "${color_selected}" == "Purple" ] ; then + elif [ "${color_selected}" == "${imagesPath}/purple.png" ] ; then color_apply="800080" - elif [ "${color_selected}" == "Teal" ] ; then + elif [ "${color_selected}" == "${imagesPath}/teal.png" ] ; then color_apply="008080" - elif [ "${color_selected}" == "Navy" ] ; then + elif [ "${color_selected}" == "${imagesPath}/navy.png" ] ; then color_apply="000080" fi sleep 2 | zenity --progress --title "zenidrv-g203-prodigy ${VERSION} (${M_DATE})" --text "Applying Solid effect" \ @@ -104,42 +109,46 @@ while [ ${showMenu} -eq 0 ] ; do --text "Device not found or connected" fi elif [ "${opcion}" == "Breathe" ] ; then - color_selected=$(zenity --width=260 --height=520 --list --title "zenidrv-g203-lightsync ${VERSION} ($M_DATE)" \ - --window-icon=${iconPath} --column "Select color from list :" "Black" "White" "Red" "Lime" "Blue" "Yellow" "Cyan" "Magenta" \ - "Silver" "Gray" "Maroon" "Olive" "Green" "Purple" "Teal" "Navy" ) + 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 \ + ${imagesPath}/yellow.png Yellow ${imagesPath}/cyan.png Cyan ${imagesPath}/magenta.png Magenta \ + ${imagesPath}/silver.png Silver ${imagesPath}/gray.png Gray ${imagesPath}/maroon.png Maroon \ + ${imagesPath}/olive.png Olive ${imagesPath}/green.png Green ${imagesPath}/purple.png Purple ${imagesPath}/teal.png Teal \ + ${imagesPath}/navy.png Navy) canceled=$? if [ ${canceled} -eq 0 ] ; then - if [ "${color_selected}" == "Black" ] ; then + if [ "${color_selected}" == "${imagesPath}/black.png" ] ; then color_apply="000000" - elif [ "${color_selected}" == "White" ] ; then + elif [ "${color_selected}" == "${imagesPath}/white.png" ] ; then color_apply="FFFFFF" - elif [ "${color_selected}" == "Red" ] ; then + elif [ "${color_selected}" == "${imagesPath}/red.png" ] ; then color_apply="FF0000" - elif [ "${color_selected}" == "Lime" ] ; then + elif [ "${color_selected}" == "${imagesPath}/lime.png" ] ; then color_apply="00FF00" - elif [ "${color_selected}" == "Blue" ] ; then + elif [ "${color_selected}" == "${imagesPath}/blue.png" ] ; then color_apply="0000FF" - elif [ "${color_selected}" == "Yellow" ] ; then + elif [ "${color_selected}" == "${imagesPath}/yellow.png" ] ; then color_apply="FFFF00" - elif [ "${color_selected}" == "Cyan" ] ; then + elif [ "${color_selected}" == "${imagesPath}/cyan.png" ] ; then color_apply="00FFFF" - elif [ "${color_selected}" == "Magenta" ] ; then + elif [ "${color_selected}" == "${imagesPath}/magenta.png" ] ; then color_apply="FF00FF" - elif [ "${color_selected}" == "Silver" ] ; then + elif [ "${color_selected}" == "${imagesPath}/silver.png" ] ; then color_apply="C0C0C0" - elif [ "${color_selected}" == "Gray" ] ; then + elif [ "${color_selected}" == "${imagesPath}/gray.png" ] ; then color_apply="808080" - elif [ "${color_selected}" == "Maroon" ] ; then + elif [ "${color_selected}" == "${imagesPath}/maroon.png" ] ; then color_apply="800000" - elif [ "${color_selected}" == "Olive" ] ; then + elif [ "${color_selected}" == "${imagesPath}/olive.png" ] ; then color_apply="808000" - elif [ "${color_selected}" == "Green" ] ; then + elif [ "${color_selected}" == "${imagesPath}/green.png" ] ; then color_apply="008000" - elif [ "${color_selected}" == "Purple" ] ; then + elif [ "${color_selected}" == "${imagesPath}/purple.png" ] ; then color_apply="800080" - elif [ "${color_selected}" == "Teal" ] ; then + elif [ "${color_selected}" == "${imagesPath}/teal.png" ] ; then color_apply="008080" - elif [ "${color_selected}" == "Navy" ] ; then + elif [ "${color_selected}" == "${imagesPath}/navy.png" ] ; then color_apply="000080" fi sleep 2 | zenity --progress --title "zenidrv-g203-prodigy ${VERSION} (${M_DATE})" --text "Applying Breathe effect" \