45 lines
1.4 KiB
Bash
Executable File
45 lines
1.4 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
#############################################################
|
|
# Zenity interface for G203 (Prodigy & Ligthsync) driver #
|
|
# Last change: 28-03-2021 #
|
|
# Author: q3aql #
|
|
# Contact: q3aql@protonmail.ch #
|
|
# License: GPL v2.0 #
|
|
#############################################################
|
|
VERSION="1.0"
|
|
M_DATE="060721"
|
|
|
|
# Variables
|
|
iconPath="/usr/share/icons/logitech/logitech-black.png"
|
|
|
|
# Function to check admin rights
|
|
function rootMessage() {
|
|
mkdir -p /etc/root &> /dev/null
|
|
administrador=$?
|
|
if [ ${administrador} -eq 0 ] ; then
|
|
rm -rf /etc/root
|
|
else
|
|
zenity --title "zenidrv-g203 v${VERSION} (${M_DATE})" --window-icon=${iconPath} --warning --width=340 --text "Administrator permissions are required"
|
|
echo ""
|
|
echo "* zenidrv-g203 v${VERSION} (${M_DATE}) (GPL v2.0)"
|
|
echo ""
|
|
echo "* Administrator permissions are required"
|
|
echo ""
|
|
exit
|
|
fi
|
|
}
|
|
|
|
rootMessage
|
|
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)"
|
|
createLink=$?
|
|
if [ ${createLink} -eq 1 ] ; then
|
|
zenidrv-g203-prodigy
|
|
else
|
|
zenidrv-g203-lightsync
|
|
fi
|
|
|
|
|
|
|