changed wrapper and include paths to the stormux name.

This commit is contained in:
Storm Dragon 2020-04-02 15:59:24 -04:00
parent da5f36f7e9
commit bda6672204
211 changed files with 56 additions and 10245 deletions

View File

@ -1,37 +0,0 @@
#!/bin/bash
# about.sh
# Description: Provides nicely formatted version information.
#
# Copyright 2019, F123 Consulting, <information@f123.org>
# Copyright 2019, Storm Dragon, <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.
#
#--code--
# Multilanguage support.
export TEXTDOMAIN=about.sh
export TEXTDOMAINDIR=/usr/share/locale
. gettext.sh
[[ -r "/etc/timestamp-f123light" ]] && version="$(</etc/timestamp-f123light)"
version="${version:-0000000000}"
version="${version::2}.${version:2:2}.${version:4:2}.${version:6:2}.${version:8:2}"
gettext -e "F123Light Copyright F123 Consulting\n\nVersion: "
echo "$version"
exit 0

View File

@ -1,82 +0,0 @@
#!/bin/bash
# backup-manager.sh
# Description:
#
# Copyright 2019, F123 Consulting, <information@f123.org>
# Copyright 2019, Storm Dragon, <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.
#
#--code--
# Load functions and reusable code:
if [[ -d /usr/lib/F123-includes/ ]]; then
for i in /usr/lib/F123-includes/*.sh ; do
source $i
done
fi
# the gettext essentials
export TEXTDOMAIN=backup-manager
export TEXTDOMAINDIR=/usr/share/locale
source gettext.sh
# Log writing function
log() {
# Usage: command | log for just stdout.
# Or command |& log for stderr and stdout.
while read -r line ; do
echo "$line" | sudo tee -a "$logFile" &> /dev/null
done
}
# Log file name is /var/log/scriptname
logFile="/var/log/${0##*/}"
# Clear previous logs
echo -n | sudo tee "$logFile" &> /dev/null
# See if we can find a previous backup.
destination="$(find /media -type d -name "storeBackup" -print -quit)"
# If destination is set, prompt to make sure the backup should be done here.
if [[ -n "$destination" ]]; then
echo "Previous backup found at $destination" | log
[[ "$(yesno "$(gettext "A previous backup exists. Would you like to backup everything to ") $destination?")" != "Yes" ]] && { unset destination; echo "Destination cleared per user request." | log; }
fi
# If destination is empty there is no previous backup, so prompt for a new one.
if [[ -z "$destination" ]]; then
echo "No previous backup found. Generating a list of possible backup drives from /media" | log
declare -a driveList
for i in $(find /media -maxdepth 1 ! -path /media -type d 2> /dev/null) ; do
echo "$i" | log
driveList+=($i $i)
done
# Present list of destinations to the user.
destination="$(menulist ${driveList[@]})"
fi
# If destination is still empty exit
if [[ -z "$destination" ]]; then
echo "No drive selected, user canceled." | log
exit 0
fi
msgbox "$(gettext "Starting backup. This could take a long time..")"
sudo storeBackup.pl -f /etc/F123-Config/storeBackup.conf --backupDir "$destination"
exit 0

View File

@ -1,66 +0,0 @@
#!/bin/bash
# change-mode: Configuration utility to change the menu and available services.
#
# Copyright 2019, F123 Consulting, <information@f123.org>
# Copyright 2019, Storm Dragon, <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.
#
#--code--
export TEXTDOMAIN=change-mode
export TEXTDOMAINDIR=/usr/share/locale
. gettext.sh
# Load F123 includes
for i in /usr/lib/F123-includes/*.sh ; do
source $i
done
if [[ "$(whoami)" != "root" ]]; then
msgbox "Please run this script as root."
exit 0
fi
# If $1 exists check for it and set mode if it exists.
if [[ -n "$1" ]]; then
if [[ -x "/usr/lib/F123-wrappers/pdmenu_$1.sh" ]]; then
sed -i "s#preproc:/usr/lib/F123-wrappers/pdmenu_.*\.sh#preproc:/usr/lib/F123-wrappers/pdmenu_${1}.sh#" /etc/pdmenurc
echo -n "$1" | sudo tee /etc/mode &> /dev/null
else
echo "menu mode $1 not found. Please make sure the file exists and is executable."
exit 1
fi
exit 0
fi
# Create an array of menus.
declare -a modeList
for i in /usr/lib/F123-wrappers/pdmenu_*.sh ; do
i="${i##*_}"
i="${i%.sh}"
modeList+=($i)
done
mode="$(menulist $(for i in ${modeList[@]} Cancel ; do echo "$i $i";done))"
# Check for cancelation conditions.
if [[ "$mode" == "Cancel" || -z "$mode" ]]; then
exit 0
fi
sed -i "s#preproc:/usr/lib/F123-wrappers/pdmenu_.*\.sh#preproc:/usr/lib/F123-wrappers/pdmenu_${mode}.sh#" /etc/pdmenurc
exit 0

View File

@ -1,91 +0,0 @@
#!/bin/bash
# chuser.sh
# Description: Changes the username to something new at login
#
# Copyright 2019, F123 Consulting, <information@f123.org>
# Copyright 2019, Storm Dragon, <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.
#
#--code--
# Load functions and reusable code:
if [[ -d /usr/lib/F123-includes/ ]]; then
for i in /usr/lib/F123-includes/*.sh ; do
source $i
done
fi
# the gettext essentials
export TEXTDOMAIN=chuser
export TEXTDOMAINDIR=/usr/share/locale
source gettext.sh
# Log writing function
log() {
# Usage: command | log for just stdout.
# Or command |& log for stderr and stdout.
while read -r line ; do
echo "$line" | sudo tee -a "$logFile" &> /dev/null
done
}
# Log file name is /var/log/scriptname
logFile="/var/log/${0##*/}"
# Clear previous logs
echo -n | sudo tee "$logFile" &> /dev/null
# The user can not be logged in when the name change occurs.
# Write a file to /etc/cron.d/chuser
# The file will run at boot, change the username, and delete itself.
if [[ "$(whoami)" == "root" ]]; then
gettext -e "Please run this script as the user you would like to rename, not as root.\n"
echo "Can not rename root user." | log
exit 1
fi
oldUser="$USER"
echo "Current username is $oldUser" | log
groups="$(groups "$oldUser")"
groups="${groups// /,}"
echo "Groups to migrate with the new user are: $groups" | log
newUser="$1"
echo "New user is $newUser" | log
if ! [[ "$newUser" =~ ^[a-z][-a-z0-9]*$ ]]; then
echo "Username $newUser failed validation." | log
exit 1
fi
echo "Username $newUser passed validation." | log
echo "Writing /etc/cron.d/0chuser" | log
cat << EOF | sudo tee /etc/cron.d/0chuser &> /dev/null
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
@reboot root usermod -a -G $groups -m -d /home/$newUser -l $newUser $oldUser && sed -E -i "s/autologin +[a-zA-Z0-9-]+/autologin $newUser/g" /etc/systemd/system/getty@tty*.service.d/override.conf; rm -f /etc/cron.d/0chuser;reboot
EOF
# Files in cron.d must be 644 to work.
sudo chmod 644 /etc/cron.d/0chuser && echo "Setting file permissions on /etc/cron.d/0chuser to 644" | log
# Reboot the computer so the script can run
sudo reboot
exit 0

View File

@ -1,52 +0,0 @@
#!/bin/bash
# configure-email.sh
# Description: Select prefered email client and configure it.
#
# Copyright 2018, F123 Consulting, <information@f123.org>
# Copyright 2018, Storm Dragon, <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.
#
#--code--
# Load functions and reusable code:
source /usr/lib/F123-includes/script_functions.sh
# List of possible email clients.
clientList=(
mutt
thunderbird
)
client="$(menulist $(for i in ${clientList[@]} ; do echo "$i $i"; done))"
# Set the new selection as the client in preferences
sed -i "s/\[emailClient\]=.*/[emailClient]=\"$client\"/" ~/.preferences
# Open or configure the selected client.
case "${client}" in
"mutt")
[[ ! -d ~/.mutt ]] && command fleacollar
command mutt;;
"thunderbird")
python /usr/share/fenrirscreenreader/tools/fenrir-ignore-screen &> /dev/null
echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
command startx /usr/lib/F123-wrappers/xlauncher thunderbird
python /usr/share/fenrirscreenreader/tools/fenrir-unignore-screen &> /dev/null
echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock;;
esac
exit 0

View File

@ -1,61 +0,0 @@
#!/bin/bash
# configure-passwords
#
# Copyright 2018, F123 Consulting, <information@f123.org>
# Copyright 2018, Storm Dragon, <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.
#
#--code--
export TEXTDOMAIN=configure-passwords
export TEXTDOMAINDIR=/usr/share/locale
. gettext.sh
# Load F123 includes
for i in /usr/lib/F123-includes/*.sh ; do
source $i
done
set_password_with_text() {
local passOne="one"
local passTwo="two"
while [[ "$passOne" != "$passTwo" ]]; do
echo
read -ep "$(eval_gettext "Enter password for $1: ")" passOne
read -ep "$(eval_gettext "Enter password for $1 again: ")" passTwo
if [[ "$passOne" != "$passTwo" ]]; then
echo "$(gettext "Passwords do not match")"
fi
done
echo "$1:$passOne" | sudo chpasswd
}
# Provide possibility for setting passwords using plain text and readline navigation.
showPasswords="$(yesno "$(gettext "Do you want to hear your password spoken out-loud as you type it? This would make entering the password easier for some persons, but it is also a security risk if your computer has a screen where people can read what you write, or if someone is hearing what you are typing.")")"
userName="$(menulist $(awk -v OFS=' ' -F':' '{ if ( $3 >= 1000 && $3 <= 60000 && $7 != "/sbin/nologin" && $7 != "/bin/false" ) print $1, $1; }' /etc/passwd) Cancel cancel)"
# Check for cancelation conditions.
if [[ "$userName" == "Cancel" || -z "$userName" ]]; then
exit 0
fi
# If we don't have to provide plain text, just let the system do it's thing.
if [[ "$showPasswords" != "Yes" ]]; then
sudo passwd $userName
else
set_password_with_text $userName
fi
exit 0

View File

@ -1,97 +0,0 @@
#!/bin/bash
# configure-pianobar.sh
# Description: Easily configure pianobar.
#
# Copyright 2018, F123 Consulting, <information@f123.org>
# Copyright 2018, Storm Dragon, <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.
#
#--code--
# Load functions and reusable code:
source /usr/lib/F123-includes/script_functions.sh
write_configuration() {
cat << EOF > "${configPath}/config"
user = $1
password = $2
event_command = $configPath/eventcmd.sh
audio_quality = high
act_songban = !
EOF
}
create_eventcmd() {
echo '#!/bin/bash
# create variables
while read L; do
k="$(echo "$L" | cut -d "=" -f 1)"
v="$(echo "$L" | cut -d "=" -f 2)"
export "$k=$v"
done < <(grep -e "^\(title\|artist\|album\|stationName\|pRet\|pRetStr\|wRet\|wRetStr\|songDuration\|songPlayed\|rating\|coverArt\|stationCount\|station[0-9]*\)=" /dev/stdin) # do not overwrite $1
album="${album% \(*}"
artist="${artist% \(*}"
case "$1" in
"songstart")
echo "$artist\\$title\\$album\\$stationName" > '"$configPath"'/nowplaying
grep -iqs "^${artist}$" '"$configPath"'/banlist.txt && echo -n "!" > '"$configPath"'/ctl
grep -iqs "^${artist}$" '"$configPath"'/lovelist.txt && echo -n "+" > '"$configPath"'/ctl
;;
"songfinish")
rm '"$configPath/nowplaying"'
;;' > "$configPath/eventcmd.sh"
echo "\"songlove\")
$0 -M
;;" >> "$configPath/eventcmd.sh"
echo '*)
if [ "$pRet" -ne 1 ]; then
echo "$1 failed"
elif [ "$wRet" -ne 1 ]; then
echo "$a failed, network error."
fi
;;
esac
exit 0' >> "$configPath/eventcmd.sh"
chmod 700 "$configPath/eventcmd.sh"
}
configPath="${XDG_CONFIG_HOME:-$HOME/.config}/pianobar"
if [[ -d "$configPath" ]]; then
[[ "$(yesno "A configuration file already exists, would you like to replace it?")" == "Yes" ]] && rm -rf "$configPath"
fi
if [[ ! -d "$configPath" ]]; then
email="$(inputbox "Please enter your Pandor account name. (email address)")"
[[ -z "email" ]] && exit 0
password="$(passwordbox "Please enter your Pandora password.")"
[[ -z "password" ]] && exit 0
mkdir -p "$configPath" &> /dev/null
mkfifo "$configPath/ctl" &> /dev/null
write_configuration "$email" "$password"
create_eventcmd
# Find out if we need a proxy
country="$(curl -s ipinfo.io | grep '"country":' | cut -d '"' -f4)"
if [[ "${country^^}" != "US" ]]; then
proxy="$(curl -s "https://gimmeproxy.com/api/getProxy?country=US" | grep '"ip":' | cut -d '"' -f4)"
echo "control_proxy = ${proxy}:80" >> "$configPath/config"
fi
msgbox "Pianobar has been configured."
fi
exit 0

View File

@ -1,92 +0,0 @@
#!/bin/bash
# configure-security
#
# Copyright 2018, F123 Consulting, <information@f123.org>
# Copyright 2018, Storm Dragon, <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.
#
#--code--
export TEXTDOMAIN=configure-security
export TEXTDOMAINDIR=/usr/share/locale
. gettext.sh
# Load F123 includes
for i in /usr/lib/F123-includes/*.sh ; do
source $i
done
# Log writing function
log() {
while read -r line ; do
echo "$line" | sudo tee -a "$logFile" &> /dev/null
done
}
# Log file name is /var/log/scriptname
logFile="/var/log/${0##*/}"
# Clear previous logs
echo -n | sudo tee "$logFile" &> /dev/null
# How was this script called?
CALLED=${0##*/}
disable_password() {
echo "%wheel ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/f123
msgbox "$(gettext "Passwords are no longer required to perform administrative tasks.")"
echo "Disabled password requirements for sudo." | log
}
require_password() {
echo "%wheel ALL=(ALL) ALL" | sudo tee /etc/sudoers.d/f123
msgbox "$(gettext "Passwords are now required to perform administrative tasks.")"
echo "Enabled password requirements for sudo." | log
}
disable_autologin() {
sudo rm -f /etc/systemd/system/getty@tty*.service.d/override.conf 2> /dev/null
msgbox "$(gettext "You will need to enter username and password at login for this computer.")"
echo "Disabled autologin." | log
}
enable_autologin() {
local currentUser="$USER"
for i in {1..12} ; do
cat << EOF | sudo tee "/etc/systemd/system/getty@tty$i.service.d/override.conf" &> /dev/null
[Service]
ExecStart=
ExecStart=-/usr/bin/agetty --autologin $currentUser --noclear %I \$TERM
Type=idle
EOF
done
msgbox "$(gettext "You no longer need to enter username and password at login for this computer.")"
echo "Enabled autologin." | log
}
while : ; do
action="$(menulist "enable_autologin" "$(gettext "Login to your computer without the need of entering username and password.")" "disable_autologin" "$(gettext "Require a username and password to login to your computer.")" "require_password" "$(gettext "request a password when making changes that require administrator access.")" "disable_password" "$(gettext "Make changes to your computer that require administrator access without requiring a password. (security risk)")" "exit" "$(eval_gettext "Close \$CALLED")")"
if [[ "$action" != "exit" && -n "$action" ]]; then
echo "Running $action" | log
eval "$action"
else
echo "Exiting" | log
break
fi
done
exit 0

View File

@ -1,47 +0,0 @@
#!/bin/bash
# configure-sound
#
# Copyright 2018, F123 Consulting, <information@f123.org>
# Copyright 2018, Storm Dragon, <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.
#
#--code--
export TEXTDOMAIN=configure-sound
export TEXTDOMAINDIR=/usr/share/locale
. gettext.sh
# Load F123 includes
for i in /usr/lib/F123-includes/*.sh ; do
source $i
done
# How was this script called?
CALLED=${0##*/}
soundAction="$(menulist "USB_Soundcard" "$(gettext "USB_Soundcard")" "3MM_Jack" "$(gettext "3MM_Jack")")"
[[ -n "$soundAction" ]] || exit 0
if [[ "$soundAction" == "USB_Soundcard" ]]; then
echo "blacklist snd_bcm2835" | sudo tee /etc/modprobe.d/onboard_sound.conf &> /dev/null
else
[[ -f "/etc/modprobe.d/onboard_sound.conf" ]] && sudo rm -f "/etc/modprobe.d/onboard_sound.conf"
fi
[[ "$(yesno "$(gettext "You need to reboot for the changes to take affect. Would you like to reboot now?")")" == "Yes" ]] && sudo reboot
exit 0

View File

@ -1,134 +0,0 @@
#!/bin/bash
# configure-speech
#
# Copyright 2018, F123 Consulting, <information@f123.org>
# Copyright 2018, Storm Dragon, <storm_dragon@linux-a11y.org>
# Copyright 2018, Kyle, <kyle@free2.ml>
#
# 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.
#
#--code--
export TEXTDOMAIN=configure-speech
export TEXTDOMAINDIR=/usr/share/locale
. gettext.sh
# include script functions
for i in /usr/lib/F123-includes/*.sh ; do
source $i
done
# Log writing function
log() {
# Usage: command | log for just stdout.
# Or command |& log for stderr and stdout.
while read -r line ; do
echo "$line" | sudo tee -a "$logFile" &> /dev/null
done
}
# Log file name is /var/log/scriptname
logFile="/var/log/${0##*/}"
# Clear previous logs
echo -n | sudo tee "$logFile" &> /dev/null
# For additional speech options, add them to the synthArray variable, then add the available languages
# to a line in the case below matching the option
# Note that espeak-ng supports the most languages, so other case lines
# can start with espeak-ng and remove unsupported languages
synthArray=(
espeak-ng
mbrola
rhvoice
)
for i in ${synthArray[@]} ; do
case $i in
espeak-ng) languages=('af_ZA' 'ar_EG' 'de_DE' 'en_US' 'es_ES' 'fr_FR' 'hi_IN' 'hu_HU' 'id_ID' 'pl_PL' 'pt_BR' 'sw_TZ' 'tr_TR' 'vi_VN' 'zh_CN');;
mbrola) languages=('af_ZA' 'ar_EG' 'de_DE' 'en_US' 'es_ES' 'fr_FR' 'hi_IN' 'hu_HU' 'id_ID' 'pl_PL' 'pt_BR' 'tr_TR' 'zh_CN');;
rhvoice) languages=('en_US');;
esac
# Only add a speech provider option if it has at least one voice to speak the current language
for l in ${languages[@]}; do
if [[ "$l" == "${LANG::5}" ]]; then
# Dialog requires 2 options for the menu, we hide the tags, but it still needs to be sent twice.
speechOptions+=("$i" "$i")
fi
done
done
speechProvider="$(menulist ${speechOptions[@]})"
speechProvider="${speechProvider,,}"
case "$speechProvider" in
"mbrola") speechProvider="espeak-ng-mbrola-generic";;
esac
# Exit if speechProvider remains unset, i.e.
# if the user has pressed the escape key to close the menu
test -z $speechProvider && exit 0
# Set the chosen speech provider option.
sudo sed -i.bak "s/^[[:space:]]*DefaultModule [[:space:]]*\S*$/ DefaultModule $speechProvider/" /etc/speech-dispatcher/speechd.conf |& log
# For espeak-ng to use the correct voice on US English based systems, it needs to be set to default language en-us.
# For pretty much everything else though, it has to just be en.
# So, check and set that here.
case "${LANG::5}" in
"en_US")
if [[ "${speechProvider::9}" == "espeak-ng" ]]; then
spdLang=en-us
else
spdLang=en
fi
sudo sed -i "s/^[[:space:]]*DefaultLanguage [[:space:]]*\S*$/ DefaultLanguage $spdLang/" /etc/speech-dispatcher/speechd.conf |& log
;;
esac
# Clear any keypresses in the buffer:
read -t .001 continue
# Load the new settings:
sudo pkill -1 speech-dispatch |& log
spd-say -o $speechProvider -l $spdLang "$(gettext "If you can hear this press the 'Enter' key to try the new voice. If you do nothing, the voice will not be changed and you will be back to the menu in 10 seconds.")"
read -n1 -t10 continue
# Error code 142 means a key was not pressed, so restore from backup.
if [[ $? -ne 0 ]]; then
sudo mv /etc/speech-dispatcher/speechd.conf.bak /etc/speech-dispatcher/speechd.conf |& log
# Load the old settings:
sudo pkill -1 speech-dispatch |& log
exit 1
fi
# Restart Fenrir with new speech provider changes
clear
sudo systemctl restart fenrirscreenreader |& log
# Attempt to restart orca to apply changes if it is running:
if pgrep orca &> /dev/null ; then
for i in {0..11} ; do
DISPLAY=:$i orca --replace &
[[ $? -eq 0 ]] && break
done
fi
# Remove the backup file.
[[ -f /etc/speech-dispatcher/speechd.conf.bak ]] && sudo rm -f /etc/speech-dispatcher/speechd.conf.bak |& log
# Update the speech-dispatcher backup for restore accessibility.
sudo cp -v /etc/speech-dispatcher/speechd.conf /etc/F123-Config/backup/speechd.conf |& log
exit 0

View File

@ -1 +0,0 @@
docx.sh

View File

@ -1 +0,0 @@
docx.sh

View File

