Added a header, did some code cleanup.

This commit is contained in:
Storm Dragon 2020-12-12 03:17:31 -05:00
parent 6401a61cac
commit 3509cccf96

View File

@ -1,4 +1,22 @@
#!/usr/bin/env bash #!/usr/bin/env bash
#
# Copyright 2020, Stormux, <storm_dragon@linux-a11y.org>
#
# This is free software; you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free
# Software Foundation; either version 3, or (at your option) any later
# version.
#
# This software is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this package; see the file COPYING. If not, write to the Free
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
#
# Dialog accessibility # Dialog accessibility
export DIALOGOPTS='--no-lines --visit-items' export DIALOGOPTS='--no-lines --visit-items'
@ -363,23 +381,6 @@ add_launcher() {
fi fi
} }
automate_installer() {
# Function arguments are the keys to be pressed.
sleep 15
declare -a keyList
for i in ${@} ; do
case "$i" in
"alt+f") keyList+=("sleep 15 key ${i}");;
"space") keyList+=("sleep 1 key ${i}");;
*"+"*) keyList+=("sleep 1 key ${i}");;
*) xdotool sleep 1 type ${i};;
esac
done
xdotool ${keyList[*]} &
# call wineserver -w in case something failed here, the user will have a chance to try to fix it.
wineserver -w
}
# Check for updates # Check for updates
update update
# If display isn't set assume we are launching from console and an X environment is running using display :0 # If display isn't set assume we are launching from console and an X environment is running using display :0