Add window-icon on GUI Windows
This commit is contained in:
parent
08e0ae7174
commit
3e4adfa0d3
|
@ -10,6 +10,9 @@
|
||||||
VERSION="1.0"
|
VERSION="1.0"
|
||||||
M_DATE="060721"
|
M_DATE="060721"
|
||||||
|
|
||||||
|
# Variables
|
||||||
|
iconPath="/usr/share/icons/logitech/logitech-black.png"
|
||||||
|
|
||||||
# Function to check admin rights
|
# Function to check admin rights
|
||||||
function rootMessage() {
|
function rootMessage() {
|
||||||
mkdir -p /etc/root &> /dev/null
|
mkdir -p /etc/root &> /dev/null
|
||||||
|
@ -17,7 +20,7 @@ function rootMessage() {
|
||||||
if [ ${administrador} -eq 0 ] ; then
|
if [ ${administrador} -eq 0 ] ; then
|
||||||
rm -rf /etc/root
|
rm -rf /etc/root
|
||||||
else
|
else
|
||||||
zenity --title "zenidrv-g203 v${VERSION} (${M_DATE})" --warning --width=340 --text "Administrator permissions are required"
|
zenity --title "zenidrv-g203 v${VERSION} (${M_DATE})" --window-icon=${iconPath} --warning --width=340 --text "Administrator permissions are required"
|
||||||
echo ""
|
echo ""
|
||||||
echo "* zenidrv-g203 v${VERSION} (${M_DATE}) (GPL v2.0)"
|
echo "* zenidrv-g203 v${VERSION} (${M_DATE}) (GPL v2.0)"
|
||||||
echo ""
|
echo ""
|
||||||
|
@ -28,7 +31,7 @@ function rootMessage() {
|
||||||
}
|
}
|
||||||
|
|
||||||
rootMessage
|
rootMessage
|
||||||
zenity --question --title "zenidrv-g203 ${VERSION} (${M_DATE})" --cancel-label="Prodigy 1r Gen (Default)" --ok-label="Lightsync 2nd Gen" --width=530 \
|
zenity --question --title "zenidrv-g203 ${VERSION} (${M_DATE})" --window-icon=${iconPath} --cancel-label="Prodigy 1r Gen (Default)" --ok-label="Lightsync 2nd Gen" --width=530 \
|
||||||
--text "Choose the version of your Logitech G203 (Prodigy 1r Gen or Lightsync 2nd Gen)"
|
--text "Choose the version of your Logitech G203 (Prodigy 1r Gen or Lightsync 2nd Gen)"
|
||||||
createLink=$?
|
createLink=$?
|
||||||
if [ ${createLink} -eq 1 ] ; then
|
if [ ${createLink} -eq 1 ] ; then
|
||||||
|
|
|
@ -10,6 +10,9 @@
|
||||||
VERSION="1.0"
|
VERSION="1.0"
|
||||||
M_DATE="060721"
|
M_DATE="060721"
|
||||||
|
|
||||||
|
# Variables
|
||||||
|
iconPath="/usr/share/icons/logitech/logitech-black.png"
|
||||||
|
|
||||||
# Link with gksudo,gksu o bessu
|
# Link with gksudo,gksu o bessu
|
||||||
function showRootMessage() {
|
function showRootMessage() {
|
||||||
if [ -f /usr/bin/gksudo ] ; then
|
if [ -f /usr/bin/gksudo ] ; then
|
||||||
|
@ -46,7 +49,7 @@ function showRootMessage() {
|
||||||
zenity -h &> /dev/null
|
zenity -h &> /dev/null
|
||||||
output=$?
|
output=$?
|
||||||
if [ ${output} -eq 0 ] ; then
|
if [ ${output} -eq 0 ] ; then
|
||||||
zenity --title "zenidrv-g203 ${VERSION} (${M_DATE})" --info \
|
zenity --title "zenidrv-g203 ${VERSION} (${M_DATE})" --window-icon=${iconPath} --info \
|
||||||
--text "The 'zenidrv-g203' program could not be run as administrator\n\nPlease run the command 'zenidrv-g203' as root user in terminal"
|
--text "The 'zenidrv-g203' program could not be run as administrator\n\nPlease run the command 'zenidrv-g203' as root user in terminal"
|
||||||
else
|
else
|
||||||
xterm -T "zenidrv-g203 ${VERSION} (${M_DATE})" -fa Monospace -fs 10 -bg white -fg black -e "zenidrv-g203-admin --error"
|
xterm -T "zenidrv-g203 ${VERSION} (${M_DATE})" -fa Monospace -fs 10 -bg white -fg black -e "zenidrv-g203-admin --error"
|
||||||
|
@ -67,7 +70,7 @@ function errorMessage() {
|
||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
|
|
||||||
# Inicio del script
|
# Startup script
|
||||||
if [ "${1}" == "--error" ] ; then
|
if [ "${1}" == "--error" ] ; then
|
||||||
errorMessage
|
errorMessage
|
||||||
else
|
else
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
VERSION="1.0"
|
VERSION="1.0"
|
||||||
M_DATE="060721"
|
M_DATE="060721"
|
||||||
|
|
||||||
|
# Variables
|
||||||
|
iconPath="/usr/share/icons/logitech/logitech-black.png"
|
||||||
|
|
||||||
# Function to check admin rights.
|
# Function to check admin rights.
|
||||||
function rootMessage() {
|
function rootMessage() {
|
||||||
|
@ -18,7 +20,7 @@ function rootMessage() {
|
||||||
if [ ${administrador} -eq 0 ] ; then
|
if [ ${administrador} -eq 0 ] ; then
|
||||||
rm -rf /etc/root
|
rm -rf /etc/root
|
||||||
else
|
else
|
||||||
zenity --title "zenidrv-g203-lightsync ${VERSION} (${M_DATE})" --warning --width=340 --text "Administrator permissions are required"
|
zenity --title "zenidrv-g203-lightsync ${VERSION} (${M_DATE})" --window-icon=${iconPath} --warning --width=340 --text "Administrator permissions are required"
|
||||||
echo ""
|
echo ""
|
||||||
echo "* zenidrv-g203-lightsync ${VERSION} (${M_DATE}) (GPL v2.0)"
|
echo "* zenidrv-g203-lightsync ${VERSION} (${M_DATE}) (GPL v2.0)"
|
||||||
echo ""
|
echo ""
|
||||||
|
@ -34,12 +36,12 @@ 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=380 --list --title "zenidrv-g203-lightsync ${VERSION} ($M_DATE)" \
|
||||||
--column "Select effect or option :" "Solid" "Cycle" "Breathe" "Wave" "Blend" \
|
--window-icon=${iconPath} --column "Select effect or option :" "Solid" "Cycle" "Breathe" "Wave" "Blend" \
|
||||||
"Intro (On)" "Intro (Off)" "Set DPI" \
|
"Intro (On)" "Intro (Off)" "Set DPI" \
|
||||||
"Light off" "Exit")
|
"Light off" "Exit")
|
||||||
if [ "${opcion}" == "Solid" ] ; then
|
if [ "${opcion}" == "Solid" ] ; then
|
||||||
color_selected=$(zenity --width=260 --height=520 --list --title "zenidrv-g203-lightsync ${VERSION} ($M_DATE)" \
|
color_selected=$(zenity --width=260 --height=520 --list --title "zenidrv-g203-lightsync ${VERSION} ($M_DATE)" \
|
||||||
--column "Select color from list :" "Black" "White" "Red" "Lime" "Blue" "Yellow" "Cyan" "Magenta" \
|
--window-icon=${iconPath} --column "Select color from list :" "Black" "White" "Red" "Lime" "Blue" "Yellow" "Cyan" "Magenta" \
|
||||||
"Silver" "Gray" "Maroon" "Olive" "Green" "Purple" "Teal" "Navy" )
|
"Silver" "Gray" "Maroon" "Olive" "Green" "Purple" "Teal" "Navy" )
|
||||||
if [ "${color_selected}" == "Black" ] ; then
|
if [ "${color_selected}" == "Black" ] ; then
|
||||||
color_apply="000000"
|
color_apply="000000"
|
||||||
|
@ -80,7 +82,7 @@ while [ ${showMenu} -eq 0 ] ; do
|
||||||
g203-led.py lightsync cycle
|
g203-led.py lightsync cycle
|
||||||
elif [ "${opcion}" == "Breathe" ] ; then
|
elif [ "${opcion}" == "Breathe" ] ; then
|
||||||
color_selected=$(zenity --width=260 --height=520 --list --title "zenidrv-g203-lightsync ${VERSION} ($M_DATE)" \
|
color_selected=$(zenity --width=260 --height=520 --list --title "zenidrv-g203-lightsync ${VERSION} ($M_DATE)" \
|
||||||
--column "Select color from list :" "Black" "White" "Red" "Lime" "Blue" "Yellow" "Cyan" "Magenta" \
|
--window-icon=${iconPath} --column "Select color from list :" "Black" "White" "Red" "Lime" "Blue" "Yellow" "Cyan" "Magenta" \
|
||||||
"Silver" "Gray" "Maroon" "Olive" "Green" "Purple" "Teal" "Navy" )
|
"Silver" "Gray" "Maroon" "Olive" "Green" "Purple" "Teal" "Navy" )
|
||||||
if [ "${color_selected}" == "Black" ] ; then
|
if [ "${color_selected}" == "Black" ] ; then
|
||||||
color_apply="000000"
|
color_apply="000000"
|
||||||
|
@ -126,7 +128,7 @@ while [ ${showMenu} -eq 0 ] ; do
|
||||||
elif [ "${opcion}" == "Intro (Off)" ] ; then
|
elif [ "${opcion}" == "Intro (Off)" ] ; then
|
||||||
g203-led.py lightsync intro off
|
g203-led.py lightsync intro off
|
||||||
elif [ "${opcion}" == "Set DPI" ] ; then
|
elif [ "${opcion}" == "Set DPI" ] ; then
|
||||||
dpi_number=$(zenity --entry --title "Set DPI (from 50 to 8000)" --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")
|
||||||
g203-led.py lightsync dpi ${dpi_number}
|
g203-led.py lightsync dpi ${dpi_number}
|
||||||
elif [ "${opcion}" == "Light off" ] ; then
|
elif [ "${opcion}" == "Light off" ] ; then
|
||||||
g203-led.py lightsync breathe 00FFFF 1000 0
|
g203-led.py lightsync breathe 00FFFF 1000 0
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
VERSION="1.0"
|
VERSION="1.0"
|
||||||
M_DATE="060721"
|
M_DATE="060721"
|
||||||
|
|
||||||
|
# Variables
|
||||||
|
iconPath="/usr/share/icons/logitech/logitech-black.png"
|
||||||
|
|
||||||
# Function to check admin rights.
|
# Function to check admin rights.
|
||||||
function rootMessage() {
|
function rootMessage() {
|
||||||
|
@ -18,7 +20,7 @@ function rootMessage() {
|
||||||
if [ ${administrador} -eq 0 ] ; then
|
if [ ${administrador} -eq 0 ] ; then
|
||||||
rm -rf /etc/root
|
rm -rf /etc/root
|
||||||
else
|
else
|
||||||
zenity --title "zenidrv-g203-prodigy ${VERSION} (${M_DATE})" --warning --width=340 --text "Administrator permissions are required"
|
zenity --title "zenidrv-g203-prodigy ${VERSION} (${M_DATE})" --window-icon=${iconPath} --warning --width=340 --text "Administrator permissions are required"
|
||||||
echo ""
|
echo ""
|
||||||
echo "* zenidrv-g203-prodigy ${VERSION} (${M_DATE}) (GPL v2.0)"
|
echo "* zenidrv-g203-prodigy ${VERSION} (${M_DATE}) (GPL v2.0)"
|
||||||
echo ""
|
echo ""
|
||||||
|
@ -34,11 +36,11 @@ 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=330 --list --title "zenidrv-g203-prodigy ${VERSION} ($M_DATE)" \
|
||||||
--column "Select effect or option :" "Solid" "Cycle" "Breathe" "Intro (On)" "Intro (Off)" "Set DPI" \
|
--window-icon=${iconPath} --column "Select effect or option :" "Solid" "Cycle" "Breathe" "Intro (On)" "Intro (Off)" "Set DPI" \
|
||||||
"Light off" "Exit")
|
"Light off" "Exit")
|
||||||
if [ "${opcion}" == "Solid" ] ; then
|
if [ "${opcion}" == "Solid" ] ; then
|
||||||
color_selected=$(zenity --width=260 --height=520 --list --title "zenidrv-g203-lightsync ${VERSION} ($M_DATE)" \
|
color_selected=$(zenity --width=260 --height=520 --list --title "zenidrv-g203-lightsync ${VERSION} ($M_DATE)" \
|
||||||
--column "Select color from list :" "Black" "White" "Red" "Lime" "Blue" "Yellow" "Cyan" "Magenta" \
|
--window-icon=${iconPath} --column "Select color from list :" "Black" "White" "Red" "Lime" "Blue" "Yellow" "Cyan" "Magenta" \
|
||||||
"Silver" "Gray" "Maroon" "Olive" "Green" "Purple" "Teal" "Navy" )
|
"Silver" "Gray" "Maroon" "Olive" "Green" "Purple" "Teal" "Navy" )
|
||||||
if [ "${color_selected}" == "Black" ] ; then
|
if [ "${color_selected}" == "Black" ] ; then
|
||||||
color_apply="000000"
|
color_apply="000000"
|
||||||
|
@ -79,7 +81,7 @@ while [ ${showMenu} -eq 0 ] ; do
|
||||||
g203-led.py cycle
|
g203-led.py cycle
|
||||||
elif [ "${opcion}" == "Breathe" ] ; then
|
elif [ "${opcion}" == "Breathe" ] ; then
|
||||||
color_selected=$(zenity --width=260 --height=520 --list --title "zenidrv-g203-lightsync ${VERSION} ($M_DATE)" \
|
color_selected=$(zenity --width=260 --height=520 --list --title "zenidrv-g203-lightsync ${VERSION} ($M_DATE)" \
|
||||||
--column "Select color from list :" "Black" "White" "Red" "Lime" "Blue" "Yellow" "Cyan" "Magenta" \
|
--window-icon=${iconPath} --column "Select color from list :" "Black" "White" "Red" "Lime" "Blue" "Yellow" "Cyan" "Magenta" \
|
||||||
"Silver" "Gray" "Maroon" "Olive" "Green" "Purple" "Teal" "Navy" )
|
"Silver" "Gray" "Maroon" "Olive" "Green" "Purple" "Teal" "Navy" )
|
||||||
if [ "${color_selected}" == "Black" ] ; then
|
if [ "${color_selected}" == "Black" ] ; then
|
||||||
color_apply="000000"
|
color_apply="000000"
|
||||||
|
@ -121,7 +123,7 @@ while [ ${showMenu} -eq 0 ] ; do
|
||||||
elif [ "${opcion}" == "Intro (Off)" ] ; then
|
elif [ "${opcion}" == "Intro (Off)" ] ; then
|
||||||
g203-led.py intro off
|
g203-led.py intro off
|
||||||
elif [ "${opcion}" == "Set DPI" ] ; then
|
elif [ "${opcion}" == "Set DPI" ] ; then
|
||||||
dpi_number=$(zenity --entry --title "Set DPI (from 200 to 8000)" --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")
|
||||||
g203-led.py dpi ${dpi_number}
|
g203-led.py dpi ${dpi_number}
|
||||||
elif [ "${opcion}" == "Light off" ] ; then
|
elif [ "${opcion}" == "Light off" ] ; then
|
||||||
g203-led.py breathe 00FFFF 1000 0
|
g203-led.py breathe 00FFFF 1000 0
|
||||||
|
|
Loading…
Reference in New Issue
Block a user