@ -1,81 +0,0 @@
#!/bin/bash
# docx.sh
# Description: Helper for ne macro to convert from markdown to docx
#
# Copyright 2019, F123 Consulting, <information@f123.org>
# Copyright 2019, Storm Dragon, <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.
#
#--code--
declare -A message=(
# Change the strings in quotes for different languages.
[confirm]="The file is available as"
[continue]="Press enter to continue."
[error]="The file was not converted."
[prompt]="Enter file name: "
)
# Get the file name for the conversion.
read -erp "${message[prompt]}" fileName
# If variable is empty, do not write a file.
if [[ -z "$fileName" ]]; then
read -p "$message[error] ${message[continue]}" continue
exit 0
fi
# make sure fileName is in proper format.
fileName="$HOME/Documents/${fileName##*/}"
# Find out what we are converting to.
convertTo="${0##*/}"
convertTo="${convertTo%%.*}"
# Add the proper extension if needed.
extension="${fileName,,}"
extension="${extension##*.}"
if [[ "$extension" != "$convertTo" ]]; then
fileName+=".$convertTo"
fi
# Make sure we don't overwrite anything.
i=2
oldFileName="$fileName"
while [[ -f "$fileName" ]]; do
fileName="${oldFileName}"
fileName="${fileName%.*}"
fileName="${fileName%-[0-9]*}"
fileName="${fileName}-${i}.${convertTo}"
((i++))
done
# Convert the file to html
if ! markdown -o ~/.ne/.tmp.txt.html ~/.ne/.tmp.txt ; then
read -p "${message[error]} ${message[continue]}" continue
exit 1
fi
# Convert the file to the specified extension.
if lowriter --headless --convert-to $convertTo ~/.ne/.tmp.txt.html --outdir ~/.ne &> /dev/null ]]; then
mv ~/.ne/.tmp.txt.$convertTo "$fileName"
read -p "${message[confirm]} $fileName. ${message[continue]}" continue
else
read -p "${message[error]} ${message[continue]}" continue
fi

View File

@ -1 +0,0 @@
docx.sh

View File

@ -1 +0,0 @@
docx.sh

View File

@ -1 +0,0 @@
docx.sh

View File

@ -1,77 +0,0 @@
#!/bin/bash
# language-chooser.sh
# Description: Set languages for fast language switching.
#
# Copyright 2019, F123 Consulting, <information@f123.org>
# Copyright 2019, Storm Dragon, <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.
#
#--code--
# Load functions and reusable code:
source /usr/lib/F123-includes/script_functions.sh
export TEXTDOMAIN=language-chooser
export TEXTDOMAINDIR=/usr/share/locale
source gettext.sh
[[ -r /etc/languages ]] && source /etc/languages
# If no languages are defined, add the system default to the array.
if [[ -z $languages ]]; then
languages=(${LANG%%.*})
fi
# Supported languages are in an array of their own.
supportedLanguages=(
ar_EG
en_US
es_MX
pt_BR
)
# Create the menu for each language.
options=""
for i in ${supportedLanguages[@]} ; do
k="Add"
for j in ${languages[@]} ; do
if [[ "$j" == "$i" ]]; then
k="Remove"
fi
done
# Add each option twice so it is proper format for the menu.
options+=("$k $i" "$(gettext "$k") $i")
done
ifs="$IFS"
IFS=$'\n'
choice="$(menulist ${options[@]})"
IFS="$ifs"
# Update the languages array.
if [[ "${choice%% *}" == "Add" ]]; then
languages+=(${choice##* })
else
for i in "${!languages[@]}"; do
if [[ "${languages[i]}" == "${choice##* }" ]]; then
unset languages[i]
fi
done
fi
# Write the updated language options to disk.
echo "languages=(${languages[@]})" | sudo tee /etc/languages &> /dev/null
exit 0

View File

@ -1,37 +0,0 @@
#!/bin/bash
# mail-launcher.sh
# Description Launch the correct mail client as specified in preferences.
#
# Copyright 2018, F123 Consulting, <information@f123.org>
# Copyright 2018, Storm Dragon, <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.
#
#--code--
source ~/.preferences
case "${preferences[emailClient]}" in
"mutt") echo "exec:::command mutt";;
"thunderbird")
echo 'exec:::python /usr/share/fenrirscreenreader/tools/fenrir-ignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
exec:::command $([[ -n $DEMOMODE ]] && echo '-v') startx /usr/lib/F123-wrappers/xlauncher thunderbird
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-unignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/ fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock';;
*) /usr/lib/F123-wrappers/configure-email.sh
esac
exit 0

View File

@ -1,66 +0,0 @@
#!/bin/bash
#!/bin/bash
# mud_loader.xh
# Description: Easlily load mud soundpacks.
#
# Copyright 2019, F123 Consulting, <information@f123.org>
# Copyright 2019, Storm Dragon, <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.
#
#--code--
# Load functions and reusable code:
if [[ -d /usr/lib/F123-includes/ ]]; then
for i in /usr/lib/F123-includes/*.sh ; do
source $i
done
fi
# the gettext essentials
export TEXTDOMAIN=tmp
export TEXTDOMAINDIR=/usr/share/locale
source gettext.sh
# Log writing function
log() {
# Usage: command | log for just stdout.
# Or command |& log for stderr and stdout.
while read -r line ; do
echo "$line" | sudo tee -a "$logFile" &> /dev/null
done
}
# Log file name is /var/log/scriptname
logFile="/var/log/${0##*/}"
# Clear previous logs
echo -n | sudo tee "" &> /dev/null
mudURL="$1"
mudName="${mudURL##*/}"
mudName="${mudName%.git}"
if [[ ! -d "$HOME/$mudName" ]]; then
git -C "$HOME" clone "$mudURL" &> /dev/null | dialog --progressbox "Downloading and installing game files, please wait..." 0 0
else
git -C "$HOME/$mudName" pull &> /dev/null | dialog --progressbox "Making sure everything is up to date, please wait..." 0 0
fi
cd "$HOME/$mudName"
mudLauncher="$(ls -1 *.tin)"
tt++ $mudLauncher
exit 0

View File

@ -1 +0,0 @@
mumble-manager.sh

View File

@ -1,125 +0,0 @@
#!/bin/bash
# mumble-manager
# Description: Make managing servers with barnard easy.
#
# Copyright 2019, F123 Consulting, <information@f123.org>
# Copyright 2019, Storm Dragon, <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.
#
#--code--
# Load functions and reusable code:
if [[ -d /usr/lib/F123-includes/ ]]; then
for i in /usr/lib/F123-includes/*.sh ; do
source $i
done
fi
# the gettext essentials
export TEXTDOMAIN=mumble-manager-add-server
export TEXTDOMAINDIR=/usr/share/locale
source gettext.sh
# Log writing function
log() {
# Usage: command | log for just stdout.
# Or command |& log for stderr and stdout.
while read -r line ; do
echo "$line" | sudo tee -a "$logFile" &> /dev/null
done
}
# Log file name is /var/log/scriptname
logFile="/var/log/${0##*/}"
# Clear previous logs
echo -n | sudo tee "$logFile" &> /dev/null
[[ -d ~/.config/barnard ]] || mkdir ~/.config/barnard
if [[ ! -r ~/.config/barnard/servers.conf ]]; then
echo "Adding default mumble server." | log
echo "declare -Ag mumbleServerList=(" > ~/.config/barnard/servers.conf
echo "[F123Light_Mumble_server]=\"mumble.f123.org:64738\"" >> ~/.config/barnard/servers.conf
echo ")" >> ~/.config/barnard/servers.conf
fi
source ~/.config/barnard/servers.conf
function add-server() {
local serverName="$(inputbox "$(gettext "Enter a name for the new server:")")"
[[ $? -ne 0 ]] && exit 0
serverName="${serverName//[[:space:]]/_}"
[[ $? -ne 0 ]] && exit 0
local serverAddress="$(inputbox "$(gettext "Enter the address of the server:")")"
[[ $? -ne 0 ]] && exit 0
local serverPort="${serverAddress##*:}"
if ! [[ "$serverPort" =~ ^[0-9]+ ]]; then
serverPort=64738
fi
mumbleServerList[$serverName]="${serverAddress}:${serverPort}"
echo "declare -Ag mumbleServerList=(" > ~/.config/barnard/servers.conf
for i in ${!mumbleServerList[@]} ; do
echo "[${i}]=\"${mumbleServerList[$i]}\"" >> ~/.config/barnard/servers.conf
done
echo ")" >> ~/.config/barnard/servers.conf
echo "Added server $serverName ${serverAddress}:${serverPort}" | log
msgbox "$(gettext "Added server") $serverName"
exit 0
}
connect() {
declare -a serverList
for i in ${!mumbleServerList[@]} ; do
serverList+=("$i" "$i")
done
local serverName="$(menulist ${serverList[@]})"
if [[ -z "$serverName" ]]; then
exit 0
fi
command barnard -username ${USER}-f123 -server ${mumbleServerList[$serverName]} |& log
exit 0
}
remove-server() {
declare -a serverList
for i in ${!mumbleServerList[@]} ; do
serverList+=("$i" "$i")
done
local serverName="$(menulist ${serverList[@]})"
if [[ -z "$serverName" ]]; then
exit 0
fi
unset mumbleServerList[$serverName]
echo "declare -Ag mumbleServerList=(" > ~/.config/barnard/servers.conf
for i in ${!mumbleServerList[@]} ; do
echo "[${i}]=\"${mumbleServerList[$i]}\"" >> ~/.config/barnard/servers.conf
done
echo ")" >> ~/.config/barnard/servers.conf
echo "Removed server $serverName ${serverAddress}:${serverPort}" | log
msgbox "$(gettext "Removed server") $serverName"
exit 0
}
# Extract the function to be called
action="${0##*mumble-manager}"
action="${action/-/}"
action="${action%.*}"
if [[ "$action" == "" ]]; then
action="connect"
fi
eval "$action"
exit 0

View File

@ -1 +0,0 @@
docx.sh

View File

@ -1 +0,0 @@
docx.sh

View File

@ -1 +0,0 @@
docx.sh

View File

