zenidrv-g203/zenidrv-g203
2021-08-24 15:12:34 +02:00

45 lines
1.4 KiB
Bash
Executable File

#!/bin/bash
#############################################################
# Zenity interface for G203 (Prodigy & Ligthsync) driver #
# Last change: 24-08-2021 #
# Author: q3aql #
# Contact: q3aql@duck.com #
# License: GPL v2.0 #
#############################################################
VERSION="1.3"
M_DATE="240821"
# 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