@ -1,339 +0,0 @@
#!/bin/bash
# F123 menu
#
# Copyright 2018, F123 Consulting, <information@f123.org>
# Copyright 2018, Kyle, <kyle@free2.ml>
# Copyright 2018, Storm Dragon, <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.
#
#--code--
# Remember to make this script executable so pdmenu can access it.
# Remember for subshells and variables that need to be sent instead of used put a backslash before the dollar sign
export TEXTDOMAIN=pdmenurc
export TEXTDOMAINDIR=/usr/share/locale
. gettext.sh
cat << EOF
title:$(gettext "Welcome to F123Light")
# Define the main menu.
menu:main:$(gettext "F123 Light Main Menu"):$(gettext "Use the up and down arrow keys to select your choice and press the 'Enter' key to activate it.")
show:$(gettext "_Games Menu (G)")..::games
show:$(gettext "_Internet Menu (I)")..:$(gettext "Browser, e-mail and chat applications"):internet
show:$(gettext "_Media Menu (M)")..:$(gettext "Book reading, music and video applications"):media
show:$(gettext "_Office Menu (O)")..:$(gettext "text, calendar and spreadsheet applications"):office
exec:$(gettext "_File Manager (F)"):$(gettext "Copy, move and delete files"):clear;command dragonfm
group:$(gettext "Manage External _Drives (D)")
exec::makemenu: \
echo "menu:external:$(gettext "External"):$(gettext "Select Drive")"; \
rmdir /media/* &> /dev/null; \
c=0; \
for i in \$(find /media -maxdepth 1 ! -path /media -type d 2> /dev/null) ; do \
((c++)); \
j="\${i/\/media\//}"; \
echo "exec:_\$j::dragonfm '\$i'"; \
echo "exec:$(gettext "Safely remove") _\$j::umount '\$i' || sudo umount '\$i'"; \
done; \
[[ \$c -gt 0 ]] || echo "exec:\$(gettext "No external drives found")::clear"; \
echo "exit:$(gettext "Main Menu")..";
show:::external
remove:::external
endgroup
$([[ -r ~/.config/F123/menu ]] && echo "show:$(gettext "Custom Accessories Menu (_U)")..:$(gettext "User Defined Applications"):custom_accessories")
nop:$(gettext "Search")
exec:$(gettext "Search This _Computer (C)"):edit,pause:command recoll -t ~Search for what? :~
exec:$(gettext "Search the _Web (W)"):edit,pause:command ${preferences[searchEngine]} ~Search for what? :~
nop
show:$(gettext "_Settings Menu (S)")..:$(gettext "Configure this computer"):settings
show:$(gettext "_Help Menu (H)")..:$(gettext "Get Help with F123Light"):help
show:$(gettext "_Turn Off or Restart Computer (T)")..::power
nop
exit:$(gettext "E_xit to Command Line")
# Submenu for games.
menu:games:$(gettext "Games")):
exec:$(gettext "_Adventure (A)"):pause:clear;command adventure
exec:$(gettext "_Arithmetic Challenge! (A)"):pause:clear;command arithmetic
#exec:$(gettext "_Air Traffic Controler (Not screen reader friendly) (A)")::clear;command atc
#exec:$(gettext "_Backgammon (Not screen reader friendly) (B)")::clear;command backgammon
exec:$(gettext "_Battlestar (B)")::clear;command battlestar
#exec:$(gettext "_Boggle (Not screen reader friendly) (B)")::clear;command boggle
#exec:$(gettext "_Canfield (Not screen reader friendly) (C)")::clear;command canfield
#exec:$(gettext "_Cribbage (Not screen reader friendly) (C)")::clear;command cribbage
exec:$(gettext "_Go Fish (G)"):pause:clear;command go-fish
exec:$(gettext "_Gomoku (G)")::clear;command gomoku
exec:$(gettext "_Hangman (H)")::clear;command hangman
group:$(gettext "Horseshoes (_H)")
exec:::clear
exec:::/usr/lib/F123-wrappers/tips.sh horseshoes
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-ignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
exec:::command startx /usr/lib/F123-wrappers/x-self-voiced horseshoes
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-unignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
endgroup
#exec:$(gettext "_Hunt (Not screen reader friendly) (H)")::clear;command hunt
exec:$(gettext "Legends of _Kallisti (K)")::clear;command /usr/lib/F123-wrappers/mud-loader.sh https://gitlab.com/hjozwiak/tintin-kallisti-pack.git
exec:$(gettext "_Mille Bornes (M)")::clear;command mille
exec:$(gettext "_Number (N)")::clear;command number
exec:$(gettext "_Phantasia (P)")::clear;command phantasia
exec:$(gettext "_Phase of the Moon (P)"):pause:clear;command pom
exec:$(gettext "_Primes (P)")::clear;command primes
#exec:$(gettext "_Robots (Not screen reader friendly) (R)")::clear;command robots
exec:$(gettext "_Sail (S)")::clear;command sail
#exec:$(gettext "_Snake (Not screen reader friendly) (S)")::clear;command snake
#exec:$(gettext "_Tetris (Not screen reader friendly) (T)")::clear;command tetris-bsd
exec:$(gettext "_Trek (T)")::clear;command trek
#group:$(gettext "_Tux Math (T)")
#exec:::clear
#exec:::/usr/lib/F123-wrappers/tips.sh tuxmath
#exec:::python /usr/share/fenrirscreenreader/tools/fenrir-ignore-screen &> /dev/null
#exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
#exec:::command startx /usr/lib/F123-wrappers/x-self-voiced tuxmath --tts
#exec:::python /usr/share/fenrirscreenreader/tools/fenrir-unignore-screen &> /dev/null
#exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
#endgroup
group:$(gettext "_Tux Type (T)")
exec:::clear
exec:::/usr/lib/F123-wrappers/tips.sh tuxtype
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-ignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
exec:::command startx /usr/lib/F123-wrappers/x-self-voiced tuxtype --tts
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-unignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
endgroup
#exec:$(gettext "_Worm (Not screen reader friendly) (W)")::clear;command worm
exec:$(gettext "_Wumpus (W)")::clear;command wump
nop
exit:$(gettext "_Main Menu (M)")..
# submenu for internet applications.
menu:internet:$(gettext "Internet"):$(gettext "Internet programs")
group:$(gettext "E-_mail (M)")
$(/usr/lib/F123-wrappers/mail-launcher.sh)
endgroup
nop:$(gettext "Web Browsers")
group:$(gettext "_Basic Web Browser (W3M) (B)")
exec:::clear
exec:::/usr/lib/F123-wrappers/tips.sh w3m
exec:::command w3m
endgroup
group:$(gettext "_Full Web Browser (Firefox) (F)")
exec:::clear
exec:::/usr/lib/F123-wrappers/tips.sh firefox
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-ignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
exec:::command startx /usr/lib/F123-wrappers/xlauncher firefox
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-unignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
endgroup
nop:$(gettext "Communication")
#group:$(gettext "Telegram (T)")
#exec:::clear
#exec:::/usr/lib/F123-wrappers/tips.sh telegram-cli
#exec:::command telegram-cli
#endgroup
group:$(gettext "_Text Chat (Pidgin) (T)")
exec:::clear
exec:::/usr/lib/F123-wrappers/tips.sh pidgin
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-ignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
exec:::command startx /usr/lib/F123-wrappers/xlauncher pidgin
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-unignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
endgroup
show:$(gettext "Voice Chat (Mumble) (_V)")::mumble
nop
exit:$(gettext "_Main Menu (M)")..
menu:mumble:$(gettext "Voice Chat (Mumble)"):$(gettext "Voice Chat (Mumble)")
exec:$(gettext "Add Server (_A)")::/usr/lib/F123-wrappers/mumble-manager-add-server.sh
exec:$(gettext "Remove Server (_R)")::/usr/lib/F123-wrappers/mumble-manager-remove-server.sh
group:$(gettext "Connect (_C)")
exec:::clear
exec:::/usr/lib/F123-wrappers/tips.sh barnard
exec:::/usr/lib/F123-wrappers/mumble-manager.sh
exec:::reset
endgroup
nop
exit:$(gettext "Internet Menu (_M)")..
menu:media:$(gettext "Media"):$(gettext "Multi-media applications")
#group:$(gettext "CD _Audio Ripper (A)")
#exec:::clear
#exec:::/usr/lib/F123-wrappers/tips.sh ripit
#exec:::command ripit
#endgroup
#group:$(gettext "_Music Player (M)")
#exec:::clear
#exec:::/usr/lib/F123-wrappers/tips.sh cmus
#exec:::command cmus
#endgroup
group:$(gettext "Stringed _Instrument Tuner (I)")
exec:::clear
exec:::/usr/lib/F123-wrappers/tips.sh bashtuner
exec:::command bashtuner
endgroup
#group:$(gettext "_Pandora Internet Radio (P)")
#exec:::clear
#exec:::/usr/lib/F123-wrappers/tips.sh pianobar
#exec:::test -d "${XDG_CONFIG_HOME:-$HOME/.config}/pianobar" || command /usr/lib/F123-wrappers/configure-pianobar.sh
#exec:::command pianobar
#endgroup
#group:$(gettext "Youtube (_Audio Only) (A)")
#exec:::clear
#exec:::/usr/lib/F123-wrappers/tips.sh youtube-viewer
#exec:::command youtube-viewer -novideo
#endgroup
#group:$(gettext "Youtube (Full _Video) (V)")
#exec:::clear
#exec:::/usr/lib/F123-wrappers/tips.sh youtube-viewer
#exec:::python /usr/share/fenrirscreenreader/tools/fenrir-ignore-screen &> /dev/null
#exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
#exec:::command startx /usr/lib/F123-wrappers/xlauncher lxterminal -e youtube-viewer
#exec:::python /usr/share/fenrirscreenreader/tools/fenrir-unignore-screen &> /dev/null
#exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
#endgroup
nop:$(gettext "Book Readers")
group:$(gettext "_Book Reader (B)")
exec::makemenu: \
echo "menu:books:$(gettext "Books"):$(gettext "Select book to read")"; \
find \$HOME -type f \( -iname "*.epub" -o -iname "*.pdf" \) -print0 |\
while read -d \$'\0' i ; do \
j="\$(basename "\$i")"; \
echo "exec:_\${j%%.*}::/usr/lib/F123-wrappers/bookreader.sh '\$i'"; \
done; \
echo nop; \
echo "exit:$(gettext "Media Menu").."
show:::books
remove:::books
endgroup
nop
exit:$(gettext "_Main Menu (M)")..
menu:office:$(gettext "Office"):$(gettext "Word processing, calendar, etc")
#exec:$(gettext "_Month Calendar (M)"):pause:clear;command ncal
#exec:$(gettext "_Year Calendar (Y)"):pause:clear;command ncal -y
#group:$(gettext "_Spreadsheet (S)")
#exec:::clear
#exec:::/usr/lib/F123-wrappers/tips.sh sc-im
#exec:::command sc-im
#endgroup
group:$(gettext "_Text Editor (T)")
exec:::clear
exec:::/usr/lib/F123-wrappers/tips.sh ne
exec:::command ne --macro clear
endgroup
#group:$(gettext "_Word Processor (W)")
#exec:::clear
#exec:::/usr/lib/F123-wrappers/tips.sh wordgrinder
#exec:::command wordgrinder
#endgroup
nop:$(gettext "OCR")
group:$(gettext "Lios OCR (_L)")
exec:::clear
exec:::/usr/lib/F123-wrappers/tips.sh localc
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-ignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
exec:::command startx /usr/lib/F123-wrappers/xlauncher lios
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-unignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
endgroup
nop:$(gettext "Office Suite")
#group:$(gettext "_Spreadsheet (S)")
#exec:::clear
#exec:::/usr/lib/F123-wrappers/tips.sh localc
#exec:::python /usr/share/fenrirscreenreader/tools/fenrir-ignore-screen &> /dev/null
#exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
#exec:::command startx /usr/lib/F123-wrappers/xlauncher localc
#exec:::python /usr/share/fenrirscreenreader/tools/fenrir-unignore-screen &> /dev/null
#exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
#endgroup
#group:$(gettext "_Word Processor (W)")
#exec:::clear
#exec:::/usr/lib/F123-wrappers/tips.sh lowriter
#exec:::python /usr/share/fenrirscreenreader/tools/fenrir-ignore-screen &> /dev/null
#exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
#exec:::command startx /usr/lib/F123-wrappers/xlauncher lowriter
#exec:::python /usr/share/fenrirscreenreader/tools/fenrir-unignore-screen &> /dev/null
#exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
#endgroup
#group:$(gettext "Libre _Office (All Applications) (O)")
#exec:::clear
#exec:::/usr/lib/F123-wrappers/tips.sh $(shuf -n1 -e localc lowriter)
#exec:::python /usr/share/fenrirscreenreader/tools/fenrir-ignore-screen &> /dev/null
#exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
#exec:::command startx /usr/lib/F123-wrappers/xlauncher soffice
#exec:::python /usr/share/fenrirscreenreader/tools/fenrir-unignore-screen &> /dev/null
#exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
#endgroup
nop
exit:$(gettext "_Main Menu (M)")..
# submenu for configuring the computer.
menu:settings:$(gettext "Settings"):$(gettext "System configuration")
show:$(gettext "System Backup Menu (_Y)")..::backup
exec:$(gettext "Check for System _Updates (U)"):pause:clear;/usr/bin/update-f123light
exec:$(gettext "_Change Passwords (C)")::clear;/usr/lib/F123-wrappers/configure-passwords.sh
exec:$(gettext "E-_mail Configuration (M)")::clear;command configure-email
exec:$(gettext "Securit_y Configuration (Y)")::clear;/usr/lib/F123-wrappers/configure-security.sh
exec:$(gettext "Configure fast _language switching (L)")::clear;/usr/lib/F123-wrappers/language-chooser.sh
exec:$(gettext "Change System S_peech (P)")::clear;/usr/lib/F123-wrappers/configure-speech.sh
group:$(gettext "_Bluetooth manager (B)")
exec:::clear
exec:::/usr/lib/F123-wrappers/tips.sh blueman
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-ignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
exec:::command startx /usr/lib/F123-wrappers/blueman-launcher
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-unignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
endgroup
exec:$(gettext "Configure _Wifi (W)")::clear;sudo configure-wifi
nop
exit:$(gettext "_Main Menu (M)")..
menu:backup:$(gettext "Backup or restore your computer"):$(gettext "Backup or restore your computer")
exec:$(gettext "Backup your data and settings (_B)")::/usr/lib/F123-wrappers/backup-manager.sh
exec:$(gettext "Restore your data and settings (_R)")::/usr/lib/F123-wrappers/restore-manager.sh
exec:$(gettext "Full system backup (_F)")::/usr/lib/F123-wrappers/system-backup.sh
nop
exit:$(gettext "Settings Menu (_S)")..
menu:help:$(gettext "Get Help with F123 Light"):$(gettext "Get Help with F123Light")
exec:$(gettext "_Get Help (G)"):pause:command echo -e "For help please subscribe to the F123 visual email list\nhttps://groups.io/g/F123-Visual-English"
exec:$(gettext "Access text chat to request help (_C)")::command irssi --home /etc/F123-Config/irssi
exec:$(gettext "Request remote assistance with my computer (_R)"):pause:command sudo cfh
nop
exec:$(gettext "About F123Light (_A)"):pause:/usr/lib/F123-wrappers/about.sh
nop
exit:$(gettext "_Main Menu")..
menu:power:$(gettext "Turn off or Restart Computer"):$(gettext "Shutdown or restart your computer")
exec:$(gettext "_Lock (L)")::vlock -a
exec:$(gettext "Turn _Off (O)")::poweroff &> /dev/null || sudo poweroff
exec:$(gettext "_Restart (R)")::reboot &> /dev/null || sudo reboot
nop
exit:$(gettext "_Main Menu (M)")..
$(if [[ -r ~/.config/F123/menu ]]; then
echo "menu:custom_accessories:$(gettext "User Defined Applications"):$(gettext "User Defined Applications")"
cat ~/.config/F123/menu
echo "nop"
echo "exit:$(gettext "Main Menu (_M)").."
fi)
EOF

View File

@ -1,339 +0,0 @@
#!/bin/bash
# F123 menu
#
# Copyright 2018, F123 Consulting, <information@f123.org>
# Copyright 2018, Kyle, <kyle@free2.ml>
# Copyright 2018, Storm Dragon, <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.
#
#--code--
# Remember to make this script executable so pdmenu can access it.
# Remember for subshells and variables that need to be sent instead of used put a backslash before the dollar sign
export TEXTDOMAIN=pdmenurc
export TEXTDOMAINDIR=/usr/share/locale
. gettext.sh
cat << EOF
title:$(gettext "Welcome to F123Light")
# Define the main menu.
menu:main:$(gettext "F123 Light Main Menu"):$(gettext "Use the up and down arrow keys to select your choice and press the 'Enter' key to activate it.")
show:$(gettext "_Games Menu (G)")..::games
show:$(gettext "_Internet Menu (I)")..:$(gettext "Browser, e-mail and chat applications"):internet
show:$(gettext "_Media Menu (M)")..:$(gettext "Book reading, music and video applications"):media
show:$(gettext "_Office Menu (O)")..:$(gettext "text, calendar and spreadsheet applications"):office
exec:$(gettext "_File Manager (F)"):$(gettext "Copy, move and delete files"):clear;command dragonfm
group:$(gettext "Manage External _Drives (D)")
exec::makemenu: \
echo "menu:external:$(gettext "External"):$(gettext "Select Drive")"; \
rmdir /media/* &> /dev/null; \
c=0; \
for i in \$(find /media -maxdepth 1 ! -path /media -type d 2> /dev/null) ; do \
((c++)); \
j="\${i/\/media\//}"; \
echo "exec:_\$j::dragonfm '\$i'"; \
echo "exec:$(gettext "Safely remove") _\$j::umount '\$i' || sudo umount '\$i'"; \
done; \
[[ \$c -gt 0 ]] || echo "exec:\$(gettext "No external drives found")::clear"; \
echo "exit:$(gettext "Main Menu")..";
show:::external
remove:::external
endgroup
$([[ -r ~/.config/F123/menu ]] && echo "show:$(gettext "Custom Accessories Menu (_U)")..:$(gettext "User Defined Applications"):custom_accessories")
nop:$(gettext "Search")
exec:$(gettext "Search This _Computer (C)"):edit,pause:command recoll -t ~Search for what? :~
exec:$(gettext "Search the _Web (W)"):edit,pause:command ${preferences[searchEngine]} ~Search for what? :~
nop
show:$(gettext "_Settings Menu (S)")..:$(gettext "Configure this computer"):settings
show:$(gettext "_Help Menu (H)")..:$(gettext "Get Help with F123Light"):help
show:$(gettext "_Turn Off or Restart Computer (T)")..::power
nop
exit:$(gettext "E_xit to Command Line")
# Submenu for games.
menu:games:$(gettext "Games")):
exec:$(gettext "_Adventure (A)"):pause:clear;command adventure
exec:$(gettext "_Arithmetic Challenge! (A)"):pause:clear;command arithmetic
#exec:$(gettext "_Air Traffic Controler (Not screen reader friendly) (A)")::clear;command atc
#exec:$(gettext "_Backgammon (Not screen reader friendly) (B)")::clear;command backgammon
exec:$(gettext "_Battlestar (B)")::clear;command battlestar
#exec:$(gettext "_Boggle (Not screen reader friendly) (B)")::clear;command boggle
#exec:$(gettext "_Canfield (Not screen reader friendly) (C)")::clear;command canfield
#exec:$(gettext "_Cribbage (Not screen reader friendly) (C)")::clear;command cribbage
exec:$(gettext "_Go Fish (G)"):pause:clear;command go-fish
exec:$(gettext "_Gomoku (G)")::clear;command gomoku
exec:$(gettext "_Hangman (H)")::clear;command hangman
group:$(gettext "Horseshoes (_H)")
exec:::clear
exec:::/usr/lib/F123-wrappers/tips.sh horseshoes
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-ignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
exec:::command startx /usr/lib/F123-wrappers/x-self-voiced horseshoes
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-unignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
endgroup
#exec:$(gettext "_Hunt (Not screen reader friendly) (H)")::clear;command hunt
exec:$(gettext "Legends of _Kallisti (K)")::clear;command /usr/lib/F123-wrappers/mud-loader.sh https://gitlab.com/hjozwiak/tintin-kallisti-pack.git
exec:$(gettext "_Mille Bornes (M)")::clear;command mille
exec:$(gettext "_Number (N)")::clear;command number
exec:$(gettext "_Phantasia (P)")::clear;command phantasia
exec:$(gettext "_Phase of the Moon (P)"):pause:clear;command pom
exec:$(gettext "_Primes (P)")::clear;command primes
#exec:$(gettext "_Robots (Not screen reader friendly) (R)")::clear;command robots
exec:$(gettext "_Sail (S)")::clear;command sail
#exec:$(gettext "_Snake (Not screen reader friendly) (S)")::clear;command snake
#exec:$(gettext "_Tetris (Not screen reader friendly) (T)")::clear;command tetris-bsd
exec:$(gettext "_Trek (T)")::clear;command trek
group:$(gettext "_Tux Math (T)")
exec:::clear
exec:::/usr/lib/F123-wrappers/tips.sh tuxmath
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-ignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
exec:::command startx /usr/lib/F123-wrappers/x-self-voiced tuxmath --tts
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-unignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
endgroup
group:$(gettext "_Tux Type (T)")
exec:::clear
exec:::/usr/lib/F123-wrappers/tips.sh tuxtype
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-ignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
exec:::command startx /usr/lib/F123-wrappers/x-self-voiced tuxtype --tts
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-unignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
endgroup
#exec:$(gettext "_Worm (Not screen reader friendly) (W)")::clear;command worm
exec:$(gettext "_Wumpus (W)")::clear;command wump
nop
exit:$(gettext "_Main Menu (M)")..
# submenu for internet applications.
menu:internet:$(gettext "Internet"):$(gettext "Internet programs")
group:$(gettext "E-_mail (M)")
$(/usr/lib/F123-wrappers/mail-launcher.sh)
endgroup
nop:$(gettext "Web Browsers")
group:$(gettext "_Basic Web Browser (W3M) (B)")
exec:::clear
exec:::/usr/lib/F123-wrappers/tips.sh w3m
exec:::command w3m
endgroup
group:$(gettext "_Full Web Browser (Firefox) (F)")
exec:::clear
exec:::/usr/lib/F123-wrappers/tips.sh firefox
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-ignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
exec:::command startx /usr/lib/F123-wrappers/xlauncher firefox
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-unignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
endgroup
nop:$(gettext "Communication")
group:$(gettext "Telegram (T)")
exec:::clear
exec:::/usr/lib/F123-wrappers/tips.sh telegram-cli
exec:::command telegram-cli
endgroup
group:$(gettext "_Text Chat (Pidgin) (T)")
exec:::clear
exec:::/usr/lib/F123-wrappers/tips.sh pidgin
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-ignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
exec:::command startx /usr/lib/F123-wrappers/xlauncher pidgin
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-unignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
endgroup
show:$(gettext "Voice Chat (Mumble) (_V)")::mumble
nop
exit:$(gettext "_Main Menu (M)")..
menu:mumble:$(gettext "Voice Chat (Mumble)"):$(gettext "Voice Chat (Mumble)")
exec:$(gettext "Add Server (_A)")::/usr/lib/F123-wrappers/mumble-manager-add-server.sh
exec:$(gettext "Remove Server (_R)")::/usr/lib/F123-wrappers/mumble-manager-remove-server.sh
group:$(gettext "Connect (_C)")
exec:::clear
exec:::/usr/lib/F123-wrappers/tips.sh barnard
exec:::/usr/lib/F123-wrappers/mumble-manager.sh
exec:::reset
endgroup
nop
exit:$(gettext "Internet Menu (_M)")..
menu:media:$(gettext "Media"):$(gettext "Multi-media applications")
group:$(gettext "CD _Audio Ripper (A)")
exec:::clear
exec:::/usr/lib/F123-wrappers/tips.sh ripit
exec:::command ripit
endgroup
group:$(gettext "_Music Player (M)")
exec:::clear
exec:::/usr/lib/F123-wrappers/tips.sh cmus
exec:::command cmus
endgroup
group:$(gettext "Stringed _Instrument Tuner (I)")
exec:::clear
exec:::/usr/lib/F123-wrappers/tips.sh bashtuner
exec:::command bashtuner
endgroup
group:$(gettext "_Pandora Internet Radio (P)")
exec:::clear
exec:::/usr/lib/F123-wrappers/tips.sh pianobar
exec:::test -d "${XDG_CONFIG_HOME:-$HOME/.config}/pianobar" || command /usr/lib/F123-wrappers/configure-pianobar.sh
exec:::command pianobar
endgroup
group:$(gettext "Youtube (_Audio Only) (A)")
exec:::clear
exec:::/usr/lib/F123-wrappers/tips.sh youtube-viewer
exec:::command youtube-viewer -novideo
endgroup
group:$(gettext "Youtube (Full _Video) (V)")
exec:::clear
exec:::/usr/lib/F123-wrappers/tips.sh youtube-viewer
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-ignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
exec:::command startx /usr/lib/F123-wrappers/xlauncher lxterminal -e youtube-viewer
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-unignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
endgroup
nop:$(gettext "Book Readers")
group:$(gettext "_Book Reader (B)")
exec::makemenu: \
echo "menu:books:$(gettext "Books"):$(gettext "Select book to read")"; \
find \$HOME -type f \( -iname "*.epub" -o -iname "*.pdf" \) -print0 |\
while read -d \$'\0' i ; do \
j="\$(basename "\$i")"; \
echo "exec:_\${j%%.*}::/usr/lib/F123-wrappers/bookreader.sh '\$i'"; \
done; \
echo nop; \
echo "exit:$(gettext "Media Menu").."
show:::books
remove:::books
endgroup
nop
exit:$(gettext "_Main Menu (M)")..
menu:office:$(gettext "Office"):$(gettext "Word processing, calendar, etc")
exec:$(gettext "_Month Calendar (M)"):pause:clear;command ncal
exec:$(gettext "_Year Calendar (Y)"):pause:clear;command ncal -y
group:$(gettext "_Spreadsheet (S)")
exec:::clear
exec:::/usr/lib/F123-wrappers/tips.sh sc-im
exec:::command sc-im
endgroup
group:$(gettext "_Text Editor (T)")
exec:::clear
exec:::/usr/lib/F123-wrappers/tips.sh ne
exec:::command ne --macro clear
endgroup
group:$(gettext "_Word Processor (W)")
exec:::clear
exec:::/usr/lib/F123-wrappers/tips.sh wordgrinder
exec:::command wordgrinder
endgroup
nop:$(gettext "OCR")
group:$(gettext "Lios OCR (_L)")
exec:::clear
exec:::/usr/lib/F123-wrappers/tips.sh localc
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-ignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
exec:::command startx /usr/lib/F123-wrappers/xlauncher lios
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-unignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
endgroup
nop:$(gettext "Office Suite")
group:$(gettext "_Spreadsheet (S)")
exec:::clear
exec:::/usr/lib/F123-wrappers/tips.sh localc
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-ignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
exec:::command startx /usr/lib/F123-wrappers/xlauncher localc
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-unignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
endgroup
group:$(gettext "_Word Processor (W)")
exec:::clear
exec:::/usr/lib/F123-wrappers/tips.sh lowriter
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-ignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
exec:::command startx /usr/lib/F123-wrappers/xlauncher lowriter
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-unignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
endgroup
group:$(gettext "Libre _Office (All Applications) (O)")
exec:::clear
exec:::/usr/lib/F123-wrappers/tips.sh $(shuf -n1 -e localc lowriter)
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-ignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
exec:::command startx /usr/lib/F123-wrappers/xlauncher soffice
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-unignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
endgroup
nop
exit:$(gettext "_Main Menu (M)")..
# submenu for configuring the computer.
menu:settings:$(gettext "Settings"):$(gettext "System configuration")
show:$(gettext "System Backup Menu (_Y)")..::backup
exec:$(gettext "Check for System _Updates (U)"):pause:clear;/usr/bin/update-f123light
exec:$(gettext "_Change Passwords (C)")::clear;/usr/lib/F123-wrappers/configure-passwords.sh
exec:$(gettext "E-_mail Configuration (M)")::clear;command configure-email
exec:$(gettext "Securit_y Configuration (Y)")::clear;/usr/lib/F123-wrappers/configure-security.sh
exec:$(gettext "Configure fast _language switching (L)")::clear;/usr/lib/F123-wrappers/language-chooser.sh
exec:$(gettext "Change System S_peech (P)")::clear;/usr/lib/F123-wrappers/configure-speech.sh
group:$(gettext "_Bluetooth manager (B)")
exec:::clear
exec:::/usr/lib/F123-wrappers/tips.sh blueman
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-ignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
exec:::command startx /usr/lib/F123-wrappers/blueman-launcher
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-unignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
endgroup
exec:$(gettext "Configure _Wifi (W)")::clear;sudo configure-wifi
nop
exit:$(gettext "_Main Menu (M)")..
menu:backup:$(gettext "Backup or restore your computer"):$(gettext "Backup or restore your computer")
exec:$(gettext "Backup your data and settings (_B)")::/usr/lib/F123-wrappers/backup-manager.sh
exec:$(gettext "Restore your data and settings (_R)")::/usr/lib/F123-wrappers/restore-manager.sh
exec:$(gettext "Full system backup (_F)")::/usr/lib/F123-wrappers/system-backup.sh
nop
exit:$(gettext "Settings Menu (_S)")..
menu:help:$(gettext "Get Help with F123 Light"):$(gettext "Get Help with F123Light")
exec:$(gettext "_Get Help (G)"):pause:command echo -e "For help please subscribe to the F123 visual email list\nhttps://groups.io/g/F123-Visual-English"
exec:$(gettext "Access text chat to request help (_C)")::command irssi --home /etc/F123-Config/irssi
exec:$(gettext "Request remote assistance with my computer (_R)"):pause:command sudo cfh
nop
exec:$(gettext "About F123Light (_A)"):pause:/usr/lib/F123-wrappers/about.sh
nop
exit:$(gettext "_Main Menu")..
menu:power:$(gettext "Turn off or Restart Computer"):$(gettext "Shutdown or restart your computer")
exec:$(gettext "_Lock (L)")::vlock -a
exec:$(gettext "Turn _Off (O)")::poweroff &> /dev/null || sudo poweroff
exec:$(gettext "_Restart (R)")::reboot &> /dev/null || sudo reboot
nop
exit:$(gettext "_Main Menu (M)")..
$(if [[ -r ~/.config/F123/menu ]]; then
echo "menu:custom_accessories:$(gettext "User Defined Applications"):$(gettext "User Defined Applications")"
cat ~/.config/F123/menu
echo "nop"
echo "exit:$(gettext "Main Menu (_M)").."
fi)
EOF

View File

@ -1,45 +0,0 @@
#!/bin/bash
# reminders
#
# Copyright 2018, F123 Consulting, <information@f123.org>
# Copyright 2018, Storm Dragon, <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.
#
#--code--
for i in /usr/lib/F123-includes/*.sh ; do
source "$i"
done
clear_calendar() {
[[ -f "$HOME/calendar" ]] && {
rm "$HOME/calendar";
msgbox "All reminders deleted.";
} || msgbox "No reminders found."
}
while [[ "$choice" != "exit" ]]; do
choice="$(menulist "Add Reminder" "Add something to your calendar" "Remove Reminder" "Remove something from your reminders" "Clear Reminders" "Remove everything from your reminders" "Exit" "Close this app")"
choice="${choice,,}"
choice="${choice// /_}"
if [[ "$choice" != "exit" && "$choice" != "" ]]; then
eval "$choice"
else
break
fi
done
exit 0

View File

@ -1,78 +0,0 @@
#!/bin/bash
# restore-manager.sh
# Description:
#
# Copyright 2019, F123 Consulting, <information@f123.org>
# Copyright 2019, Storm Dragon, <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.
#
#--code--
# Load functions and reusable code:
if [[ -d /usr/lib/F123-includes/ ]]; then
for i in /usr/lib/F123-includes/*.sh ; do
source $i
done
fi
# the gettext essentials
export TEXTDOMAIN=backup-manager
export TEXTDOMAINDIR=/usr/share/locale
source gettext.sh
# Log writing function
log() {
# Usage: command | log for just stdout.
# Or command |& log for stderr and stdout.
while read -r line ; do
echo "$line" | sudo tee -a "$logFile" &> /dev/null
done
}
# Log file name is /var/log/scriptname
logFile="/var/log/${0##*/}"
# Clear previous logs
echo -n | sudo tee "$logFile" &> /dev/null
set -o pipefail
# See if we can find a previous backup.
backupDir="$(find /media -type d -name "storeBackup/default" -print -quit)"
# If there is no backupdir we cannot proceed.
if [[ -n "$backupDir" ]]; then
echo "No backup points found. Exiting" | log
exit 1
fi
# Present a list of restore points to pick from
declare -a restorePoints
for i in $(ls -d "$backupDir/*/") ; do
restorePoints+=($i $i)
done
backupDate="$(menulist ${restorePoints[@]})"
if [[ "$backupDate" ]]; then
echo "User did not pick a restore point, exiting" | log
exit 1
fi
msgbox "$(gettext "Starting system restore. This could take a long time. Please do not power off your computer during this process.")"
sudo storeBackupRecover.pl -t /home -o -p 3 -v -r "$backupDir" |& log
exit 0

View File

@ -1 +0,0 @@
docx.sh

View File

@ -1,104 +0,0 @@
#!/bin/bash
# Select-language
#
# Copyright 2018, F123 Consulting, <information@f123.org>
# Copyright 2018, Storm Dragon, <storm_dragon@linux-a11y.org>
# Copyright 2018, Kyle, <kyle@free2.ml>
#
# 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.
#
#--code--
export TEXTDOMAIN=select-language
export TEXTDOMAINDIR=/usr/share/language
. gettext.sh
# Log writing function
log() {
while read -r line ; do
echo "$line" | sudo tee -a "$logFile" &> /dev/null
done
}
# Log file name is /var/log/scriptname
logFile="/var/log/${0##*/}"
# Clear previous logs
echo -n | sudo tee "$logFile" &> /dev/null
# For additional language options, add them to the for list and add a corresponding line to the case below the menulist
ifs="$IFS"
IFS=$'\n'
for l in "American English" "Brazilian Portuguese" "Castilian Spanish" "Egyptian Arabic" ; do
# Dialog requires 2 options for the menu, we hide the tags, but it still needs to be sent twice.
languages+=("$l" "$l")
done
language="$(dialog --visit-items --backtitle " " --no-tags --menu \
"$(gettext "Please press 'Enter' if you will use F123Light in English, or use the up and down arrow keys to select another language. Press 'Enter' once you have found the language you would like to use most often in this computer.")" \
0 0 0 ${languages[@]} --stdout)"
IFS="$ifs"
# The case that corresponds to the for loop above
case "$language" in
'American English') locale=en_US.UTF-8; speechProvider=rhvoice;;
'Brazilian Portuguese') locale=pt_BR.UTF-8; speechProvider=rhvoice;;
'Castilian Spanish') locale=es_ES.UTF-8; speechProvider=espeak-ng-mbrola-generic;;
'Egyptian Arabic') locale=ar_EG.UTF-8; speechProvider=espeak-ng-mbrola-generic;;
esac
# Exit if language remains unset, i.e.
# if the user has pressed the escape key to close the menu
if [[ -z "$language" ]]; then
echo "No language selected." | log
exit 0
fi
# Load the correct font.
# Load the correct custom keymap at boot if present
case "${locale%%.*}" in
"ar_EG") fontName="/usr/share/kbd/consolefonts/iso06.16.gz";;
*) fontName="lat2-16";;
esac
echo "FONT=${fontName}" | sudo tee "/etc/vconsole.conf" &> /dev/null
if [[ -f "/usr/share/kbd/keymaps/i386/qwerty/${locale%%.*}.map.gz" ]]; then
echo "KEYMAP=/usr/share/kbd/keymaps/i386/qwerty/${locale%%.*}.map.gz" | sudo tee -a "/etc/vconsole.conf" &> /dev/null
fi
sudo systemctl enable systemd-vconsole-setup.service |& log
# Set the chosen language for system locale and speech.
sudo sed -i -e "s/LANG=.*/LANG=${locale}/" /etc/locale.conf
case "${locale::5}" in
"en_US") sudo sed -i -e "s/^[#[:space:]]*DefaultLanguage [[:space:]]*\S*$/ DefaultLanguage en/" -e 's/\(.*Language\) \(.*\)\..*/\1\L\2/' "/etc/speech-dispatcher/speechd.conf" |& log
sudo cp /etc/fenrirscreenreader/settings/settings.conf /etc/F123-Config/backup/fenrir.conf
sudo sed -i 's/^\(#v\|v\)oice.*/voice=bdl/' /etc/fenrirscreenreader/settings/settings.conf |& log;;
"pt_BR") sudo sed -i -e "s/^[#[:space:]]*DefaultLanguage [[:space:]]*\S*$/ DefaultLanguage pt/" -e 's/\(.*Language\) \(.*\)\..*/\1\L\2/' "/etc/speech-dispatcher/speechd.conf" |& log
sudo cp /etc/fenrirscreenreader/settings/settings.conf /etc/F123-Config/backup/fenrir.conf
sudo sed -i 's/^voice=/#voice=/' /etc/fenrirscreenreader/settings/settings.conf |& log;;
*) sudo sed -i -e "s/^[#[:space:]]*DefaultLanguage [[:space:]]*\S*$/ DefaultLanguage ${locale::2}/" "/etc/speech-dispatcher/speechd.conf" |& log;;
esac
sudo sed -i "s/^[[:space:]]*DefaultModule [[:space:]]*\S*$/ DefaultModule $speechProvider/" /etc/speech-dispatcher/speechd.conf |& log
sudo cp /etc/fenrirscreenreader/punctuation/${locale::2}.conf /etc/fenrirscreenreader/punctuation/default.conf |& log
# Write to the firstboot flag file so that this script will be skipped when first-boot runs again after the system is rebooted
test -f ${HOME}/.firstboot && echo "set" > ${HOME}/.firstboot
# Language settings require reboot to fully take effect if the language is not American English.
if [[ "$language" != "American English" || "${LANG::5}" != "en_US" ]]; then
gettext -e 'Configuring the computer in your selected language...\n'
read -t 3 continue
sudo reboot
fi

View File

@ -1,63 +0,0 @@
#!/bin/bash
# tips.sh
# Description
#
# Copyright 2019, F123 Consulting, <information@f123.org>
# Copyright 2019, Storm Dragon, <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.
#
#--code--
# Load functions and reusable code:
source /usr/lib/F123-includes/script_functions.sh
source /usr/lib/F123-includes/preferences-manager.sh
source ~/.preferences
# Create the directory structure if it doesn't exist.
[[ -d ~/.config/F123 ]] || mkdir -p ~/.config/F123
# Load or create the current tipIndex.
if [[ -r ~/.config/F123/.${1}.tipindex ]]; then
tipIndex=$(<~/.config/F123/.${1}.tipindex)
else
tipIndex=0
fi
# Tips are on by default, so set the preference if it's not found.
if [[ -z "${preferences[tips]}" ]]; then
preferences[tips]=1
write_preferences
fi
# Get the path where tips are stored for the current locale and application name ($1).
tipPath="/usr/share/doc/F123/tips/${LANG}/${1}.txt"
if [[ ! -r "$tipPath" ]]; then
exit 0
fi
if (( ${preferences[tips]} )); then
mapfile -t tips < ${tipPath}
if [[ ${tipIndex} -ge ${#tips[@]} ]]; then
tipIndex=0
fi
echo "command say ${tips[$tipIndex]}" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
((tipIndex++))
echo -n "$tipIndex" > ~/.config/F123/.${1}.tipindex
fi
exit 0

View File

@ -1 +0,0 @@
docx.sh

View File

@ -1 +0,0 @@
docx.sh

View File

@ -1 +0,0 @@
docx.sh

View File

@ -1,42 +0,0 @@
#!/bin/bash
# blueman-launcher
#
# Copyright 2019, F123 Consulting, <information@f123.org>
# Copyright 2019, Storm Dragon, <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.
#
#--code--
# Check for required programs
for i in jwm orca startx ; do
command -v "$i" || {
echo "Please install $i and run $0 again."
exit 1
}
done
export GTK_MODULES=gail:atk-bridge
export GNOME_ACCESSIBILITY=1
export QT_ACCESSIBILITY=1
export QT_LINUX_ACCESSIBILITY_ALWAYS_ON=1
command jwm &
command xbindkeys &
# Try orca, but use orca -replace if it doesn't work.
pgrep orca || command orca&
command blueman-applet&
command blueman-manager
exit 0

View File

@ -1,45 +0,0 @@
#!/bin/bash
# F123 book reader
#
# Copyright 2018, F123 Consulting, <information@f123.org>
# Copyright 2018, Kyle, <kyle@free2.ml>
#
# 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.
#
#--code--
# It is safe to assume one parameter here,as this script is to be run from a generated menu of books.
# In any case, we take only one parameter, even if this script runs from a file manager.
book=$1
# Each book type must be extracted using a different method.
# Determine the book type and its extraction method using its file extension.
type=${book##*.}
# Extract the book and pipe the result into w3m depending on its type
# New types may be added here at any time.
case $type in
epub|Epub|EPUB) epub2txt -w 80 "$book" | w3m
;;
pdf|Pdf|PDF) pdftotext -layout "$book" - | w3m
;;
txt|Txt|TXT|HTML|Html|html) w3m "$book"
;;
# Insert new formats above this line
*) exit 1
;;
esac
exit 0

View File

@ -1,61 +0,0 @@
#!/bin/bash
# configure-passwords
#
# Copyright 2018, F123 Consulting, <information@f123.org>
# Copyright 2018, Storm Dragon, <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.
#
#--code--
export TEXTDOMAIN=configure-passwords
export TEXTDOMAINDIR=/usr/share/locale
. gettext.sh
# Load F123 includes
for i in /usr/lib/F123-includes/*.sh ; do
source $i
done
set_password_with_text() {
local passOne="one"
local passTwo="two"
while [[ "$passOne" != "$passTwo" ]]; do
echo
read -ep "$(eval_gettext "Enter password for $1: ")" passOne
read -ep "$(eval_gettext "Enter password for $1 again: ")" passTwo
if [[ "$passOne" != "$passTwo" ]]; then
echo "$(gettext "Passwords do not match")"
fi
done
echo "$1:$passOne" | sudo chpasswd
}
# Provide possibility for setting passwords using plain text and readline navigation.
showPasswords="$(yesno "$(gettext "Do you want to hear your password spoken out-loud as you type it? This would make entering the password easier for some persons, but it is also a security risk if your computer has a screen where people can read what you write, or if someone is hearing what you are typing.")")"
userName="$(menulist $(awk -v OFS=' ' -F':' '{ if ( $3 >= 1000 && $3 <= 60000 && $7 != "/sbin/nologin" && $7 != "/bin/false" ) print $1, $1; }' /etc/passwd) Cancel cancel)"
# Check for cancelation conditions.
if [[ "$userName" == "Cancel" || -z "$userName" ]]; then
exit 0
fi
# If we don't have to provide plain text, just let the system do it's thing.
if [[ "$showPasswords" != "Yes" ]]; then
sudo passwd $userName
else
set_password_with_text $userName
fi
exit 0

View File

@ -1,97 +0,0 @@
#!/bin/bash
# configure-pianobar.sh
# Description: Easily configure pianobar.
#
# Copyright 2018, F123 Consulting, <information@f123.org>
# Copyright 2018, Storm Dragon, <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.
#
#--code--
# Load functions and reusable code:
source /usr/lib/F123-includes/script_functions.sh
write_configuration() {
cat << EOF > "${configPath}/config"
user = $1
password = $2
event_command = $configPath/eventcmd.sh
audio_quality = high
act_songban = !
EOF
}
create_eventcmd() {
echo '#!/bin/bash
# create variables
while read L; do
k="$(echo "$L" | cut -d "=" -f 1)"
v="$(echo "$L" | cut -d "=" -f 2)"
export "$k=$v"
done < <(grep -e "^\(title\|artist\|album\|stationName\|pRet\|pRetStr\|wRet\|wRetStr\|songDuration\|songPlayed\|rating\|coverArt\|stationCount\|station[0-9]*\)=" /dev/stdin) # do not overwrite $1
album="${album% \(*}"
artist="${artist% \(*}"
case "$1" in
"songstart")
echo "$artist\\$title\\$album\\$stationName" > '"$configPath"'/nowplaying
grep -iqs "^${artist}$" '"$configPath"'/banlist.txt && echo -n "!" > '"$configPath"'/ctl
grep -iqs "^${artist}$" '"$configPath"'/lovelist.txt && echo -n "+" > '"$configPath"'/ctl
;;
"songfinish")
rm '"$configPath/nowplaying"'
;;' > "$configPath/eventcmd.sh"
echo "\"songlove\")
$0 -M
;;" >> "$configPath/eventcmd.sh"
echo '*)
if [ "$pRet" -ne 1 ]; then
echo "$1 failed"
elif [ "$wRet" -ne 1 ]; then
echo "$a failed, network error."
fi
;;
esac
exit 0' >> "$configPath/eventcmd.sh"
chmod 700 "$configPath/eventcmd.sh"
}
configPath="${XDG_CONFIG_HOME:-$HOME/.config}/pianobar"
if [[ -d "$configPath" ]]; then
[[ "$(yesno "A configuration file already exists, would you like to replace it?")" == "Yes" ]] && rm -rf "$configPath"
fi
if [[ ! -d "$configPath" ]]; then
email="$(inputbox "Please enter your Pandor account name. (email address)")"
[[ -z "email" ]] && exit 0
password="$(passwordbox "Please enter your Pandora password.")"
[[ -z "password" ]] && exit 0
mkdir -p "$configPath" &> /dev/null
mkfifo "$configPath/ctl" &> /dev/null
write_configuration "$email" "$password"
create_eventcmd
# Find out if we need a proxy
country="$(curl -s ipinfo.io | grep '"country":' | cut -d '"' -f4)"
if [[ "${country^^}" != "US" ]]; then
proxy="$(curl -s "https://gimmeproxy.com/api/getProxy?country=US" | grep '"ip":' | cut -d '"' -f4)"
echo "control_proxy = ${proxy}:80" >> "$configPath/config"
fi
msgbox "Pianobar has been configured."
fi
exit 0

View File

@ -1,37 +0,0 @@
#!/bin/bash
# about.sh
# Description: Provides nicely formatted version information.
#
# Copyright 2019, F123 Consulting, <information@f123.org>
# Copyright 2019, Storm Dragon, <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.
#
#--code--
# Multilanguage support.
export TEXTDOMAIN=about.sh
export TEXTDOMAINDIR=/usr/share/locale
. gettext.sh
[[ -r "/etc/timestamp-f123light" ]] && version="$(</etc/timestamp-f123light)"
version="${version:-0000000000}"
version="${version::2}.${version:2:2}.${version:4:2}.${version:6:2}.${version:8:2}"
gettext -e "F123Light Copyright F123 Consulting\n\nVersion: "
echo "$version"
exit 0

View File

@ -1,82 +0,0 @@
#!/bin/bash
# backup-manager.sh
# Description:
#
# Copyright 2019, F123 Consulting, <information@f123.org>
# Copyright 2019, Storm Dragon, <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.
#
#--code--
# Load functions and reusable code:
if [[ -d /usr/lib/F123-includes/ ]]; then
for i in /usr/lib/F123-includes/*.sh ; do
source $i
done
fi
# the gettext essentials
export TEXTDOMAIN=backup-manager
export TEXTDOMAINDIR=/usr/share/locale
source gettext.sh
# Log writing function
log() {
# Usage: command | log for just stdout.
# Or command |& log for stderr and stdout.
while read -r line ; do
echo "$line" | sudo tee -a "$logFile" &> /dev/null
done
}
# Log file name is /var/log/scriptname
logFile="/var/log/${0##*/}"
# Clear previous logs
echo -n | sudo tee "$logFile" &> /dev/null
# See if we can find a previous backup.
destination="$(find /media -type d -name "storeBackup" -print -quit)"
# If destination is set, prompt to make sure the backup should be done here.
if [[ -n "$destination" ]]; then
echo "Previous backup found at $destination" | log
[[ "$(yesno "$(gettext "A previous backup exists. Would you like to backup everything to ") $destination?")" != "Yes" ]] && { unset destination; echo "Destination cleared per user request." | log; }
fi
# If destination is empty there is no previous backup, so prompt for a new one.
if [[ -z "$destination" ]]; then
echo "No previous backup found. Generating a list of possible backup drives from /media" | log
declare -a driveList
for i in $(find /media -maxdepth 1 ! -path /media -type d 2> /dev/null) ; do
echo "$i" | log
driveList+=($i $i)
done
# Present list of destinations to the user.
destination="$(menulist ${driveList[@]})"
fi
# If destination is still empty exit
if [[ -z "$destination" ]]; then
echo "No drive selected, user canceled." | log
exit 0
fi
msgbox "$(gettext "Starting backup. This could take a long time..")"
sudo storeBackup.pl -f /etc/F123-Config/storeBackup.conf --backupDir "$destination"
exit 0

View File

@ -1,42 +0,0 @@
#!/bin/bash
# blueman-launcher
#
# Copyright 2019, F123 Consulting, <information@f123.org>
# Copyright 2019, Storm Dragon, <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.
#
#--code--
# Check for required programs
for i in jwm orca startx ; do
command -v "$i" || {
echo "Please install $i and run $0 again."
exit 1
}
done
export GTK_MODULES=gail:atk-bridge
export GNOME_ACCESSIBILITY=1
export QT_ACCESSIBILITY=1
export QT_LINUX_ACCESSIBILITY_ALWAYS_ON=1
command jwm &
command xbindkeys &
# Try orca, but use orca -replace if it doesn't work.
pgrep orca || command orca&
command blueman-applet&
command blueman-manager
exit 0

View File

@ -1,45 +0,0 @@
#!/bin/bash
# F123 book reader
#
# Copyright 2018, F123 Consulting, <information@f123.org>
# Copyright 2018, Kyle, <kyle@free2.ml>
#
# 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.
#
#--code--
# It is safe to assume one parameter here,as this script is to be run from a generated menu of books.
# In any case, we take only one parameter, even if this script runs from a file manager.
book=$1
# Each book type must be extracted using a different method.
# Determine the book type and its extraction method using its file extension.
type=${book##*.}
# Extract the book and pipe the result into w3m depending on its type
# New types may be added here at any time.
case $type in
epub|Epub|EPUB) epub2txt -w 80 "$book" | w3m
;;
pdf|Pdf|PDF) pdftotext -layout "$book" - | w3m
;;
txt|Txt|TXT|HTML|Html|html) w3m "$book"
;;
# Insert new formats above this line
*) exit 1
;;
esac
exit 0

View File

@ -1,66 +0,0 @@
#!/bin/bash
# change-mode: Configuration utility to change the menu and available services.
#
# Copyright 2019, F123 Consulting, <information@f123.org>
# Copyright 2019, Storm Dragon, <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.
#
#--code--
export TEXTDOMAIN=change-mode
export TEXTDOMAINDIR=/usr/share/locale
. gettext.sh
# Load F123 includes
for i in /usr/lib/F123-includes/*.sh ; do
source $i
done
if [[ "$(whoami)" != "root" ]]; then
msgbox "Please run this script as root."
exit 0
fi
# If $1 exists check for it and set mode if it exists.
if [[ -n "$1" ]]; then
if [[ -x "/usr/lib/F123-wrappers/pdmenu_$1.sh" ]]; then
sed -i "s#preproc:/usr/lib/F123-wrappers/pdmenu_.*\.sh#preproc:/usr/lib/F123-wrappers/pdmenu_${1}.sh#" /etc/pdmenurc
echo -n "$1" | sudo tee /etc/mode &> /dev/null
else
echo "menu mode $1 not found. Please make sure the file exists and is executable."
exit 1
fi
exit 0
fi
# Create an array of menus.
declare -a modeList
for i in /usr/lib/F123-wrappers/pdmenu_*.sh ; do
i="${i##*_}"
i="${i%.sh}"
modeList+=($i)
done
mode="$(menulist $(for i in ${modeList[@]} Cancel ; do echo "$i $i";done))"
# Check for cancelation conditions.
if [[ "$mode" == "Cancel" || -z "$mode" ]]; then
exit 0
fi
sed -i "s#preproc:/usr/lib/F123-wrappers/pdmenu_.*\.sh#preproc:/usr/lib/F123-wrappers/pdmenu_${mode}.sh#" /etc/pdmenurc
exit 0

View File

@ -1,91 +0,0 @@
#!/bin/bash
# chuser.sh
# Description: Changes the username to something new at login
#
# Copyright 2019, F123 Consulting, <information@f123.org>
# Copyright 2019, Storm Dragon, <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.
#
#--code--
# Load functions and reusable code:
if [[ -d /usr/lib/F123-includes/ ]]; then
for i in /usr/lib/F123-includes/*.sh ; do
source $i
done
fi
# the gettext essentials
export TEXTDOMAIN=chuser
export TEXTDOMAINDIR=/usr/share/locale
source gettext.sh
# Log writing function
log() {
# Usage: command | log for just stdout.
# Or command |& log for stderr and stdout.
while read -r line ; do
echo "$line" | sudo tee -a "$logFile" &> /dev/null
done
}
# Log file name is /var/log/scriptname
logFile="/var/log/${0##*/}"
# Clear previous logs
echo -n | sudo tee "$logFile" &> /dev/null
# The user can not be logged in when the name change occurs.
# Write a file to /etc/cron.d/chuser
# The file will run at boot, change the username, and delete itself.
if [[ "$(whoami)" == "root" ]]; then
gettext -e "Please run this script as the user you would like to rename, not as root.\n"
echo "Can not rename root user." | log
exit 1
fi
oldUser="$USER"
echo "Current username is $oldUser" | log
groups="$(groups "$oldUser")"
groups="${groups// /,}"
echo "Groups to migrate with the new user are: $groups" | log
newUser="$1"
echo "New user is $newUser" | log
if ! [[ "$newUser" =~ ^[a-z][-a-z0-9]*$ ]]; then
echo "Username $newUser failed validation." | log
exit 1
fi
echo "Username $newUser passed validation." | log
echo "Writing /etc/cron.d/0chuser" | log
cat << EOF | sudo tee /etc/cron.d/0chuser &> /dev/null
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
@reboot root usermod -a -G $groups -m -d /home/$newUser -l $newUser $oldUser && sed -E -i "s/autologin +[a-zA-Z0-9-]+/autologin $newUser/g" /etc/systemd/system/getty@tty*.service.d/override.conf; rm -f /etc/cron.d/0chuser;reboot
EOF
# Files in cron.d must be 644 to work.
sudo chmod 644 /etc/cron.d/0chuser && echo "Setting file permissions on /etc/cron.d/0chuser to 644" | log
# Reboot the computer so the script can run
sudo reboot
exit 0

View File

@ -1,52 +0,0 @@
#!/bin/bash
# configure-email.sh
# Description: Select prefered email client and configure it.
#
# Copyright 2018, F123 Consulting, <information@f123.org>
# Copyright 2018, Storm Dragon, <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.
#
#--code--
# Load functions and reusable code:
source /usr/lib/F123-includes/script_functions.sh
# List of possible email clients.
clientList=(
mutt
thunderbird
)
client="$(menulist $(for i in ${clientList[@]} ; do echo "$i $i"; done))"
# Set the new selection as the client in preferences
sed -i "s/\[emailClient\]=.*/[emailClient]=\"$client\"/" ~/.preferences
# Open or configure the selected client.
case "${client}" in
"mutt")
[[ ! -d ~/.mutt ]] && command fleacollar
command mutt;;
"thunderbird")
python /usr/share/fenrirscreenreader/tools/fenrir-ignore-screen &> /dev/null
echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
command startx /usr/lib/F123-wrappers/xlauncher thunderbird
python /usr/share/fenrirscreenreader/tools/fenrir-unignore-screen &> /dev/null
echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock;;
esac
exit 0

View File

@ -1,92 +0,0 @@
#!/bin/bash
# configure-security
#
# Copyright 2018, F123 Consulting, <information@f123.org>
# Copyright 2018, Storm Dragon, <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.
#
#--code--
export TEXTDOMAIN=configure-security
export TEXTDOMAINDIR=/usr/share/locale
. gettext.sh
# Load F123 includes
for i in /usr/lib/F123-includes/*.sh ; do
source $i
done
# Log writing function
log() {
while read -r line ; do
echo "$line" | sudo tee -a "$logFile" &> /dev/null
done
}
# Log file name is /var/log/scriptname
logFile="/var/log/${0##*/}"
# Clear previous logs
echo -n | sudo tee "$logFile" &> /dev/null
# How was this script called?
CALLED=${0##*/}
disable_password() {
echo "%wheel ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/f123
msgbox "$(gettext "Passwords are no longer required to perform administrative tasks.")"
echo "Disabled password requirements for sudo." | log
}
require_password() {
echo "%wheel ALL=(ALL) ALL" | sudo tee /etc/sudoers.d/f123
msgbox "$(gettext "Passwords are now required to perform administrative tasks.")"
echo "Enabled password requirements for sudo." | log
}
disable_autologin() {
sudo rm -f /etc/systemd/system/getty@tty*.service.d/override.conf 2> /dev/null
msgbox "$(gettext "You will need to enter username and password at login for this computer.")"
echo "Disabled autologin." | log
}
enable_autologin() {
local currentUser="$USER"
for i in {1..12} ; do
cat << EOF | sudo tee "/etc/systemd/system/getty@tty$i.service.d/override.conf" &> /dev/null
[Service]
ExecStart=
ExecStart=-/usr/bin/agetty --autologin $currentUser --noclear %I \$TERM
Type=idle
EOF
done
msgbox "$(gettext "You no longer need to enter username and password at login for this computer.")"
echo "Enabled autologin." | log
}
while : ; do
action="$(menulist "enable_autologin" "$(gettext "Login to your computer without the need of entering username and password.")" "disable_autologin" "$(gettext "Require a username and password to login to your computer.")" "require_password" "$(gettext "request a password when making changes that require administrator access.")" "disable_password" "$(gettext "Make changes to your computer that require administrator access without requiring a password. (security risk)")" "exit" "$(eval_gettext "Close \$CALLED")")"
if [[ "$action" != "exit" && -n "$action" ]]; then
echo "Running $action" | log
eval "$action"
else
echo "Exiting" | log
break
fi
done
exit 0

View File

@ -1,47 +0,0 @@
#!/bin/bash
# configure-sound
#
# Copyright 2018, F123 Consulting, <information@f123.org>
# Copyright 2018, Storm Dragon, <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.
#
#--code--
export TEXTDOMAIN=configure-sound
export TEXTDOMAINDIR=/usr/share/locale
. gettext.sh
# Load F123 includes
for i in /usr/lib/F123-includes/*.sh ; do
source $i
done
# How was this script called?
CALLED=${0##*/}
soundAction="$(menulist "USB_Soundcard" "$(gettext "USB_Soundcard")" "3MM_Jack" "$(gettext "3MM_Jack")")"
[[ -n "$soundAction" ]] || exit 0
if [[ "$soundAction" == "USB_Soundcard" ]]; then
echo "blacklist snd_bcm2835" | sudo tee /etc/modprobe.d/onboard_sound.conf &> /dev/null
else
[[ -f "/etc/modprobe.d/onboard_sound.conf" ]] && sudo rm -f "/etc/modprobe.d/onboard_sound.conf"
fi
[[ "$(yesno "$(gettext "You need to reboot for the changes to take affect. Would you like to reboot now?")")" == "Yes" ]] && sudo reboot
exit 0

View File

@ -1,134 +0,0 @@
#!/bin/bash
# configure-speech
#
# Copyright 2018, F123 Consulting, <information@f123.org>
# Copyright 2018, Storm Dragon, <storm_dragon@linux-a11y.org>
# Copyright 2018, Kyle, <kyle@free2.ml>
#
# 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.
#
#--code--
export TEXTDOMAIN=configure-speech
export TEXTDOMAINDIR=/usr/share/locale
. gettext.sh
# include script functions
for i in /usr/lib/F123-includes/*.sh ; do
source $i
done
# Log writing function
log() {
# Usage: command | log for just stdout.
# Or command |& log for stderr and stdout.
while read -r line ; do
echo "$line" | sudo tee -a "$logFile" &> /dev/null
done
}
# Log file name is /var/log/scriptname
logFile="/var/log/${0##*/}"
# Clear previous logs
echo -n | sudo tee "$logFile" &> /dev/null
# For additional speech options, add them to the synthArray variable, then add the available languages
# to a line in the case below matching the option
# Note that espeak-ng supports the most languages, so other case lines
# can start with espeak-ng and remove unsupported languages
synthArray=(
espeak-ng
mbrola
rhvoice
)
for i in ${synthArray[@]} ; do
case $i in
espeak-ng) languages=('af_ZA' 'ar_EG' 'de_DE' 'en_US' 'es_ES' 'fr_FR' 'hi_IN' 'hu_HU' 'id_ID' 'pl_PL' 'pt_BR' 'sw_TZ' 'tr_TR' 'vi_VN' 'zh_CN');;
mbrola) languages=('af_ZA' 'ar_EG' 'de_DE' 'en_US' 'es_ES' 'fr_FR' 'hi_IN' 'hu_HU' 'id_ID' 'pl_PL' 'pt_BR' 'tr_TR' 'zh_CN');;
rhvoice) languages=('en_US');;
esac
# Only add a speech provider option if it has at least one voice to speak the current language
for l in ${languages[@]}; do
if [[ "$l" == "${LANG::5}" ]]; then
# Dialog requires 2 options for the menu, we hide the tags, but it still needs to be sent twice.
speechOptions+=("$i" "$i")
fi
done
done
speechProvider="$(menulist ${speechOptions[@]})"
speechProvider="${speechProvider,,}"
case "$speechProvider" in
"mbrola") speechProvider="espeak-ng-mbrola-generic";;
esac
# Exit if speechProvider remains unset, i.e.
# if the user has pressed the escape key to close the menu
test -z $speechProvider && exit 0
# Set the chosen speech provider option.
sudo sed -i.bak "s/^[[:space:]]*DefaultModule [[:space:]]*\S*$/ DefaultModule $speechProvider/" /etc/speech-dispatcher/speechd.conf |& log
# For espeak-ng to use the correct voice on US English based systems, it needs to be set to default language en-us.
# For pretty much everything else though, it has to just be en.
# So, check and set that here.
case "${LANG::5}" in
"en_US")
if [[ "${speechProvider::9}" == "espeak-ng" ]]; then
spdLang=en-us
else
spdLang=en
fi
sudo sed -i "s/^[[:space:]]*DefaultLanguage [[:space:]]*\S*$/ DefaultLanguage $spdLang/" /etc/speech-dispatcher/speechd.conf |& log
;;
esac
# Clear any keypresses in the buffer:
read -t .001 continue
# Load the new settings:
sudo pkill -1 speech-dispatch |& log
spd-say -o $speechProvider -l $spdLang "$(gettext "If you can hear this press the 'Enter' key to try the new voice. If you do nothing, the voice will not be changed and you will be back to the menu in 10 seconds.")"
read -n1 -t10 continue
# Error code 142 means a key was not pressed, so restore from backup.
if [[ $? -ne 0 ]]; then
sudo mv /etc/speech-dispatcher/speechd.conf.bak /etc/speech-dispatcher/speechd.conf |& log
# Load the old settings:
sudo pkill -1 speech-dispatch |& log
exit 1
fi
# Restart Fenrir with new speech provider changes
clear
sudo systemctl restart fenrirscreenreader |& log
# Attempt to restart orca to apply changes if it is running:
if pgrep orca &> /dev/null ; then
for i in {0..11} ; do
DISPLAY=:$i orca --replace &
[[ $? -eq 0 ]] && break
done
fi
# Remove the backup file.
[[ -f /etc/speech-dispatcher/speechd.conf.bak ]] && sudo rm -f /etc/speech-dispatcher/speechd.conf.bak |& log
# Update the speech-dispatcher backup for restore accessibility.
sudo cp -v /etc/speech-dispatcher/speechd.conf /etc/F123-Config/backup/speechd.conf |& log
exit 0

View File

@ -1 +0,0 @@
docx.sh

View File

@ -1 +0,0 @@
docx.sh

View File

@ -1,81 +0,0 @@
#!/bin/bash
# docx.sh
# Description: Helper for ne macro to convert from markdown to docx
#
# Copyright 2019, F123 Consulting, <information@f123.org>
# Copyright 2019, Storm Dragon, <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.
#
#--code--
declare -A message=(
# Change the strings in quotes for different languages.
[confirm]="The file is available as"
[continue]="Press enter to continue."
[error]="The file was not converted."
[prompt]="Enter file name: "
)
# Get the file name for the conversion.
read -erp "${message[prompt]}" fileName
# If variable is empty, do not write a file.
if [[ -z "$fileName" ]]; then
read -p "$message[error] ${message[continue]}" continue
exit 0
fi
# make sure fileName is in proper format.
fileName="$HOME/Documents/${fileName##*/}"
# Find out what we are converting to.
convertTo="${0##*/}"
convertTo="${convertTo%%.*}"
# Add the proper extension if needed.
extension="${fileName,,}"
extension="${extension##*.}"
if [[ "$extension" != "$convertTo" ]]; then
fileName+=".$convertTo"
fi
# Make sure we don't overwrite anything.
i=2
oldFileName="$fileName"
while [[ -f "$fileName" ]]; do
fileName="${oldFileName}"
fileName="${fileName%.*}"
fileName="${fileName%-[0-9]*}"
fileName="${fileName}-${i}.${convertTo}"
((i++))
done
# Convert the file to html
if ! markdown -o ~/.ne/.tmp.txt.html ~/.ne/.tmp.txt ; then
read -p "${message[error]} ${message[continue]}" continue
exit 1
fi
# Convert the file to the specified extension.
if lowriter --headless --convert-to $convertTo ~/.ne/.tmp.txt.html --outdir ~/.ne &> /dev/null ]]; then
mv ~/.ne/.tmp.txt.$convertTo "$fileName"
read -p "${message[confirm]} $fileName. ${message[continue]}" continue
else
read -p "${message[error]} ${message[continue]}" continue
fi

View File

@ -1 +0,0 @@
docx.sh

View File

@ -1 +0,0 @@
docx.sh

View File

@ -1 +0,0 @@
docx.sh

View File

@ -1,77 +0,0 @@
#!/bin/bash
# language-chooser.sh
# Description: Set languages for fast language switching.
#
# Copyright 2019, F123 Consulting, <information@f123.org>
# Copyright 2019, Storm Dragon, <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.
#
#--code--
# Load functions and reusable code:
source /usr/lib/F123-includes/script_functions.sh
export TEXTDOMAIN=language-chooser
export TEXTDOMAINDIR=/usr/share/locale
source gettext.sh
[[ -r /etc/languages ]] && source /etc/languages
# If no languages are defined, add the system default to the array.
if [[ -z $languages ]]; then
languages=(${LANG%%.*})
fi
# Supported languages are in an array of their own.
supportedLanguages=(
ar_EG
en_US
es_MX
pt_BR
)
# Create the menu for each language.
options=""
for i in ${supportedLanguages[@]} ; do
k="Add"
for j in ${languages[@]} ; do
if [[ "$j" == "$i" ]]; then
k="Remove"
fi
done
# Add each option twice so it is proper format for the menu.
options+=("$k $i" "$(gettext "$k") $i")
done
ifs="$IFS"
IFS=$'\n'
choice="$(menulist ${options[@]})"
IFS="$ifs"
# Update the languages array.
if [[ "${choice%% *}" == "Add" ]]; then
languages+=(${choice##* })
else
for i in "${!languages[@]}"; do
if [[ "${languages[i]}" == "${choice##* }" ]]; then
unset languages[i]
fi
done
fi
# Write the updated language options to disk.
echo "languages=(${languages[@]})" | sudo tee /etc/languages &> /dev/null
exit 0

View File

@ -1,37 +0,0 @@
#!/bin/bash
# mail-launcher.sh
# Description Launch the correct mail client as specified in preferences.
#
# Copyright 2018, F123 Consulting, <information@f123.org>
# Copyright 2018, Storm Dragon, <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.
#
#--code--
source ~/.preferences
case "${preferences[emailClient]}" in
"mutt") echo "exec:::command mutt";;
"thunderbird")
echo 'exec:::python /usr/share/fenrirscreenreader/tools/fenrir-ignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
exec:::command $([[ -n $DEMOMODE ]] && echo '-v') startx /usr/lib/F123-wrappers/xlauncher thunderbird
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-unignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/ fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock';;
*) /usr/lib/F123-wrappers/configure-email.sh
esac
exit 0

View File

@ -1,66 +0,0 @@
#!/bin/bash
#!/bin/bash
# mud_loader.xh
# Description: Easlily load mud soundpacks.
#
# Copyright 2019, F123 Consulting, <information@f123.org>
# Copyright 2019, Storm Dragon, <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.
#
#--code--
# Load functions and reusable code:
if [[ -d /usr/lib/F123-includes/ ]]; then
for i in /usr/lib/F123-includes/*.sh ; do
source $i
done
fi
# the gettext essentials
export TEXTDOMAIN=tmp
export TEXTDOMAINDIR=/usr/share/locale
source gettext.sh
# Log writing function
log() {
# Usage: command | log for just stdout.
# Or command |& log for stderr and stdout.
while read -r line ; do
echo "$line" | sudo tee -a "$logFile" &> /dev/null
done
}
# Log file name is /var/log/scriptname
logFile="/var/log/${0##*/}"
# Clear previous logs
echo -n | sudo tee "" &> /dev/null
mudURL="$1"
mudName="${mudURL##*/}"
mudName="${mudName%.git}"
if [[ ! -d "$HOME/$mudName" ]]; then
git -C "$HOME" clone "$mudURL" &> /dev/null | dialog --progressbox "Downloading and installing game files, please wait..." 0 0
else
git -C "$HOME/$mudName" pull &> /dev/null | dialog --progressbox "Making sure everything is up to date, please wait..." 0 0
fi
cd "$HOME/$mudName"
mudLauncher="$(ls -1 *.tin)"
tt++ $mudLauncher
exit 0

View File

@ -1 +0,0 @@
mumble-manager.sh

View File

@ -1,125 +0,0 @@
#!/bin/bash
# mumble-manager
# Description: Make managing servers with barnard easy.
#
# Copyright 2019, F123 Consulting, <information@f123.org>
# Copyright 2019, Storm Dragon, <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.
#
#--code--
# Load functions and reusable code:
if [[ -d /usr/lib/F123-includes/ ]]; then
for i in /usr/lib/F123-includes/*.sh ; do
source $i
done
fi
# the gettext essentials
export TEXTDOMAIN=mumble-manager-add-server
export TEXTDOMAINDIR=/usr/share/locale
source gettext.sh
# Log writing function
log() {
# Usage: command | log for just stdout.
# Or command |& log for stderr and stdout.
while read -r line ; do
echo "$line" | sudo tee -a "$logFile" &> /dev/null
done
}
# Log file name is /var/log/scriptname
logFile="/var/log/${0##*/}"
# Clear previous logs
echo -n | sudo tee "$logFile" &> /dev/null
[[ -d ~/.config/barnard ]] || mkdir ~/.config/barnard
if [[ ! -r ~/.config/barnard/servers.conf ]]; then
echo "Adding default mumble server." | log
echo "declare -Ag mumbleServerList=(" > ~/.config/barnard/servers.conf
echo "[F123Light_Mumble_server]=\"mumble.f123.org:64738\"" >> ~/.config/barnard/servers.conf
echo ")" >> ~/.config/barnard/servers.conf
fi
source ~/.config/barnard/servers.conf
function add-server() {
local serverName="$(inputbox "$(gettext "Enter a name for the new server:")")"
[[ $? -ne 0 ]] && exit 0
serverName="${serverName//[[:space:]]/_}"
[[ $? -ne 0 ]] && exit 0
local serverAddress="$(inputbox "$(gettext "Enter the address of the server:")")"
[[ $? -ne 0 ]] && exit 0
local serverPort="${serverAddress##*:}"
if ! [[ "$serverPort" =~ ^[0-9]+ ]]; then
serverPort=64738
fi
mumbleServerList[$serverName]="${serverAddress}:${serverPort}"
echo "declare -Ag mumbleServerList=(" > ~/.config/barnard/servers.conf
for i in ${!mumbleServerList[@]} ; do
echo "[${i}]=\"${mumbleServerList[$i]}\"" >> ~/.config/barnard/servers.conf
done
echo ")" >> ~/.config/barnard/servers.conf
echo "Added server $serverName ${serverAddress}:${serverPort}" | log
msgbox "$(gettext "Added server") $serverName"
exit 0
}
connect() {
declare -a serverList
for i in ${!mumbleServerList[@]} ; do
serverList+=("$i" "$i")
done
local serverName="$(menulist ${serverList[@]})"
if [[ -z "$serverName" ]]; then
exit 0
fi
command barnard -username ${USER}-f123 -server ${mumbleServerList[$serverName]} |& log
exit 0
}
remove-server() {
declare -a serverList
for i in ${!mumbleServerList[@]} ; do
serverList+=("$i" "$i")
done
local serverName="$(menulist ${serverList[@]})"
if [[ -z "$serverName" ]]; then
exit 0
fi
unset mumbleServerList[$serverName]
echo "declare -Ag mumbleServerList=(" > ~/.config/barnard/servers.conf
for i in ${!mumbleServerList[@]} ; do
echo "[${i}]=\"${mumbleServerList[$i]}\"" >> ~/.config/barnard/servers.conf
done
echo ")" >> ~/.config/barnard/servers.conf
echo "Removed server $serverName ${serverAddress}:${serverPort}" | log
msgbox "$(gettext "Removed server") $serverName"
exit 0
}
# Extract the function to be called
action="${0##*mumble-manager}"
action="${action/-/}"
action="${action%.*}"
if [[ "$action" == "" ]]; then
action="connect"
fi
eval "$action"
exit 0

View File

@ -1 +0,0 @@
docx.sh

View File

@ -1 +0,0 @@
docx.sh

View File

@ -1 +0,0 @@
docx.sh

View File

@ -1,339 +0,0 @@
#!/bin/bash
# F123 menu
#
# Copyright 2018, F123 Consulting, <information@f123.org>
# Copyright 2018, Kyle, <kyle@free2.ml>
# Copyright 2018, Storm Dragon, <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.
#
#--code--
# Remember to make this script executable so pdmenu can access it.
# Remember for subshells and variables that need to be sent instead of used put a backslash before the dollar sign
export TEXTDOMAIN=pdmenurc
export TEXTDOMAINDIR=/usr/share/locale
. gettext.sh
cat << EOF
title:$(gettext "Welcome to F123Light")
# Define the main menu.
menu:main:$(gettext "F123 Light Main Menu"):$(gettext "Use the up and down arrow keys to select your choice and press the 'Enter' key to activate it.")
show:$(gettext "_Games Menu (G)")..::games
show:$(gettext "_Internet Menu (I)")..:$(gettext "Browser, e-mail and chat applications"):internet
show:$(gettext "_Media Menu (M)")..:$(gettext "Book reading, music and video applications"):media
show:$(gettext "_Office Menu (O)")..:$(gettext "text, calendar and spreadsheet applications"):office
exec:$(gettext "_File Manager (F)"):$(gettext "Copy, move and delete files"):clear;command dragonfm
group:$(gettext "Manage External _Drives (D)")
exec::makemenu: \
echo "menu:external:$(gettext "External"):$(gettext "Select Drive")"; \
rmdir /media/* &> /dev/null; \
c=0; \
for i in \$(find /media -maxdepth 1 ! -path /media -type d 2> /dev/null) ; do \
((c++)); \
j="\${i/\/media\//}"; \
echo "exec:_\$j::dragonfm '\$i'"; \
echo "exec:$(gettext "Safely remove") _\$j::umount '\$i' || sudo umount '\$i'"; \
done; \
[[ \$c -gt 0 ]] || echo "exec:\$(gettext "No external drives found")::clear"; \
echo "exit:$(gettext "Main Menu")..";
show:::external
remove:::external
endgroup
$([[ -r ~/.config/F123/menu ]] && echo "show:$(gettext "Custom Accessories Menu (_U)")..:$(gettext "User Defined Applications"):custom_accessories")
nop:$(gettext "Search")
exec:$(gettext "Search This _Computer (C)"):edit,pause:command recoll -t ~Search for what? :~
exec:$(gettext "Search the _Web (W)"):edit,pause:command ${preferences[searchEngine]} ~Search for what? :~
nop
show:$(gettext "_Settings Menu (S)")..:$(gettext "Configure this computer"):settings
show:$(gettext "_Help Menu (H)")..:$(gettext "Get Help with F123Light"):help
show:$(gettext "_Turn Off or Restart Computer (T)")..::power
nop
exit:$(gettext "E_xit to Command Line")
# Submenu for games.
menu:games:$(gettext "Games")):
exec:$(gettext "_Adventure (A)"):pause:clear;command adventure
exec:$(gettext "_Arithmetic Challenge! (A)"):pause:clear;command arithmetic
#exec:$(gettext "_Air Traffic Controler (Not screen reader friendly) (A)")::clear;command atc
#exec:$(gettext "_Backgammon (Not screen reader friendly) (B)")::clear;command backgammon
exec:$(gettext "_Battlestar (B)")::clear;command battlestar
#exec:$(gettext "_Boggle (Not screen reader friendly) (B)")::clear;command boggle
#exec:$(gettext "_Canfield (Not screen reader friendly) (C)")::clear;command canfield
#exec:$(gettext "_Cribbage (Not screen reader friendly) (C)")::clear;command cribbage
exec:$(gettext "_Go Fish (G)"):pause:clear;command go-fish
exec:$(gettext "_Gomoku (G)")::clear;command gomoku
exec:$(gettext "_Hangman (H)")::clear;command hangman
group:$(gettext "Horseshoes (_H)")
exec:::clear
exec:::/usr/lib/F123-wrappers/tips.sh horseshoes
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-ignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
exec:::command startx /usr/lib/F123-wrappers/x-self-voiced horseshoes
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-unignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
endgroup
#exec:$(gettext "_Hunt (Not screen reader friendly) (H)")::clear;command hunt
exec:$(gettext "Legends of _Kallisti (K)")::clear;command /usr/lib/F123-wrappers/mud-loader.sh https://gitlab.com/hjozwiak/tintin-kallisti-pack.git
exec:$(gettext "_Mille Bornes (M)")::clear;command mille
exec:$(gettext "_Number (N)")::clear;command number
exec:$(gettext "_Phantasia (P)")::clear;command phantasia
exec:$(gettext "_Phase of the Moon (P)"):pause:clear;command pom
exec:$(gettext "_Primes (P)")::clear;command primes
#exec:$(gettext "_Robots (Not screen reader friendly) (R)")::clear;command robots
exec:$(gettext "_Sail (S)")::clear;command sail
#exec:$(gettext "_Snake (Not screen reader friendly) (S)")::clear;command snake
#exec:$(gettext "_Tetris (Not screen reader friendly) (T)")::clear;command tetris-bsd
exec:$(gettext "_Trek (T)")::clear;command trek
#group:$(gettext "_Tux Math (T)")
#exec:::clear
#exec:::/usr/lib/F123-wrappers/tips.sh tuxmath
#exec:::python /usr/share/fenrirscreenreader/tools/fenrir-ignore-screen &> /dev/null
#exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
#exec:::command startx /usr/lib/F123-wrappers/x-self-voiced tuxmath --tts
#exec:::python /usr/share/fenrirscreenreader/tools/fenrir-unignore-screen &> /dev/null
#exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
#endgroup
group:$(gettext "_Tux Type (T)")
exec:::clear
exec:::/usr/lib/F123-wrappers/tips.sh tuxtype
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-ignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
exec:::command startx /usr/lib/F123-wrappers/x-self-voiced tuxtype --tts
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-unignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
endgroup
#exec:$(gettext "_Worm (Not screen reader friendly) (W)")::clear;command worm
exec:$(gettext "_Wumpus (W)")::clear;command wump
nop
exit:$(gettext "_Main Menu (M)")..
# submenu for internet applications.
menu:internet:$(gettext "Internet"):$(gettext "Internet programs")
group:$(gettext "E-_mail (M)")
$(/usr/lib/F123-wrappers/mail-launcher.sh)
endgroup
nop:$(gettext "Web Browsers")
group:$(gettext "_Basic Web Browser (W3M) (B)")
exec:::clear
exec:::/usr/lib/F123-wrappers/tips.sh w3m
exec:::command w3m
endgroup
group:$(gettext "_Full Web Browser (Firefox) (F)")
exec:::clear
exec:::/usr/lib/F123-wrappers/tips.sh firefox
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-ignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
exec:::command startx /usr/lib/F123-wrappers/xlauncher firefox
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-unignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
endgroup
nop:$(gettext "Communication")
#group:$(gettext "Telegram (T)")
#exec:::clear
#exec:::/usr/lib/F123-wrappers/tips.sh telegram-cli
#exec:::command telegram-cli
#endgroup
group:$(gettext "_Text Chat (Pidgin) (T)")
exec:::clear
exec:::/usr/lib/F123-wrappers/tips.sh pidgin
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-ignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
exec:::command startx /usr/lib/F123-wrappers/xlauncher pidgin
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-unignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
endgroup
show:$(gettext "Voice Chat (Mumble) (_V)")::mumble
nop
exit:$(gettext "_Main Menu (M)")..
menu:mumble:$(gettext "Voice Chat (Mumble)"):$(gettext "Voice Chat (Mumble)")
exec:$(gettext "Add Server (_A)")::/usr/lib/F123-wrappers/mumble-manager-add-server.sh
exec:$(gettext "Remove Server (_R)")::/usr/lib/F123-wrappers/mumble-manager-remove-server.sh
group:$(gettext "Connect (_C)")
exec:::clear
exec:::/usr/lib/F123-wrappers/tips.sh barnard
exec:::/usr/lib/F123-wrappers/mumble-manager.sh
exec:::reset
endgroup
nop
exit:$(gettext "Internet Menu (_M)")..
menu:media:$(gettext "Media"):$(gettext "Multi-media applications")
#group:$(gettext "CD _Audio Ripper (A)")
#exec:::clear
#exec:::/usr/lib/F123-wrappers/tips.sh ripit
#exec:::command ripit
#endgroup
#group:$(gettext "_Music Player (M)")
#exec:::clear
#exec:::/usr/lib/F123-wrappers/tips.sh cmus
#exec:::command cmus
#endgroup
group:$(gettext "Stringed _Instrument Tuner (I)")
exec:::clear
exec:::/usr/lib/F123-wrappers/tips.sh bashtuner
exec:::command bashtuner
endgroup
#group:$(gettext "_Pandora Internet Radio (P)")
#exec:::clear
#exec:::/usr/lib/F123-wrappers/tips.sh pianobar
#exec:::test -d "${XDG_CONFIG_HOME:-$HOME/.config}/pianobar" || command /usr/lib/F123-wrappers/configure-pianobar.sh
#exec:::command pianobar
#endgroup
#group:$(gettext "Youtube (_Audio Only) (A)")
#exec:::clear
#exec:::/usr/lib/F123-wrappers/tips.sh youtube-viewer
#exec:::command youtube-viewer -novideo
#endgroup
#group:$(gettext "Youtube (Full _Video) (V)")
#exec:::clear
#exec:::/usr/lib/F123-wrappers/tips.sh youtube-viewer
#exec:::python /usr/share/fenrirscreenreader/tools/fenrir-ignore-screen &> /dev/null
#exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
#exec:::command startx /usr/lib/F123-wrappers/xlauncher lxterminal -e youtube-viewer
#exec:::python /usr/share/fenrirscreenreader/tools/fenrir-unignore-screen &> /dev/null
#exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
#endgroup
nop:$(gettext "Book Readers")
group:$(gettext "_Book Reader (B)")
exec::makemenu: \
echo "menu:books:$(gettext "Books"):$(gettext "Select book to read")"; \
find \$HOME -type f \( -iname "*.epub" -o -iname "*.pdf" \) -print0 |\
while read -d \$'\0' i ; do \
j="\$(basename "\$i")"; \
echo "exec:_\${j%%.*}::/usr/lib/F123-wrappers/bookreader.sh '\$i'"; \
done; \
echo nop; \
echo "exit:$(gettext "Media Menu").."
show:::books
remove:::books
endgroup
nop
exit:$(gettext "_Main Menu (M)")..
menu:office:$(gettext "Office"):$(gettext "Word processing, calendar, etc")
#exec:$(gettext "_Month Calendar (M)"):pause:clear;command ncal
#exec:$(gettext "_Year Calendar (Y)"):pause:clear;command ncal -y
#group:$(gettext "_Spreadsheet (S)")
#exec:::clear
#exec:::/usr/lib/F123-wrappers/tips.sh sc-im
#exec:::command sc-im
#endgroup
group:$(gettext "_Text Editor (T)")
exec:::clear
exec:::/usr/lib/F123-wrappers/tips.sh ne
exec:::command ne --macro clear
endgroup
#group:$(gettext "_Word Processor (W)")
#exec:::clear
#exec:::/usr/lib/F123-wrappers/tips.sh wordgrinder
#exec:::command wordgrinder
#endgroup
nop:$(gettext "OCR")
group:$(gettext "Lios OCR (_L)")
exec:::clear
exec:::/usr/lib/F123-wrappers/tips.sh localc
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-ignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
exec:::command startx /usr/lib/F123-wrappers/xlauncher lios
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-unignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
endgroup
nop:$(gettext "Office Suite")
#group:$(gettext "_Spreadsheet (S)")
#exec:::clear
#exec:::/usr/lib/F123-wrappers/tips.sh localc
#exec:::python /usr/share/fenrirscreenreader/tools/fenrir-ignore-screen &> /dev/null
#exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
#exec:::command startx /usr/lib/F123-wrappers/xlauncher localc
#exec:::python /usr/share/fenrirscreenreader/tools/fenrir-unignore-screen &> /dev/null
#exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
#endgroup
#group:$(gettext "_Word Processor (W)")
#exec:::clear
#exec:::/usr/lib/F123-wrappers/tips.sh lowriter
#exec:::python /usr/share/fenrirscreenreader/tools/fenrir-ignore-screen &> /dev/null
#exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
#exec:::command startx /usr/lib/F123-wrappers/xlauncher lowriter
#exec:::python /usr/share/fenrirscreenreader/tools/fenrir-unignore-screen &> /dev/null
#exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
#endgroup
#group:$(gettext "Libre _Office (All Applications) (O)")
#exec:::clear
#exec:::/usr/lib/F123-wrappers/tips.sh $(shuf -n1 -e localc lowriter)
#exec:::python /usr/share/fenrirscreenreader/tools/fenrir-ignore-screen &> /dev/null
#exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
#exec:::command startx /usr/lib/F123-wrappers/xlauncher soffice
#exec:::python /usr/share/fenrirscreenreader/tools/fenrir-unignore-screen &> /dev/null
#exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
#endgroup
nop
exit:$(gettext "_Main Menu (M)")..
# submenu for configuring the computer.
menu:settings:$(gettext "Settings"):$(gettext "System configuration")
show:$(gettext "System Backup Menu (_Y)")..::backup
exec:$(gettext "Check for System _Updates (U)"):pause:clear;/usr/bin/update-f123light
exec:$(gettext "_Change Passwords (C)")::clear;/usr/lib/F123-wrappers/configure-passwords.sh
exec:$(gettext "E-_mail Configuration (M)")::clear;command configure-email
exec:$(gettext "Securit_y Configuration (Y)")::clear;/usr/lib/F123-wrappers/configure-security.sh
exec:$(gettext "Configure fast _language switching (L)")::clear;/usr/lib/F123-wrappers/language-chooser.sh
exec:$(gettext "Change System S_peech (P)")::clear;/usr/lib/F123-wrappers/configure-speech.sh
group:$(gettext "_Bluetooth manager (B)")
exec:::clear
exec:::/usr/lib/F123-wrappers/tips.sh blueman
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-ignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
exec:::command startx /usr/lib/F123-wrappers/blueman-launcher
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-unignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
endgroup
exec:$(gettext "Configure _Wifi (W)")::clear;sudo configure-wifi
nop
exit:$(gettext "_Main Menu (M)")..
menu:backup:$(gettext "Backup or restore your computer"):$(gettext "Backup or restore your computer")
exec:$(gettext "Backup your data and settings (_B)")::/usr/lib/F123-wrappers/backup-manager.sh
exec:$(gettext "Restore your data and settings (_R)")::/usr/lib/F123-wrappers/restore-manager.sh
exec:$(gettext "Full system backup (_F)")::/usr/lib/F123-wrappers/system-backup.sh
nop
exit:$(gettext "Settings Menu (_S)")..
menu:help:$(gettext "Get Help with F123 Light"):$(gettext "Get Help with F123Light")
exec:$(gettext "_Get Help (G)"):pause:command echo -e "For help please subscribe to the F123 visual email list\nhttps://groups.io/g/F123-Visual-English"
exec:$(gettext "Access text chat to request help (_C)")::command irssi --home /etc/F123-Config/irssi
exec:$(gettext "Request remote assistance with my computer (_R)"):pause:command sudo cfh
nop
exec:$(gettext "About F123Light (_A)"):pause:/usr/lib/F123-wrappers/about.sh
nop
exit:$(gettext "_Main Menu")..
menu:power:$(gettext "Turn off or Restart Computer"):$(gettext "Shutdown or restart your computer")
exec:$(gettext "_Lock (L)")::vlock -a
exec:$(gettext "Turn _Off (O)")::poweroff &> /dev/null || sudo poweroff
exec:$(gettext "_Restart (R)")::reboot &> /dev/null || sudo reboot
nop
exit:$(gettext "_Main Menu (M)")..
$(if [[ -r ~/.config/F123/menu ]]; then
echo "menu:custom_accessories:$(gettext "User Defined Applications"):$(gettext "User Defined Applications")"
cat ~/.config/F123/menu
echo "nop"
echo "exit:$(gettext "Main Menu (_M)").."
fi)
EOF

View File

@ -1,339 +0,0 @@
#!/bin/bash
# F123 menu
#
# Copyright 2018, F123 Consulting, <information@f123.org>
# Copyright 2018, Kyle, <kyle@free2.ml>
# Copyright 2018, Storm Dragon, <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.
#
#--code--
# Remember to make this script executable so pdmenu can access it.
# Remember for subshells and variables that need to be sent instead of used put a backslash before the dollar sign
export TEXTDOMAIN=pdmenurc
export TEXTDOMAINDIR=/usr/share/locale
. gettext.sh
cat << EOF
title:$(gettext "Welcome to F123Light")
# Define the main menu.
menu:main:$(gettext "F123 Light Main Menu"):$(gettext "Use the up and down arrow keys to select your choice and press the 'Enter' key to activate it.")
show:$(gettext "_Games Menu (G)")..::games
show:$(gettext "_Internet Menu (I)")..:$(gettext "Browser, e-mail and chat applications"):internet
show:$(gettext "_Media Menu (M)")..:$(gettext "Book reading, music and video applications"):media
show:$(gettext "_Office Menu (O)")..:$(gettext "text, calendar and spreadsheet applications"):office
exec:$(gettext "_File Manager (F)"):$(gettext "Copy, move and delete files"):clear;command dragonfm
group:$(gettext "Manage External _Drives (D)")
exec::makemenu: \
echo "menu:external:$(gettext "External"):$(gettext "Select Drive")"; \
rmdir /media/* &> /dev/null; \
c=0; \
for i in \$(find /media -maxdepth 1 ! -path /media -type d 2> /dev/null) ; do \
((c++)); \
j="\${i/\/media\//}"; \
echo "exec:_\$j::dragonfm '\$i'"; \
echo "exec:$(gettext "Safely remove") _\$j::umount '\$i' || sudo umount '\$i'"; \
done; \
[[ \$c -gt 0 ]] || echo "exec:\$(gettext "No external drives found")::clear"; \
echo "exit:$(gettext "Main Menu")..";
show:::external
remove:::external
endgroup
$([[ -r ~/.config/F123/menu ]] && echo "show:$(gettext "Custom Accessories Menu (_U)")..:$(gettext "User Defined Applications"):custom_accessories")
nop:$(gettext "Search")
exec:$(gettext "Search This _Computer (C)"):edit,pause:command recoll -t ~Search for what? :~
exec:$(gettext "Search the _Web (W)"):edit,pause:command ${preferences[searchEngine]} ~Search for what? :~
nop
show:$(gettext "_Settings Menu (S)")..:$(gettext "Configure this computer"):settings
show:$(gettext "_Help Menu (H)")..:$(gettext "Get Help with F123Light"):help
show:$(gettext "_Turn Off or Restart Computer (T)")..::power
nop
exit:$(gettext "E_xit to Command Line")
# Submenu for games.
menu:games:$(gettext "Games")):
exec:$(gettext "_Adventure (A)"):pause:clear;command adventure
exec:$(gettext "_Arithmetic Challenge! (A)"):pause:clear;command arithmetic
#exec:$(gettext "_Air Traffic Controler (Not screen reader friendly) (A)")::clear;command atc
#exec:$(gettext "_Backgammon (Not screen reader friendly) (B)")::clear;command backgammon
exec:$(gettext "_Battlestar (B)")::clear;command battlestar
#exec:$(gettext "_Boggle (Not screen reader friendly) (B)")::clear;command boggle
#exec:$(gettext "_Canfield (Not screen reader friendly) (C)")::clear;command canfield
#exec:$(gettext "_Cribbage (Not screen reader friendly) (C)")::clear;command cribbage
exec:$(gettext "_Go Fish (G)"):pause:clear;command go-fish
exec:$(gettext "_Gomoku (G)")::clear;command gomoku
exec:$(gettext "_Hangman (H)")::clear;command hangman
group:$(gettext "Horseshoes (_H)")
exec:::clear
exec:::/usr/lib/F123-wrappers/tips.sh horseshoes
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-ignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
exec:::command startx /usr/lib/F123-wrappers/x-self-voiced horseshoes
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-unignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
endgroup
#exec:$(gettext "_Hunt (Not screen reader friendly) (H)")::clear;command hunt
exec:$(gettext "Legends of _Kallisti (K)")::clear;command /usr/lib/F123-wrappers/mud-loader.sh https://gitlab.com/hjozwiak/tintin-kallisti-pack.git
exec:$(gettext "_Mille Bornes (M)")::clear;command mille
exec:$(gettext "_Number (N)")::clear;command number
exec:$(gettext "_Phantasia (P)")::clear;command phantasia
exec:$(gettext "_Phase of the Moon (P)"):pause:clear;command pom
exec:$(gettext "_Primes (P)")::clear;command primes
#exec:$(gettext "_Robots (Not screen reader friendly) (R)")::clear;command robots
exec:$(gettext "_Sail (S)")::clear;command sail
#exec:$(gettext "_Snake (Not screen reader friendly) (S)")::clear;command snake
#exec:$(gettext "_Tetris (Not screen reader friendly) (T)")::clear;command tetris-bsd
exec:$(gettext "_Trek (T)")::clear;command trek
group:$(gettext "_Tux Math (T)")
exec:::clear
exec:::/usr/lib/F123-wrappers/tips.sh tuxmath
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-ignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
exec:::command startx /usr/lib/F123-wrappers/x-self-voiced tuxmath --tts
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-unignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
endgroup
group:$(gettext "_Tux Type (T)")
exec:::clear
exec:::/usr/lib/F123-wrappers/tips.sh tuxtype
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-ignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
exec:::command startx /usr/lib/F123-wrappers/x-self-voiced tuxtype --tts
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-unignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
endgroup
#exec:$(gettext "_Worm (Not screen reader friendly) (W)")::clear;command worm
exec:$(gettext "_Wumpus (W)")::clear;command wump
nop
exit:$(gettext "_Main Menu (M)")..
# submenu for internet applications.
menu:internet:$(gettext "Internet"):$(gettext "Internet programs")
group:$(gettext "E-_mail (M)")
$(/usr/lib/F123-wrappers/mail-launcher.sh)
endgroup
nop:$(gettext "Web Browsers")
group:$(gettext "_Basic Web Browser (W3M) (B)")
exec:::clear
exec:::/usr/lib/F123-wrappers/tips.sh w3m
exec:::command w3m
endgroup
group:$(gettext "_Full Web Browser (Firefox) (F)")
exec:::clear
exec:::/usr/lib/F123-wrappers/tips.sh firefox
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-ignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
exec:::command startx /usr/lib/F123-wrappers/xlauncher firefox
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-unignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
endgroup
nop:$(gettext "Communication")
group:$(gettext "Telegram (T)")
exec:::clear
exec:::/usr/lib/F123-wrappers/tips.sh telegram-cli
exec:::command telegram-cli
endgroup
group:$(gettext "_Text Chat (Pidgin) (T)")
exec:::clear
exec:::/usr/lib/F123-wrappers/tips.sh pidgin
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-ignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
exec:::command startx /usr/lib/F123-wrappers/xlauncher pidgin
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-unignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
endgroup
show:$(gettext "Voice Chat (Mumble) (_V)")::mumble
nop
exit:$(gettext "_Main Menu (M)")..
menu:mumble:$(gettext "Voice Chat (Mumble)"):$(gettext "Voice Chat (Mumble)")
exec:$(gettext "Add Server (_A)")::/usr/lib/F123-wrappers/mumble-manager-add-server.sh
exec:$(gettext "Remove Server (_R)")::/usr/lib/F123-wrappers/mumble-manager-remove-server.sh
group:$(gettext "Connect (_C)")
exec:::clear
exec:::/usr/lib/F123-wrappers/tips.sh barnard
exec:::/usr/lib/F123-wrappers/mumble-manager.sh
exec:::reset
endgroup
nop
exit:$(gettext "Internet Menu (_M)")..
menu:media:$(gettext "Media"):$(gettext "Multi-media applications")
group:$(gettext "CD _Audio Ripper (A)")
exec:::clear
exec:::/usr/lib/F123-wrappers/tips.sh ripit
exec:::command ripit
endgroup
group:$(gettext "_Music Player (M)")
exec:::clear
exec:::/usr/lib/F123-wrappers/tips.sh cmus
exec:::command cmus
endgroup
group:$(gettext "Stringed _Instrument Tuner (I)")
exec:::clear
exec:::/usr/lib/F123-wrappers/tips.sh bashtuner
exec:::command bashtuner
endgroup
group:$(gettext "_Pandora Internet Radio (P)")
exec:::clear
exec:::/usr/lib/F123-wrappers/tips.sh pianobar
exec:::test -d "${XDG_CONFIG_HOME:-$HOME/.config}/pianobar" || command /usr/lib/F123-wrappers/configure-pianobar.sh
exec:::command pianobar
endgroup
group:$(gettext "Youtube (_Audio Only) (A)")
exec:::clear
exec:::/usr/lib/F123-wrappers/tips.sh youtube-viewer
exec:::command youtube-viewer -novideo
endgroup
group:$(gettext "Youtube (Full _Video) (V)")
exec:::clear
exec:::/usr/lib/F123-wrappers/tips.sh youtube-viewer
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-ignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
exec:::command startx /usr/lib/F123-wrappers/xlauncher lxterminal -e youtube-viewer
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-unignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
endgroup
nop:$(gettext "Book Readers")
group:$(gettext "_Book Reader (B)")
exec::makemenu: \
echo "menu:books:$(gettext "Books"):$(gettext "Select book to read")"; \
find \$HOME -type f \( -iname "*.epub" -o -iname "*.pdf" \) -print0 |\
while read -d \$'\0' i ; do \
j="\$(basename "\$i")"; \
echo "exec:_\${j%%.*}::/usr/lib/F123-wrappers/bookreader.sh '\$i'"; \
done; \
echo nop; \
echo "exit:$(gettext "Media Menu").."
show:::books
remove:::books
endgroup
nop
exit:$(gettext "_Main Menu (M)")..
menu:office:$(gettext "Office"):$(gettext "Word processing, calendar, etc")
exec:$(gettext "_Month Calendar (M)"):pause:clear;command ncal
exec:$(gettext "_Year Calendar (Y)"):pause:clear;command ncal -y
group:$(gettext "_Spreadsheet (S)")
exec:::clear
exec:::/usr/lib/F123-wrappers/tips.sh sc-im
exec:::command sc-im
endgroup
group:$(gettext "_Text Editor (T)")
exec:::clear
exec:::/usr/lib/F123-wrappers/tips.sh ne
exec:::command ne --macro clear
endgroup
group:$(gettext "_Word Processor (W)")
exec:::clear
exec:::/usr/lib/F123-wrappers/tips.sh wordgrinder
exec:::command wordgrinder
endgroup
nop:$(gettext "OCR")
group:$(gettext "Lios OCR (_L)")
exec:::clear
exec:::/usr/lib/F123-wrappers/tips.sh localc
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-ignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
exec:::command startx /usr/lib/F123-wrappers/xlauncher lios
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-unignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
endgroup
nop:$(gettext "Office Suite")
group:$(gettext "_Spreadsheet (S)")
exec:::clear
exec:::/usr/lib/F123-wrappers/tips.sh localc
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-ignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
exec:::command startx /usr/lib/F123-wrappers/xlauncher localc
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-unignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
endgroup
group:$(gettext "_Word Processor (W)")
exec:::clear
exec:::/usr/lib/F123-wrappers/tips.sh lowriter
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-ignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
exec:::command startx /usr/lib/F123-wrappers/xlauncher lowriter
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-unignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
endgroup
group:$(gettext "Libre _Office (All Applications) (O)")
exec:::clear
exec:::/usr/lib/F123-wrappers/tips.sh $(shuf -n1 -e localc lowriter)
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-ignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
exec:::command startx /usr/lib/F123-wrappers/xlauncher soffice
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-unignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
endgroup
nop
exit:$(gettext "_Main Menu (M)")..
# submenu for configuring the computer.
menu:settings:$(gettext "Settings"):$(gettext "System configuration")
show:$(gettext "System Backup Menu (_Y)")..::backup
exec:$(gettext "Check for System _Updates (U)"):pause:clear;/usr/bin/update-f123light
exec:$(gettext "_Change Passwords (C)")::clear;/usr/lib/F123-wrappers/configure-passwords.sh
exec:$(gettext "E-_mail Configuration (M)")::clear;command configure-email
exec:$(gettext "Securit_y Configuration (Y)")::clear;/usr/lib/F123-wrappers/configure-security.sh
exec:$(gettext "Configure fast _language switching (L)")::clear;/usr/lib/F123-wrappers/language-chooser.sh
exec:$(gettext "Change System S_peech (P)")::clear;/usr/lib/F123-wrappers/configure-speech.sh
group:$(gettext "_Bluetooth manager (B)")
exec:::clear
exec:::/usr/lib/F123-wrappers/tips.sh blueman
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-ignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
exec:::command startx /usr/lib/F123-wrappers/blueman-launcher
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-unignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
endgroup
exec:$(gettext "Configure _Wifi (W)")::clear;sudo configure-wifi
nop
exit:$(gettext "_Main Menu (M)")..
menu:backup:$(gettext "Backup or restore your computer"):$(gettext "Backup or restore your computer")
exec:$(gettext "Backup your data and settings (_B)")::/usr/lib/F123-wrappers/backup-manager.sh
exec:$(gettext "Restore your data and settings (_R)")::/usr/lib/F123-wrappers/restore-manager.sh
exec:$(gettext "Full system backup (_F)")::/usr/lib/F123-wrappers/system-backup.sh
nop
exit:$(gettext "Settings Menu (_S)")..
menu:help:$(gettext "Get Help with F123 Light"):$(gettext "Get Help with F123Light")
exec:$(gettext "_Get Help (G)"):pause:command echo -e "For help please subscribe to the F123 visual email list\nhttps://groups.io/g/F123-Visual-English"
exec:$(gettext "Access text chat to request help (_C)")::command irssi --home /etc/F123-Config/irssi
exec:$(gettext "Request remote assistance with my computer (_R)"):pause:command sudo cfh
nop
exec:$(gettext "About F123Light (_A)"):pause:/usr/lib/F123-wrappers/about.sh
nop
exit:$(gettext "_Main Menu")..
menu:power:$(gettext "Turn off or Restart Computer"):$(gettext "Shutdown or restart your computer")
exec:$(gettext "_Lock (L)")::vlock -a
exec:$(gettext "Turn _Off (O)")::poweroff &> /dev/null || sudo poweroff
exec:$(gettext "_Restart (R)")::reboot &> /dev/null || sudo reboot
nop
exit:$(gettext "_Main Menu (M)")..
$(if [[ -r ~/.config/F123/menu ]]; then
echo "menu:custom_accessories:$(gettext "User Defined Applications"):$(gettext "User Defined Applications")"
cat ~/.config/F123/menu
echo "nop"
echo "exit:$(gettext "Main Menu (_M)").."
fi)
EOF

View File

@ -1,45 +0,0 @@
#!/bin/bash
# reminders
#
# Copyright 2018, F123 Consulting, <information@f123.org>
# Copyright 2018, Storm Dragon, <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.
#
#--code--
for i in /usr/lib/F123-includes/*.sh ; do
source "$i"
done
clear_calendar() {
[[ -f "$HOME/calendar" ]] && {
rm "$HOME/calendar";
msgbox "All reminders deleted.";
} || msgbox "No reminders found."
}
while [[ "$choice" != "exit" ]]; do
choice="$(menulist "Add Reminder" "Add something to your calendar" "Remove Reminder" "Remove something from your reminders" "Clear Reminders" "Remove everything from your reminders" "Exit" "Close this app")"
choice="${choice,,}"
choice="${choice// /_}"
if [[ "$choice" != "exit" && "$choice" != "" ]]; then
eval "$choice"
else
break
fi
done
exit 0

View File

@ -1,76 +0,0 @@
#!/bin/bash
# reset-a11y.sh
# Description: completely restore the system to last known working state
#
# Copyright 2019, F123 Consulting, <information@f123.org>
# Copyright 2019, Storm Dragon, <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.
#
#--code--
# Load functions and reusable code:
if [[ -d /usr/lib/F123-includes/ ]]; then
for i in /usr/lib/F123-includes/*.sh ; do
source $i
done
fi
# the gettext essentials
export TEXTDOMAIN=reset-a11y
export TEXTDOMAINDIR=/usr/share/locale
source gettext.sh
# Log writing function
log() {
# Usage: command | log for just stdout.
# Or command |& log for stderr and stdout.
while read -r line ; do
echo "$line" | sudo tee -a "$logFile" &> /dev/null
done
}
# Log file name is /var/log/scriptname
logFile="/var/log/${0##*/}"
# Clear previous logs
echo -n | sudo tee "$logFile" &> /dev/null
set -o pipefail
# Attempt to restore speech-dispatcher.
if [[ -r /etc/F123-Config/backup/speechd.conf ]]; then
sudo mv -f /etc/F123-Config/backup/speechd.conf /etc/speech-dispatcher/speechd.conf | log
sudo pkill -9 speech-dispatch
fi
# Attempt to restore Fenrir
if [[ -r /etc/F123-Config/backup/fenrir.conf ]]; then
mv -f /etc/F123-Config/backup/fenrir.conf /etc/fenrirscreenreader/settings/settings.conf | log
# Try to restart the installed copy of Fenrir.
# check for running fenrir service
systemctl is-active fenrirscreenreader |& log && sudo systemctl stop fenrirscreenreader |& log
# Stop a running fenrir not controled by systemd.
echo "command quitapplication" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock |& log
# One last attempt to kill any running fenrir applications.
sudo killall -15 fenrir |& log
# Start installed copy
sudo systemctl start fenrirscreenreader
fi
exit 0

View File

@ -1 +0,0 @@
docx.sh

View File

@ -1,104 +0,0 @@
#!/bin/bash
# Select-language
#
# Copyright 2018, F123 Consulting, <information@f123.org>
# Copyright 2018, Storm Dragon, <storm_dragon@linux-a11y.org>
# Copyright 2018, Kyle, <kyle@free2.ml>
#
# 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.
#
#--code--
export TEXTDOMAIN=select-language
export TEXTDOMAINDIR=/usr/share/language
. gettext.sh
# Log writing function
log() {
while read -r line ; do
echo "$line" | sudo tee -a "$logFile" &> /dev/null
done
}
# Log file name is /var/log/scriptname
logFile="/var/log/${0##*/}"
# Clear previous logs
echo -n | sudo tee "$logFile" &> /dev/null
# For additional language options, add them to the for list and add a corresponding line to the case below the menulist
ifs="$IFS"
IFS=$'\n'
for l in "American English" "Brazilian Portuguese" "Castilian Spanish" "Egyptian Arabic" ; do
# Dialog requires 2 options for the menu, we hide the tags, but it still needs to be sent twice.
languages+=("$l" "$l")
done
language="$(dialog --visit-items --backtitle " " --no-tags --menu \
"$(gettext "Please press 'Enter' if you will use F123Light in English, or use the up and down arrow keys to select another language. Press 'Enter' once you have found the language you would like to use most often in this computer.")" \
0 0 0 ${languages[@]} --stdout)"
IFS="$ifs"
# The case that corresponds to the for loop above
case "$language" in
'American English') locale=en_US.UTF-8; speechProvider=rhvoice;;
'Brazilian Portuguese') locale=pt_BR.UTF-8; speechProvider=rhvoice;;
'Castilian Spanish') locale=es_ES.UTF-8; speechProvider=espeak-ng-mbrola-generic;;
'Egyptian Arabic') locale=ar_EG.UTF-8; speechProvider=espeak-ng-mbrola-generic;;
esac
# Exit if language remains unset, i.e.
# if the user has pressed the escape key to close the menu
if [[ -z "$language" ]]; then
echo "No language selected." | log
exit 0
fi
# Load the correct font.
# Load the correct custom keymap at boot if present
case "${locale%%.*}" in
"ar_EG") fontName="/usr/share/kbd/consolefonts/iso06.16.gz";;
*) fontName="lat2-16";;
esac
echo "FONT=${fontName}" | sudo tee "/etc/vconsole.conf" &> /dev/null
if [[ -f "/usr/share/kbd/keymaps/i386/qwerty/${locale%%.*}.map.gz" ]]; then
echo "KEYMAP=/usr/share/kbd/keymaps/i386/qwerty/${locale%%.*}.map.gz" | sudo tee -a "/etc/vconsole.conf" &> /dev/null
fi
sudo systemctl enable systemd-vconsole-setup.service |& log
# Set the chosen language for system locale and speech.
sudo sed -i -e "s/LANG=.*/LANG=${locale}/" /etc/locale.conf
case "${locale::5}" in
"en_US") sudo sed -i -e "s/^[#[:space:]]*DefaultLanguage [[:space:]]*\S*$/ DefaultLanguage en/" -e 's/\(.*Language\) \(.*\)\..*/\1\L\2/' "/etc/speech-dispatcher/speechd.conf" |& log
sudo cp /etc/fenrirscreenreader/settings/settings.conf /etc/F123-Config/backup/fenrir.conf
sudo sed -i 's/^\(#v\|v\)oice.*/voice=bdl/' /etc/fenrirscreenreader/settings/settings.conf |& log;;
"pt_BR") sudo sed -i -e "s/^[#[:space:]]*DefaultLanguage [[:space:]]*\S*$/ DefaultLanguage pt/" -e 's/\(.*Language\) \(.*\)\..*/\1\L\2/' "/etc/speech-dispatcher/speechd.conf" |& log
sudo cp /etc/fenrirscreenreader/settings/settings.conf /etc/F123-Config/backup/fenrir.conf
sudo sed -i 's/^voice=/#voice=/' /etc/fenrirscreenreader/settings/settings.conf |& log;;
*) sudo sed -i -e "s/^[#[:space:]]*DefaultLanguage [[:space:]]*\S*$/ DefaultLanguage ${locale::2}/" "/etc/speech-dispatcher/speechd.conf" |& log;;
esac
sudo sed -i "s/^[[:space:]]*DefaultModule [[:space:]]*\S*$/ DefaultModule $speechProvider/" /etc/speech-dispatcher/speechd.conf |& log
sudo cp /etc/fenrirscreenreader/punctuation/${locale::2}.conf /etc/fenrirscreenreader/punctuation/default.conf |& log
# Write to the firstboot flag file so that this script will be skipped when first-boot runs again after the system is rebooted
test -f ${HOME}/.firstboot && echo "set" > ${HOME}/.firstboot
# Language settings require reboot to fully take effect if the language is not American English.
if [[ "$language" != "American English" || "${LANG::5}" != "en_US" ]]; then
gettext -e 'Configuring the computer in your selected language...\n'
read -t 3 continue
sudo reboot
fi

View File

@ -1,78 +0,0 @@
#!/bin/bash
# system-backup.sh
# Description:
#
# Copyright 2019, F123 Consulting, <information@f123.org>
# Copyright 2019, Storm Dragon, <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.
#
#--code--
# Load functions and reusable code:
if [[ -d /usr/lib/F123-includes/ ]]; then
for i in /usr/lib/F123-includes/*.sh ; do
source $i
done
fi
# the gettext essentials
export TEXTDOMAIN=system-backup
export TEXTDOMAINDIR=/usr/share/locale
source gettext.sh
# Log writing function
log() {
# Usage: command | log for just stdout.
# Or command |& log for stderr and stdout.
while read -r line ; do
echo "$line" | sudo tee -a "$logFile" &> /dev/null
done
}
# Log file name is /var/log/scriptname
logFile="/var/log/${0##*/}"
# Clear previous logs
echo -n | sudo tee "$logFile" &> /dev/null
# Prompt for backup media to be connnected.
msgbox "$(gettext "If you have not yet done so, please connect an sdcard to your computer. when you are ready to continue, press enter.")"
declare -a drivesMenu
for i in $(list_drives | grep 'sd[a-z]'); do
drivesMenu+=($i $i)
done
backupDrive="$(menulist ${drivesMenu[@]})"
if [[ -z "$backupDrive" ]]; then
echo "No drive selected, user canceled." | log
exit 0
fi
# Try to unmount the selected drive
sudo umount -A -R -f -l ${backupDrive%:*} |& log
# Correct backupDrive so that we can use it for rpi-clone
backupDrive="${backupDrive##*/}"
backupDrive="${backupDrive%:*}"
backupDrive="${backupDrive//[[:digit:]]/}"
echo "Backup destination is $backupDrive" | log
# Try to unmount any remaining partitions on the selected drive
sudo umount -A -R -f -l /dev/${backupDrive}* |& log
sudo rpi-clone -U -v $backupDrive |& log | dialog --progressbox "Creating backup Image..." 0 0
exit 0

View File

@ -1,66 +0,0 @@
#!/bin/bash
# Make setting the timezone easier
#
# Copyright 2018, F123 Consulting, <information@f123.org>
# Copyright 2018, Storm Dragon, <storm_dragon@linux-a11y.org>
# Copyright 2018, Kyle, <kyle@free2.ml>
#
# 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.
#
#--code--
# Setup gettext
export TEXTDOMAIN=timezone.sh
export TEXTDOMAINDIR=/usr/share/locale
. gettext.sh
export DIALOGOPTS='--insecure --no-lines --visit-items'
# Log writing function
log() {
while read -r line ; do
echo "$line" | sudo tee -a "$logFile" &> /dev/null
done
}
# Log file name is /var/log/scriptname
logFile="/var/log/${0##*/}"
# Clear previous logs
echo -n | sudo tee "$logFile" &> /dev/null
# Get the list of timezones
mapfile -t regions < <(timedatectl --no-pager list-timezones | cut -d '/' -f1 | sort -u)
# Use the same text twice here and just hide the tag field.
region=$(dialog --backtitle "$(gettext "Please select your Region")" \
--no-tags \
--menu "$(gettext "Use up and down arrows or page-up and page-down to navigate the list, and press 'Enter' to make your selection.")" 0 0 0 \
$(for i in ${regions[@]} ; do echo "$i";echo "$(gettext "$i")";done) --stdout)
mapfile -t cities < <(timedatectl --no-pager list-timezones | grep "$region" | cut -d '/' -f2 | sort -u)
# Use the same text twice here and just hide the tag field.
city=$(dialog --backtitle "$(gettext "Please select a city near you")" \
--no-tags \
--menu "$(gettext "Use up and down arrow or page-up and page-down to navigate the list.")" 0 0 10 \
$(for i in ${cities[@]} ; do echo "$i";echo "$(gettext "$i")";done) --stdout)
# Set the timezone
sudo timedatectl set-timezone ${region}/${city} |& log
# Make sure we are syncing with the internet
sudo timedatectl set-ntp true |& log
exit 0

View File

@ -1,63 +0,0 @@
#!/bin/bash
# tips.sh
# Description
#
# Copyright 2019, F123 Consulting, <information@f123.org>
# Copyright 2019, Storm Dragon, <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.
#
#--code--
# Load functions and reusable code:
source /usr/lib/F123-includes/script_functions.sh
source /usr/lib/F123-includes/preferences-manager.sh
source ~/.preferences
# Create the directory structure if it doesn't exist.
[[ -d ~/.config/F123 ]] || mkdir -p ~/.config/F123
# Load or create the current tipIndex.
if [[ -r ~/.config/F123/.${1}.tipindex ]]; then
tipIndex=$(<~/.config/F123/.${1}.tipindex)
else
tipIndex=0
fi
# Tips are on by default, so set the preference if it's not found.
if [[ -z "${preferences[tips]}" ]]; then
preferences[tips]=1
write_preferences
fi
# Get the path where tips are stored for the current locale and application name ($1).
tipPath="/usr/share/doc/F123/tips/${LANG}/${1}.txt"
if [[ ! -r "$tipPath" ]]; then
exit 0
fi
if (( ${preferences[tips]} )); then
mapfile -t tips < ${tipPath}
if [[ ${tipIndex} -ge ${#tips[@]} ]]; then
tipIndex=0
fi
echo "command say ${tips[$tipIndex]}" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
((tipIndex++))
echo -n "$tipIndex" > ~/.config/F123/.${1}.tipindex
fi
exit 0

View File

@ -1 +0,0 @@
docx.sh

View File

@ -1 +0,0 @@
docx.sh

View File

@ -1,42 +0,0 @@
#!/bin/bash
# x-self-voiced
#
# Copyright 2019, F123 Consulting, <information@f123.org>
# Copyright 2019, Storm Dragon, <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.
#
#--code--
# Check for required programs
for i in jwm startx ; do
command -v "$i" || {
echo "Please install $i and run $0 again."
exit 1
}
done
if [[ $# == 0 ]]; then
echo "Usage $0 \"program name\" optional arguments."
exit 1
fi
programName="$1"
shift
command jwm &
command xbindkeys &
command "$programName" $@
exit 0

View File

@ -1,48 +0,0 @@
#!/bin/bash
# xlauncher
#
# Copyright 2018, F123 Consulting, <information@f123.org>
# Copyright 2018, Storm Dragon, <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.
#
#--code--
# Check for required programs
for i in jwm orca startx ; do
command -v "$i" || {
echo "Please install $i and run $0 again."
exit 1
}
done
if [[ $# == 0 ]]; then
echo "Usage $0 \"program name\" optional arguments."
exit 1
fi
programName="$1"
shift
export GTK_MODULES=gail:atk-bridge
export GNOME_ACCESSIBILITY=1
export QT_ACCESSIBILITY=1
export QT_LINUX_ACCESSIBILITY_ALWAYS_ON=1
command jwm &
command xbindkeys &
# Try orca, but use orca -replace if it doesn't work.
pgrep orca || command orca&
command "$programName" $@
exit 0

View File

@ -1 +0,0 @@
docx.sh

View File

@ -1,37 +0,0 @@
#!/bin/bash
# about.sh
# Description: Provides nicely formatted version information.
#
# Copyright 2019, F123 Consulting, <information@f123.org>
# Copyright 2019, Storm Dragon, <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.
#
#--code--
# Multilanguage support.
export TEXTDOMAIN=about.sh
export TEXTDOMAINDIR=/usr/share/locale
. gettext.sh
[[ -r "/etc/timestamp-f123light" ]] && version="$(</etc/timestamp-f123light)"
version="${version:-0000000000}"
version="${version::2}.${version:2:2}.${version:4:2}.${version:6:2}.${version:8:2}"
gettext -e "F123Light Copyright F123 Consulting\n\nVersion: "
echo "$version"
exit 0

View File

@ -1,82 +0,0 @@
#!/bin/bash
# backup-manager.sh
# Description:
#
# Copyright 2019, F123 Consulting, <information@f123.org>
# Copyright 2019, Storm Dragon, <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.
#
#--code--
# Load functions and reusable code:
if [[ -d /usr/lib/F123-includes/ ]]; then
for i in /usr/lib/F123-includes/*.sh ; do
source $i
done
fi
# the gettext essentials
export TEXTDOMAIN=backup-manager
export TEXTDOMAINDIR=/usr/share/locale
source gettext.sh
# Log writing function
log() {
# Usage: command | log for just stdout.
# Or command |& log for stderr and stdout.
while read -r line ; do
echo "$line" | sudo tee -a "$logFile" &> /dev/null
done
}
# Log file name is /var/log/scriptname
logFile="/var/log/${0##*/}"
# Clear previous logs
echo -n | sudo tee "$logFile" &> /dev/null
# See if we can find a previous backup.
destination="$(find /media -type d -name "storeBackup" -print -quit)"
# If destination is set, prompt to make sure the backup should be done here.
if [[ -n "$destination" ]]; then
echo "Previous backup found at $destination" | log
[[ "$(yesno "$(gettext "A previous backup exists. Would you like to backup everything to ") $destination?")" != "Yes" ]] && { unset destination; echo "Destination cleared per user request." | log; }
fi
# If destination is empty there is no previous backup, so prompt for a new one.
if [[ -z "$destination" ]]; then
echo "No previous backup found. Generating a list of possible backup drives from /media" | log
declare -a driveList
for i in $(find /media -maxdepth 1 ! -path /media -type d 2> /dev/null) ; do
echo "$i" | log
driveList+=($i $i)
done
# Present list of destinations to the user.
destination="$(menulist ${driveList[@]})"
fi
# If destination is still empty exit
if [[ -z "$destination" ]]; then
echo "No drive selected, user canceled." | log
exit 0
fi
msgbox "$(gettext "Starting backup. This could take a long time..")"
sudo storeBackup.pl -f /etc/F123-Config/storeBackup.conf --backupDir "$destination"
exit 0

View File

@ -1,42 +0,0 @@
#!/bin/bash
# blueman-launcher
#
# Copyright 2019, F123 Consulting, <information@f123.org>
# Copyright 2019, Storm Dragon, <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.
#
#--code--
# Check for required programs
for i in jwm orca startx ; do
command -v "$i" || {
echo "Please install $i and run $0 again."
exit 1
}
done
export GTK_MODULES=gail:atk-bridge
export GNOME_ACCESSIBILITY=1
export QT_ACCESSIBILITY=1
export QT_LINUX_ACCESSIBILITY_ALWAYS_ON=1
command jwm &
command xbindkeys &
# Try orca, but use orca -replace if it doesn't work.
pgrep orca || command orca&
command blueman-applet&
command blueman-manager
exit 0

View File

@ -1,45 +0,0 @@
#!/bin/bash
# F123 book reader
#
# Copyright 2018, F123 Consulting, <information@f123.org>
# Copyright 2018, Kyle, <kyle@free2.ml>
#
# 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.
#
#--code--
# It is safe to assume one parameter here,as this script is to be run from a generated menu of books.
# In any case, we take only one parameter, even if this script runs from a file manager.
book=$1
# Each book type must be extracted using a different method.
# Determine the book type and its extraction method using its file extension.
type=${book##*.}
# Extract the book and pipe the result into w3m depending on its type
# New types may be added here at any time.
case $type in
epub|Epub|EPUB) epub2txt -w 80 "$book" | w3m
;;
pdf|Pdf|PDF) pdftotext -layout "$book" - | w3m
;;
txt|Txt|TXT|HTML|Html|html) w3m "$book"
;;
# Insert new formats above this line
*) exit 1
;;
esac
exit 0

View File

@ -1,66 +0,0 @@
#!/bin/bash
# change-mode: Configuration utility to change the menu and available services.
#
# Copyright 2019, F123 Consulting, <information@f123.org>
# Copyright 2019, Storm Dragon, <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.
#
#--code--
export TEXTDOMAIN=change-mode
export TEXTDOMAINDIR=/usr/share/locale
. gettext.sh
# Load F123 includes
for i in /usr/lib/F123-includes/*.sh ; do
source $i
done
if [[ "$(whoami)" != "root" ]]; then
msgbox "Please run this script as root."
exit 0
fi
# If $1 exists check for it and set mode if it exists.
if [[ -n "$1" ]]; then
if [[ -x "/usr/lib/F123-wrappers/pdmenu_$1.sh" ]]; then
sed -i "s#preproc:/usr/lib/F123-wrappers/pdmenu_.*\.sh#preproc:/usr/lib/F123-wrappers/pdmenu_${1}.sh#" /etc/pdmenurc
echo -n "$1" | sudo tee /etc/mode &> /dev/null
else
echo "menu mode $1 not found. Please make sure the file exists and is executable."
exit 1
fi
exit 0
fi
# Create an array of menus.
declare -a modeList
for i in /usr/lib/F123-wrappers/pdmenu_*.sh ; do
i="${i##*_}"
i="${i%.sh}"
modeList+=($i)
done
mode="$(menulist $(for i in ${modeList[@]} Cancel ; do echo "$i $i";done))"
# Check for cancelation conditions.
if [[ "$mode" == "Cancel" || -z "$mode" ]]; then
exit 0
fi
sed -i "s#preproc:/usr/lib/F123-wrappers/pdmenu_.*\.sh#preproc:/usr/lib/F123-wrappers/pdmenu_${mode}.sh#" /etc/pdmenurc
exit 0

View File

@ -1,91 +0,0 @@
#!/bin/bash
# chuser.sh
# Description: Changes the username to something new at login
#
# Copyright 2019, F123 Consulting, <information@f123.org>
# Copyright 2019, Storm Dragon, <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.
#
#--code--
# Load functions and reusable code:
if [[ -d /usr/lib/F123-includes/ ]]; then
for i in /usr/lib/F123-includes/*.sh ; do
source $i
done
fi
# the gettext essentials
export TEXTDOMAIN=chuser
export TEXTDOMAINDIR=/usr/share/locale
source gettext.sh
# Log writing function
log() {
# Usage: command | log for just stdout.
# Or command |& log for stderr and stdout.
while read -r line ; do
echo "$line" | sudo tee -a "$logFile" &> /dev/null
done
}
# Log file name is /var/log/scriptname
logFile="/var/log/${0##*/}"
# Clear previous logs
echo -n | sudo tee "$logFile" &> /dev/null
# The user can not be logged in when the name change occurs.
# Write a file to /etc/cron.d/chuser
# The file will run at boot, change the username, and delete itself.
if [[ "$(whoami)" == "root" ]]; then
gettext -e "Please run this script as the user you would like to rename, not as root.\n"
echo "Can not rename root user." | log
exit 1
fi
oldUser="$USER"
echo "Current username is $oldUser" | log
groups="$(groups "$oldUser")"
groups="${groups// /,}"
echo "Groups to migrate with the new user are: $groups" | log
newUser="$1"
echo "New user is $newUser" | log
if ! [[ "$newUser" =~ ^[a-z][-a-z0-9]*$ ]]; then
echo "Username $newUser failed validation." | log
exit 1
fi
echo "Username $newUser passed validation." | log
echo "Writing /etc/cron.d/0chuser" | log
cat << EOF | sudo tee /etc/cron.d/0chuser &> /dev/null
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
@reboot root usermod -a -G $groups -m -d /home/$newUser -l $newUser $oldUser && sed -E -i "s/autologin +[a-zA-Z0-9-]+/autologin $newUser/g" /etc/systemd/system/getty@tty*.service.d/override.conf; rm -f /etc/cron.d/0chuser;reboot
EOF
# Files in cron.d must be 644 to work.
sudo chmod 644 /etc/cron.d/0chuser && echo "Setting file permissions on /etc/cron.d/0chuser to 644" | log
# Reboot the computer so the script can run
sudo reboot
exit 0

View File

@ -1,52 +0,0 @@
#!/bin/bash
# configure-email.sh
# Description: Select prefered email client and configure it.
#
# Copyright 2018, F123 Consulting, <information@f123.org>
# Copyright 2018, Storm Dragon, <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.
#
#--code--
# Load functions and reusable code:
source /usr/lib/F123-includes/script_functions.sh
# List of possible email clients.
clientList=(
mutt
thunderbird
)
client="$(menulist $(for i in ${clientList[@]} ; do echo "$i $i"; done))"
# Set the new selection as the client in preferences
sed -i "s/\[emailClient\]=.*/[emailClient]=\"$client\"/" ~/.preferences
# Open or configure the selected client.
case "${client}" in
"mutt")
[[ ! -d ~/.mutt ]] && command fleacollar
command mutt;;
"thunderbird")
python /usr/share/fenrirscreenreader/tools/fenrir-ignore-screen &> /dev/null
echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
command startx /usr/lib/F123-wrappers/xlauncher thunderbird
python /usr/share/fenrirscreenreader/tools/fenrir-unignore-screen &> /dev/null
echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock;;
esac
exit 0

View File

@ -1,61 +0,0 @@
#!/bin/bash
# configure-passwords
#
# Copyright 2018, F123 Consulting, <information@f123.org>
# Copyright 2018, Storm Dragon, <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.
#
#--code--
export TEXTDOMAIN=configure-passwords
export TEXTDOMAINDIR=/usr/share/locale
. gettext.sh
# Load F123 includes
for i in /usr/lib/F123-includes/*.sh ; do
source $i
done
set_password_with_text() {
local passOne="one"
local passTwo="two"
while [[ "$passOne" != "$passTwo" ]]; do
echo
read -ep "$(eval_gettext "Enter password for $1: ")" passOne
read -ep "$(eval_gettext "Enter password for $1 again: ")" passTwo
if [[ "$passOne" != "$passTwo" ]]; then
echo "$(gettext "Passwords do not match")"
fi
done
echo "$1:$passOne" | sudo chpasswd
}
# Provide possibility for setting passwords using plain text and readline navigation.
showPasswords="$(yesno "$(gettext "Do you want to hear your password spoken out-loud as you type it? This would make entering the password easier for some persons, but it is also a security risk if your computer has a screen where people can read what you write, or if someone is hearing what you are typing.")")"
userName="$(menulist $(awk -v OFS=' ' -F':' '{ if ( $3 >= 1000 && $3 <= 60000 && $7 != "/sbin/nologin" && $7 != "/bin/false" ) print $1, $1; }' /etc/passwd) Cancel cancel)"
# Check for cancelation conditions.
if [[ "$userName" == "Cancel" || -z "$userName" ]]; then
exit 0
fi
# If we don't have to provide plain text, just let the system do it's thing.
if [[ "$showPasswords" != "Yes" ]]; then
sudo passwd $userName
else
set_password_with_text $userName
fi
exit 0

View File

@ -1,97 +0,0 @@
#!/bin/bash
# configure-pianobar.sh
# Description: Easily configure pianobar.
#
# Copyright 2018, F123 Consulting, <information@f123.org>
# Copyright 2018, Storm Dragon, <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.
#
#--code--
# Load functions and reusable code:
source /usr/lib/F123-includes/script_functions.sh
write_configuration() {
cat << EOF > "${configPath}/config"
user = $1
password = $2
event_command = $configPath/eventcmd.sh
audio_quality = high
act_songban = !
EOF
}
create_eventcmd() {
echo '#!/bin/bash
# create variables
while read L; do
k="$(echo "$L" | cut -d "=" -f 1)"
v="$(echo "$L" | cut -d "=" -f 2)"
export "$k=$v"
done < <(grep -e "^\(title\|artist\|album\|stationName\|pRet\|pRetStr\|wRet\|wRetStr\|songDuration\|songPlayed\|rating\|coverArt\|stationCount\|station[0-9]*\)=" /dev/stdin) # do not overwrite $1
album="${album% \(*}"
artist="${artist% \(*}"
case "$1" in
"songstart")
echo "$artist\\$title\\$album\\$stationName" > '"$configPath"'/nowplaying
grep -iqs "^${artist}$" '"$configPath"'/banlist.txt && echo -n "!" > '"$configPath"'/ctl
grep -iqs "^${artist}$" '"$configPath"'/lovelist.txt && echo -n "+" > '"$configPath"'/ctl
;;
"songfinish")
rm '"$configPath/nowplaying"'
;;' > "$configPath/eventcmd.sh"
echo "\"songlove\")
$0 -M
;;" >> "$configPath/eventcmd.sh"
echo '*)
if [ "$pRet" -ne 1 ]; then
echo "$1 failed"
elif [ "$wRet" -ne 1 ]; then
echo "$a failed, network error."
fi
;;
esac
exit 0' >> "$configPath/eventcmd.sh"
chmod 700 "$configPath/eventcmd.sh"
}
configPath="${XDG_CONFIG_HOME:-$HOME/.config}/pianobar"
if [[ -d "$configPath" ]]; then
[[ "$(yesno "A configuration file already exists, would you like to replace it?")" == "Yes" ]] && rm -rf "$configPath"
fi
if [[ ! -d "$configPath" ]]; then
email="$(inputbox "Please enter your Pandor account name. (email address)")"
[[ -z "email" ]] && exit 0
password="$(passwordbox "Please enter your Pandora password.")"
[[ -z "password" ]] && exit 0
mkdir -p "$configPath" &> /dev/null
mkfifo "$configPath/ctl" &> /dev/null
write_configuration "$email" "$password"
create_eventcmd
# Find out if we need a proxy
country="$(curl -s ipinfo.io | grep '"country":' | cut -d '"' -f4)"
if [[ "${country^^}" != "US" ]]; then
proxy="$(curl -s "https://gimmeproxy.com/api/getProxy?country=US" | grep '"ip":' | cut -d '"' -f4)"
echo "control_proxy = ${proxy}:80" >> "$configPath/config"
fi
msgbox "Pianobar has been configured."
fi
exit 0

View File

@ -1,92 +0,0 @@
#!/bin/bash
# configure-security
#
# Copyright 2018, F123 Consulting, <information@f123.org>
# Copyright 2018, Storm Dragon, <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.
#
#--code--
export TEXTDOMAIN=configure-security
export TEXTDOMAINDIR=/usr/share/locale
. gettext.sh
# Load F123 includes
for i in /usr/lib/F123-includes/*.sh ; do
source $i
done
# Log writing function
log() {
while read -r line ; do
echo "$line" | sudo tee -a "$logFile" &> /dev/null
done
}
# Log file name is /var/log/scriptname
logFile="/var/log/${0##*/}"
# Clear previous logs
echo -n | sudo tee "$logFile" &> /dev/null
# How was this script called?
CALLED=${0##*/}
disable_password() {
echo "%wheel ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/f123
msgbox "$(gettext "Passwords are no longer required to perform administrative tasks.")"
echo "Disabled password requirements for sudo." | log
}
require_password() {
echo "%wheel ALL=(ALL) ALL" | sudo tee /etc/sudoers.d/f123
msgbox "$(gettext "Passwords are now required to perform administrative tasks.")"
echo "Enabled password requirements for sudo." | log
}
disable_autologin() {
sudo rm -f /etc/systemd/system/getty@tty*.service.d/override.conf 2> /dev/null
msgbox "$(gettext "You will need to enter username and password at login for this computer.")"
echo "Disabled autologin." | log
}
enable_autologin() {
local currentUser="$USER"
for i in {1..12} ; do
cat << EOF | sudo tee "/etc/systemd/system/getty@tty$i.service.d/override.conf" &> /dev/null
[Service]
ExecStart=
ExecStart=-/usr/bin/agetty --autologin $currentUser --noclear %I \$TERM
Type=idle
EOF
done
msgbox "$(gettext "You no longer need to enter username and password at login for this computer.")"
echo "Enabled autologin." | log
}
while : ; do
action="$(menulist "enable_autologin" "$(gettext "Login to your computer without the need of entering username and password.")" "disable_autologin" "$(gettext "Require a username and password to login to your computer.")" "require_password" "$(gettext "request a password when making changes that require administrator access.")" "disable_password" "$(gettext "Make changes to your computer that require administrator access without requiring a password. (security risk)")" "exit" "$(eval_gettext "Close \$CALLED")")"
if [[ "$action" != "exit" && -n "$action" ]]; then
echo "Running $action" | log
eval "$action"
else
echo "Exiting" | log
break
fi
done
exit 0

View File

@ -1,47 +0,0 @@
#!/bin/bash
# configure-sound
#
# Copyright 2018, F123 Consulting, <information@f123.org>
# Copyright 2018, Storm Dragon, <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.
#
#--code--
export TEXTDOMAIN=configure-sound
export TEXTDOMAINDIR=/usr/share/locale
. gettext.sh
# Load F123 includes
for i in /usr/lib/F123-includes/*.sh ; do
source $i
done
# How was this script called?
CALLED=${0##*/}
soundAction="$(menulist "USB_Soundcard" "$(gettext "USB_Soundcard")" "3MM_Jack" "$(gettext "3MM_Jack")")"
[[ -n "$soundAction" ]] || exit 0
if [[ "$soundAction" == "USB_Soundcard" ]]; then
echo "blacklist snd_bcm2835" | sudo tee /etc/modprobe.d/onboard_sound.conf &> /dev/null
else
[[ -f "/etc/modprobe.d/onboard_sound.conf" ]] && sudo rm -f "/etc/modprobe.d/onboard_sound.conf"
fi
[[ "$(yesno "$(gettext "You need to reboot for the changes to take affect. Would you like to reboot now?")")" == "Yes" ]] && sudo reboot
exit 0

View File

@ -1,134 +0,0 @@
#!/bin/bash
# configure-speech
#
# Copyright 2018, F123 Consulting, <information@f123.org>
# Copyright 2018, Storm Dragon, <storm_dragon@linux-a11y.org>
# Copyright 2018, Kyle, <kyle@free2.ml>
#
# 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.
#
#--code--
export TEXTDOMAIN=configure-speech
export TEXTDOMAINDIR=/usr/share/locale
. gettext.sh
# include script functions
for i in /usr/lib/F123-includes/*.sh ; do
source $i
done
# Log writing function
log() {
# Usage: command | log for just stdout.
# Or command |& log for stderr and stdout.
while read -r line ; do
echo "$line" | sudo tee -a "$logFile" &> /dev/null
done
}
# Log file name is /var/log/scriptname
logFile="/var/log/${0##*/}"
# Clear previous logs
echo -n | sudo tee "$logFile" &> /dev/null
# For additional speech options, add them to the synthArray variable, then add the available languages
# to a line in the case below matching the option
# Note that espeak-ng supports the most languages, so other case lines
# can start with espeak-ng and remove unsupported languages
synthArray=(
espeak-ng
mbrola
rhvoice
)
for i in ${synthArray[@]} ; do
case $i in
espeak-ng) languages=('af_ZA' 'ar_EG' 'de_DE' 'en_US' 'es_ES' 'fr_FR' 'hi_IN' 'hu_HU' 'id_ID' 'pl_PL' 'pt_BR' 'sw_TZ' 'tr_TR' 'vi_VN' 'zh_CN');;
mbrola) languages=('af_ZA' 'ar_EG' 'de_DE' 'en_US' 'es_ES' 'fr_FR' 'hi_IN' 'hu_HU' 'id_ID' 'pl_PL' 'pt_BR' 'tr_TR' 'zh_CN');;
rhvoice) languages=('en_US');;
esac
# Only add a speech provider option if it has at least one voice to speak the current language
for l in ${languages[@]}; do
if [[ "$l" == "${LANG::5}" ]]; then
# Dialog requires 2 options for the menu, we hide the tags, but it still needs to be sent twice.
speechOptions+=("$i" "$i")
fi
done
done
speechProvider="$(menulist ${speechOptions[@]})"
speechProvider="${speechProvider,,}"
case "$speechProvider" in
"mbrola") speechProvider="espeak-ng-mbrola-generic";;
esac
# Exit if speechProvider remains unset, i.e.
# if the user has pressed the escape key to close the menu
test -z $speechProvider && exit 0
# Set the chosen speech provider option.
sudo sed -i.bak "s/^[[:space:]]*DefaultModule [[:space:]]*\S*$/ DefaultModule $speechProvider/" /etc/speech-dispatcher/speechd.conf |& log
# For espeak-ng to use the correct voice on US English based systems, it needs to be set to default language en-us.
# For pretty much everything else though, it has to just be en.
# So, check and set that here.
case "${LANG::5}" in
"en_US")
if [[ "${speechProvider::9}" == "espeak-ng" ]]; then
spdLang=en-us
else
spdLang=en
fi
sudo sed -i "s/^[[:space:]]*DefaultLanguage [[:space:]]*\S*$/ DefaultLanguage $spdLang/" /etc/speech-dispatcher/speechd.conf |& log
;;
esac
# Clear any keypresses in the buffer:
read -t .001 continue
# Load the new settings:
sudo pkill -1 speech-dispatch |& log
spd-say -o $speechProvider -l $spdLang "$(gettext "If you can hear this press the 'Enter' key to try the new voice. If you do nothing, the voice will not be changed and you will be back to the menu in 10 seconds.")"
read -n1 -t10 continue
# Error code 142 means a key was not pressed, so restore from backup.
if [[ $? -ne 0 ]]; then
sudo mv /etc/speech-dispatcher/speechd.conf.bak /etc/speech-dispatcher/speechd.conf |& log
# Load the old settings:
sudo pkill -1 speech-dispatch |& log
exit 1
fi
# Restart Fenrir with new speech provider changes
clear
sudo systemctl restart fenrirscreenreader |& log
# Attempt to restart orca to apply changes if it is running:
if pgrep orca &> /dev/null ; then
for i in {0..11} ; do
DISPLAY=:$i orca --replace &
[[ $? -eq 0 ]] && break
done
fi
# Remove the backup file.
[[ -f /etc/speech-dispatcher/speechd.conf.bak ]] && sudo rm -f /etc/speech-dispatcher/speechd.conf.bak |& log
# Update the speech-dispatcher backup for restore accessibility.
sudo cp -v /etc/speech-dispatcher/speechd.conf /etc/F123-Config/backup/speechd.conf |& log
exit 0

View File

@ -1 +0,0 @@
docx.sh

View File

@ -1 +0,0 @@
docx.sh

View File

@ -1,81 +0,0 @@
#!/bin/bash
# docx.sh
# Description: Helper for ne macro to convert from markdown to docx
#
# Copyright 2019, F123 Consulting, <information@f123.org>
# Copyright 2019, Storm Dragon, <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.
#
#--code--
declare -A message=(
# Change the strings in quotes for different languages.
[confirm]="The file is available as"
[continue]="Press enter to continue."
[error]="The file was not converted."
[prompt]="Enter file name: "
)
# Get the file name for the conversion.
read -erp "${message[prompt]}" fileName
# If variable is empty, do not write a file.
if [[ -z "$fileName" ]]; then
read -p "$message[error] ${message[continue]}" continue
exit 0
fi
# make sure fileName is in proper format.
fileName="$HOME/Documents/${fileName##*/}"
# Find out what we are converting to.
convertTo="${0##*/}"
convertTo="${convertTo%%.*}"
# Add the proper extension if needed.
extension="${fileName,,}"
extension="${extension##*.}"
if [[ "$extension" != "$convertTo" ]]; then
fileName+=".$convertTo"
fi
# Make sure we don't overwrite anything.
i=2
oldFileName="$fileName"
while [[ -f "$fileName" ]]; do
fileName="${oldFileName}"
fileName="${fileName%.*}"
fileName="${fileName%-[0-9]*}"
fileName="${fileName}-${i}.${convertTo}"
((i++))
done
# Convert the file to html
if ! markdown -o ~/.ne/.tmp.txt.html ~/.ne/.tmp.txt ; then
read -p "${message[error]} ${message[continue]}" continue
exit 1
fi
# Convert the file to the specified extension.
if lowriter --headless --convert-to $convertTo ~/.ne/.tmp.txt.html --outdir ~/.ne &> /dev/null ]]; then
mv ~/.ne/.tmp.txt.$convertTo "$fileName"
read -p "${message[confirm]} $fileName. ${message[continue]}" continue
else
read -p "${message[error]} ${message[continue]}" continue
fi

View File

@ -1 +0,0 @@
docx.sh

View File

@ -1 +0,0 @@
docx.sh

View File

@ -1 +0,0 @@
docx.sh

View File

@ -1,77 +0,0 @@
#!/bin/bash
# language-chooser.sh
# Description: Set languages for fast language switching.
#
# Copyright 2019, F123 Consulting, <information@f123.org>
# Copyright 2019, Storm Dragon, <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.
#
#--code--
# Load functions and reusable code:
source /usr/lib/F123-includes/script_functions.sh
export TEXTDOMAIN=language-chooser
export TEXTDOMAINDIR=/usr/share/locale
source gettext.sh
[[ -r /etc/languages ]] && source /etc/languages
# If no languages are defined, add the system default to the array.
if [[ -z $languages ]]; then
languages=(${LANG%%.*})
fi
# Supported languages are in an array of their own.
supportedLanguages=(
ar_EG
en_US
es_MX
pt_BR
)
# Create the menu for each language.
options=""
for i in ${supportedLanguages[@]} ; do
k="Add"
for j in ${languages[@]} ; do
if [[ "$j" == "$i" ]]; then
k="Remove"
fi
done
# Add each option twice so it is proper format for the menu.
options+=("$k $i" "$(gettext "$k") $i")
done
ifs="$IFS"
IFS=$'\n'
choice="$(menulist ${options[@]})"
IFS="$ifs"
# Update the languages array.
if [[ "${choice%% *}" == "Add" ]]; then
languages+=(${choice##* })
else
for i in "${!languages[@]}"; do
if [[ "${languages[i]}" == "${choice##* }" ]]; then
unset languages[i]
fi
done
fi
# Write the updated language options to disk.
echo "languages=(${languages[@]})" | sudo tee /etc/languages &> /dev/null
exit 0

View File

@ -1,37 +0,0 @@
#!/bin/bash
# mail-launcher.sh
# Description Launch the correct mail client as specified in preferences.
#
# Copyright 2018, F123 Consulting, <information@f123.org>
# Copyright 2018, Storm Dragon, <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.
#
#--code--
source ~/.preferences
case "${preferences[emailClient]}" in
"mutt") echo "exec:::command mutt";;
"thunderbird")
echo 'exec:::python /usr/share/fenrirscreenreader/tools/fenrir-ignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
exec:::command $([[ -n $DEMOMODE ]] && echo '-v') startx /usr/lib/F123-wrappers/xlauncher thunderbird
exec:::python /usr/share/fenrirscreenreader/tools/fenrir-unignore-screen &> /dev/null
exec:::echo -n "setting set screen#suspendingScreen=\$(</tmp/ fenrirSuspend)" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock';;
*) /usr/lib/F123-wrappers/configure-email.sh
esac
exit 0

View File

@ -1 +0,0 @@
mumble-manager.sh

Some files were not shown because too many files have changed in this diff Show More