From bda6672204ab0a6a2d0fdbf479d2f623aaefd05b Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Thu, 2 Apr 2020 15:59:24 -0400 Subject: [PATCH] changed wrapper and include paths to the stormux name. --- .../usr/lib/F123-wrappers/ar-SA/about.sh | 37 -- .../lib/F123-wrappers/ar-SA/backup-manager.sh | 82 ----- .../lib/F123-wrappers/ar-SA/change-mode.sh | 66 ---- .../usr/lib/F123-wrappers/ar-SA/chuser.sh | 91 ----- .../F123-wrappers/ar-SA/configure-email.sh | 52 --- .../ar-SA/configure-passwords.sh | 61 ---- .../F123-wrappers/ar-SA/configure-pianobar.sh | 97 ----- .../F123-wrappers/ar-SA/configure-security.sh | 92 ----- .../F123-wrappers/ar-SA/configure-sound.sh | 47 --- .../F123-wrappers/ar-SA/configure-speech.sh | 134 ------- .../files/usr/lib/F123-wrappers/ar-SA/doc.sh | 1 - .../files/usr/lib/F123-wrappers/ar-SA/docm.sh | 1 - .../files/usr/lib/F123-wrappers/ar-SA/docx.sh | 81 ----- .../files/usr/lib/F123-wrappers/ar-SA/dot.sh | 1 - .../files/usr/lib/F123-wrappers/ar-SA/fodt.sh | 1 - .../files/usr/lib/F123-wrappers/ar-SA/html.sh | 1 - .../F123-wrappers/ar-SA/language-chooser.sh | 77 ---- .../lib/F123-wrappers/ar-SA/mail-launcher.sh | 37 -- .../usr/lib/F123-wrappers/ar-SA/mud-loader.sh | 66 ---- .../ar-SA/mumble-manager-add-server.sh | 1 - .../ar-SA/mumble-manager-remove-server.sh | 1 - .../lib/F123-wrappers/ar-SA/mumble-manager.sh | 125 ------- .../files/usr/lib/F123-wrappers/ar-SA/odt.sh | 1 - .../files/usr/lib/F123-wrappers/ar-SA/ott.sh | 1 - .../files/usr/lib/F123-wrappers/ar-SA/pdf.sh | 1 - .../lib/F123-wrappers/ar-SA/pdmenu_default.sh | 339 ------------------ .../F123-wrappers/ar-SA/pdmenu_development.sh | 339 ------------------ .../usr/lib/F123-wrappers/ar-SA/reminders.sh | 45 --- .../F123-wrappers/ar-SA/restore-manager.sh | 78 ---- .../files/usr/lib/F123-wrappers/ar-SA/rtf.sh | 1 - .../F123-wrappers/ar-SA/select-language.sh | 104 ------ .../files/usr/lib/F123-wrappers/ar-SA/tips.sh | 63 ---- .../files/usr/lib/F123-wrappers/ar-SA/txt.sh | 1 - .../files/usr/lib/F123-wrappers/ar-SA/uot.sh | 1 - .../files/usr/lib/F123-wrappers/ar-SA/xml.sh | 1 - .../usr/lib/F123-wrappers/blueman-launcher | 42 --- .../files/usr/lib/F123-wrappers/bookreader.sh | 45 --- .../lib/F123-wrappers/configure-passwords.sh | 61 ---- .../lib/F123-wrappers/configure-pianobar.sh | 97 ----- .../usr/lib/F123-wrappers/en-US/about.sh | 37 -- .../lib/F123-wrappers/en-US/backup-manager.sh | 82 ----- .../lib/F123-wrappers/en-US/blueman-launcher | 42 --- .../usr/lib/F123-wrappers/en-US/bookreader.sh | 45 --- .../lib/F123-wrappers/en-US/change-mode.sh | 66 ---- .../usr/lib/F123-wrappers/en-US/chuser.sh | 91 ----- .../F123-wrappers/en-US/configure-email.sh | 52 --- .../F123-wrappers/en-US/configure-security.sh | 92 ----- .../F123-wrappers/en-US/configure-sound.sh | 47 --- .../F123-wrappers/en-US/configure-speech.sh | 134 ------- .../files/usr/lib/F123-wrappers/en-US/doc.sh | 1 - .../files/usr/lib/F123-wrappers/en-US/docm.sh | 1 - .../files/usr/lib/F123-wrappers/en-US/docx.sh | 81 ----- .../files/usr/lib/F123-wrappers/en-US/dot.sh | 1 - .../files/usr/lib/F123-wrappers/en-US/fodt.sh | 1 - .../files/usr/lib/F123-wrappers/en-US/html.sh | 1 - .../F123-wrappers/en-US/language-chooser.sh | 77 ---- .../lib/F123-wrappers/en-US/mail-launcher.sh | 37 -- .../usr/lib/F123-wrappers/en-US/mud-loader.sh | 66 ---- .../en-US/mumble-manager-add-server.sh | 1 - .../en-US/mumble-manager-remove-server.sh | 1 - .../lib/F123-wrappers/en-US/mumble-manager.sh | 125 ------- .../files/usr/lib/F123-wrappers/en-US/odt.sh | 1 - .../files/usr/lib/F123-wrappers/en-US/ott.sh | 1 - .../files/usr/lib/F123-wrappers/en-US/pdf.sh | 1 - .../lib/F123-wrappers/en-US/pdmenu_default.sh | 339 ------------------ .../F123-wrappers/en-US/pdmenu_development.sh | 339 ------------------ .../usr/lib/F123-wrappers/en-US/reminders.sh | 45 --- .../en-US/restore-accessibility.sh | 76 ---- .../files/usr/lib/F123-wrappers/en-US/rtf.sh | 1 - .../F123-wrappers/en-US/select-language.sh | 104 ------ .../lib/F123-wrappers/en-US/system-backup.sh | 78 ---- .../usr/lib/F123-wrappers/en-US/timezone.sh | 66 ---- .../files/usr/lib/F123-wrappers/en-US/tips.sh | 63 ---- .../files/usr/lib/F123-wrappers/en-US/txt.sh | 1 - .../files/usr/lib/F123-wrappers/en-US/uot.sh | 1 - .../usr/lib/F123-wrappers/en-US/x-self-voiced | 42 --- .../usr/lib/F123-wrappers/en-US/xlauncher | 48 --- .../files/usr/lib/F123-wrappers/en-US/xml.sh | 1 - .../usr/lib/F123-wrappers/es-ES/about.sh | 37 -- .../lib/F123-wrappers/es-ES/backup-manager.sh | 82 ----- .../lib/F123-wrappers/es-ES/blueman-launcher | 42 --- .../usr/lib/F123-wrappers/es-ES/bookreader.sh | 45 --- .../lib/F123-wrappers/es-ES/change-mode.sh | 66 ---- .../usr/lib/F123-wrappers/es-ES/chuser.sh | 91 ----- .../F123-wrappers/es-ES/configure-email.sh | 52 --- .../es-ES/configure-passwords.sh | 61 ---- .../F123-wrappers/es-ES/configure-pianobar.sh | 97 ----- .../F123-wrappers/es-ES/configure-security.sh | 92 ----- .../F123-wrappers/es-ES/configure-sound.sh | 47 --- .../F123-wrappers/es-ES/configure-speech.sh | 134 ------- .../files/usr/lib/F123-wrappers/es-ES/doc.sh | 1 - .../files/usr/lib/F123-wrappers/es-ES/docm.sh | 1 - .../files/usr/lib/F123-wrappers/es-ES/docx.sh | 81 ----- .../files/usr/lib/F123-wrappers/es-ES/dot.sh | 1 - .../files/usr/lib/F123-wrappers/es-ES/fodt.sh | 1 - .../files/usr/lib/F123-wrappers/es-ES/html.sh | 1 - .../F123-wrappers/es-ES/language-chooser.sh | 77 ---- .../lib/F123-wrappers/es-ES/mail-launcher.sh | 37 -- .../es-ES/mumble-manager-add-server.sh | 1 - .../es-ES/mumble-manager-remove-server.sh | 1 - .../lib/F123-wrappers/es-ES/mumble-manager.sh | 125 ------- .../files/usr/lib/F123-wrappers/es-ES/odt.sh | 1 - .../files/usr/lib/F123-wrappers/es-ES/ott.sh | 1 - .../files/usr/lib/F123-wrappers/es-ES/pdf.sh | 1 - .../lib/F123-wrappers/es-ES/pdmenu_default.sh | 339 ------------------ .../F123-wrappers/es-ES/pdmenu_development.sh | 339 ------------------ .../usr/lib/F123-wrappers/es-ES/reminders.sh | 45 --- .../es-ES/restore-accessibility.sh | 76 ---- .../F123-wrappers/es-ES/restore-manager.sh | 78 ---- .../files/usr/lib/F123-wrappers/es-ES/rtf.sh | 1 - .../F123-wrappers/es-ES/select-language.sh | 104 ------ .../lib/F123-wrappers/es-ES/system-backup.sh | 78 ---- .../usr/lib/F123-wrappers/es-ES/timezone.sh | 66 ---- .../files/usr/lib/F123-wrappers/es-ES/txt.sh | 1 - .../files/usr/lib/F123-wrappers/es-ES/uot.sh | 1 - .../usr/lib/F123-wrappers/es-ES/x-self-voiced | 42 --- .../usr/lib/F123-wrappers/es-ES/xlauncher | 48 --- .../files/usr/lib/F123-wrappers/es-ES/xml.sh | 1 - .../files/usr/lib/F123-wrappers/mud-loader.sh | 66 ---- .../usr/lib/F123-wrappers/ne/en_US/doc.sh | 1 - .../usr/lib/F123-wrappers/ne/en_US/docm.sh | 1 - .../usr/lib/F123-wrappers/ne/en_US/docx.sh | 81 ----- .../usr/lib/F123-wrappers/ne/en_US/dot.sh | 1 - .../usr/lib/F123-wrappers/ne/en_US/fodt.sh | 1 - .../usr/lib/F123-wrappers/ne/en_US/html.sh | 1 - .../usr/lib/F123-wrappers/ne/en_US/odt.sh | 1 - .../usr/lib/F123-wrappers/ne/en_US/ott.sh | 1 - .../usr/lib/F123-wrappers/ne/en_US/pdf.sh | 1 - .../usr/lib/F123-wrappers/ne/en_US/rtf.sh | 1 - .../usr/lib/F123-wrappers/ne/en_US/txt.sh | 1 - .../usr/lib/F123-wrappers/ne/en_US/uot.sh | 1 - .../usr/lib/F123-wrappers/ne/en_US/xml.sh | 1 - .../usr/lib/F123-wrappers/pt-BR/about.sh | 37 -- .../lib/F123-wrappers/pt-BR/backup-manager.sh | 82 ----- .../lib/F123-wrappers/pt-BR/blueman-launcher | 42 --- .../usr/lib/F123-wrappers/pt-BR/bookreader.sh | 45 --- .../lib/F123-wrappers/pt-BR/change-mode.sh | 66 ---- .../usr/lib/F123-wrappers/pt-BR/chuser.sh | 91 ----- .../F123-wrappers/pt-BR/configure-email.sh | 52 --- .../pt-BR/configure-passwords.sh | 61 ---- .../F123-wrappers/pt-BR/configure-pianobar.sh | 97 ----- .../F123-wrappers/pt-BR/configure-security.sh | 92 ----- .../F123-wrappers/pt-BR/configure-sound.sh | 47 --- .../F123-wrappers/pt-BR/configure-speech.sh | 134 ------- .../files/usr/lib/F123-wrappers/pt-BR/doc.sh | 1 - .../files/usr/lib/F123-wrappers/pt-BR/docm.sh | 1 - .../files/usr/lib/F123-wrappers/pt-BR/docx.sh | 81 ----- .../files/usr/lib/F123-wrappers/pt-BR/dot.sh | 1 - .../files/usr/lib/F123-wrappers/pt-BR/fodt.sh | 1 - .../files/usr/lib/F123-wrappers/pt-BR/html.sh | 1 - .../F123-wrappers/pt-BR/language-chooser.sh | 77 ---- .../lib/F123-wrappers/pt-BR/mail-launcher.sh | 37 -- .../usr/lib/F123-wrappers/pt-BR/mud-loader.sh | 66 ---- .../pt-BR/mumble-manager-add-server.sh | 1 - .../pt-BR/mumble-manager-remove-server.sh | 1 - .../lib/F123-wrappers/pt-BR/mumble-manager.sh | 125 ------- .../files/usr/lib/F123-wrappers/pt-BR/odt.sh | 1 - .../files/usr/lib/F123-wrappers/pt-BR/ott.sh | 1 - .../files/usr/lib/F123-wrappers/pt-BR/pdf.sh | 1 - .../lib/F123-wrappers/pt-BR/pdmenu_default.sh | 339 ------------------ .../F123-wrappers/pt-BR/pdmenu_development.sh | 339 ------------------ .../pt-BR/restore-accessibility.sh | 76 ---- .../F123-wrappers/pt-BR/restore-manager.sh | 78 ---- .../files/usr/lib/F123-wrappers/pt-BR/rtf.sh | 1 - .../F123-wrappers/pt-BR/select-language.sh | 104 ------ .../lib/F123-wrappers/pt-BR/system-backup.sh | 78 ---- .../usr/lib/F123-wrappers/pt-BR/timezone.sh | 66 ---- .../files/usr/lib/F123-wrappers/pt-BR/tips.sh | 63 ---- .../files/usr/lib/F123-wrappers/pt-BR/txt.sh | 1 - .../files/usr/lib/F123-wrappers/pt-BR/uot.sh | 1 - .../usr/lib/F123-wrappers/pt-BR/x-self-voiced | 42 --- .../usr/lib/F123-wrappers/pt-BR/xlauncher | 48 --- .../files/usr/lib/F123-wrappers/pt-BR/xml.sh | 1 - .../files/usr/lib/F123-wrappers/reminders.sh | 45 --- .../F123-wrappers/restore-accessibility.sh | 76 ---- .../usr/lib/F123-wrappers/restore-manager.sh | 78 ---- .../usr/lib/F123-wrappers/system-backup.sh | 78 ---- files/files/usr/lib/F123-wrappers/timezone.sh | 66 ---- files/files/usr/lib/F123-wrappers/tips.sh | 63 ---- .../files/usr/lib/F123-wrappers/x-self-voiced | 42 --- files/files/usr/lib/F123-wrappers/xlauncher | 48 --- .../preferences-manager.sh | 0 .../script_functions.sh | 0 .../about.sh | 0 .../backup-manager.sh | 4 +- .../blueman-launcher | 0 .../ar-SA => stormux-wrappers}/bookreader.sh | 0 .../change-mode.sh | 2 +- .../chuser.sh | 4 +- .../clilauncher.sh | 0 .../configure-email.sh | 4 +- .../configure-passwords.sh | 2 +- .../configure-pianobar.sh | 2 +- .../configure-security.sh | 2 +- .../configure-sound.sh | 2 +- .../configure-speech.sh | 2 +- .../configure-web-browser.sh | 4 +- .../first-boot | 22 +- .../language-chooser.sh | 2 +- .../mail-launcher.sh | 6 +- .../es-ES => stormux-wrappers}/mud-loader.sh | 4 +- .../pdmenu.sh | 32 +- .../pt-BR => stormux-wrappers}/reminders.sh | 2 +- .../restore-accessibility.sh | 4 +- .../restore-manager.sh | 4 +- .../select-language.sh | 0 .../system-backup.sh | 4 +- .../ar-SA => stormux-wrappers}/timezone.sh | 0 .../es-ES => stormux-wrappers}/tips.sh | 4 +- .../ar-SA => stormux-wrappers}/x-self-voiced | 0 .../ar-SA => stormux-wrappers}/xlauncher | 0 211 files changed, 56 insertions(+), 10245 deletions(-) delete mode 100644 files/files/usr/lib/F123-wrappers/ar-SA/about.sh delete mode 100644 files/files/usr/lib/F123-wrappers/ar-SA/backup-manager.sh delete mode 100644 files/files/usr/lib/F123-wrappers/ar-SA/change-mode.sh delete mode 100644 files/files/usr/lib/F123-wrappers/ar-SA/chuser.sh delete mode 100644 files/files/usr/lib/F123-wrappers/ar-SA/configure-email.sh delete mode 100644 files/files/usr/lib/F123-wrappers/ar-SA/configure-passwords.sh delete mode 100644 files/files/usr/lib/F123-wrappers/ar-SA/configure-pianobar.sh delete mode 100644 files/files/usr/lib/F123-wrappers/ar-SA/configure-security.sh delete mode 100644 files/files/usr/lib/F123-wrappers/ar-SA/configure-sound.sh delete mode 100644 files/files/usr/lib/F123-wrappers/ar-SA/configure-speech.sh delete mode 100644 files/files/usr/lib/F123-wrappers/ar-SA/doc.sh delete mode 100644 files/files/usr/lib/F123-wrappers/ar-SA/docm.sh delete mode 100644 files/files/usr/lib/F123-wrappers/ar-SA/docx.sh delete mode 100644 files/files/usr/lib/F123-wrappers/ar-SA/dot.sh delete mode 100644 files/files/usr/lib/F123-wrappers/ar-SA/fodt.sh delete mode 100644 files/files/usr/lib/F123-wrappers/ar-SA/html.sh delete mode 100644 files/files/usr/lib/F123-wrappers/ar-SA/language-chooser.sh delete mode 100644 files/files/usr/lib/F123-wrappers/ar-SA/mail-launcher.sh delete mode 100644 files/files/usr/lib/F123-wrappers/ar-SA/mud-loader.sh delete mode 100644 files/files/usr/lib/F123-wrappers/ar-SA/mumble-manager-add-server.sh delete mode 100644 files/files/usr/lib/F123-wrappers/ar-SA/mumble-manager-remove-server.sh delete mode 100644 files/files/usr/lib/F123-wrappers/ar-SA/mumble-manager.sh delete mode 100644 files/files/usr/lib/F123-wrappers/ar-SA/odt.sh delete mode 100644 files/files/usr/lib/F123-wrappers/ar-SA/ott.sh delete mode 100644 files/files/usr/lib/F123-wrappers/ar-SA/pdf.sh delete mode 100644 files/files/usr/lib/F123-wrappers/ar-SA/pdmenu_default.sh delete mode 100644 files/files/usr/lib/F123-wrappers/ar-SA/pdmenu_development.sh delete mode 100644 files/files/usr/lib/F123-wrappers/ar-SA/reminders.sh delete mode 100644 files/files/usr/lib/F123-wrappers/ar-SA/restore-manager.sh delete mode 100644 files/files/usr/lib/F123-wrappers/ar-SA/rtf.sh delete mode 100644 files/files/usr/lib/F123-wrappers/ar-SA/select-language.sh delete mode 100644 files/files/usr/lib/F123-wrappers/ar-SA/tips.sh delete mode 100644 files/files/usr/lib/F123-wrappers/ar-SA/txt.sh delete mode 100644 files/files/usr/lib/F123-wrappers/ar-SA/uot.sh delete mode 100644 files/files/usr/lib/F123-wrappers/ar-SA/xml.sh delete mode 100755 files/files/usr/lib/F123-wrappers/blueman-launcher delete mode 100755 files/files/usr/lib/F123-wrappers/bookreader.sh delete mode 100755 files/files/usr/lib/F123-wrappers/configure-passwords.sh delete mode 100755 files/files/usr/lib/F123-wrappers/configure-pianobar.sh delete mode 100644 files/files/usr/lib/F123-wrappers/en-US/about.sh delete mode 100644 files/files/usr/lib/F123-wrappers/en-US/backup-manager.sh delete mode 100644 files/files/usr/lib/F123-wrappers/en-US/blueman-launcher delete mode 100644 files/files/usr/lib/F123-wrappers/en-US/bookreader.sh delete mode 100644 files/files/usr/lib/F123-wrappers/en-US/change-mode.sh delete mode 100644 files/files/usr/lib/F123-wrappers/en-US/chuser.sh delete mode 100644 files/files/usr/lib/F123-wrappers/en-US/configure-email.sh delete mode 100644 files/files/usr/lib/F123-wrappers/en-US/configure-security.sh delete mode 100644 files/files/usr/lib/F123-wrappers/en-US/configure-sound.sh delete mode 100644 files/files/usr/lib/F123-wrappers/en-US/configure-speech.sh delete mode 100644 files/files/usr/lib/F123-wrappers/en-US/doc.sh delete mode 100644 files/files/usr/lib/F123-wrappers/en-US/docm.sh delete mode 100644 files/files/usr/lib/F123-wrappers/en-US/docx.sh delete mode 100644 files/files/usr/lib/F123-wrappers/en-US/dot.sh delete mode 100644 files/files/usr/lib/F123-wrappers/en-US/fodt.sh delete mode 100644 files/files/usr/lib/F123-wrappers/en-US/html.sh delete mode 100644 files/files/usr/lib/F123-wrappers/en-US/language-chooser.sh delete mode 100644 files/files/usr/lib/F123-wrappers/en-US/mail-launcher.sh delete mode 100644 files/files/usr/lib/F123-wrappers/en-US/mud-loader.sh delete mode 100644 files/files/usr/lib/F123-wrappers/en-US/mumble-manager-add-server.sh delete mode 100644 files/files/usr/lib/F123-wrappers/en-US/mumble-manager-remove-server.sh delete mode 100644 files/files/usr/lib/F123-wrappers/en-US/mumble-manager.sh delete mode 100644 files/files/usr/lib/F123-wrappers/en-US/odt.sh delete mode 100644 files/files/usr/lib/F123-wrappers/en-US/ott.sh delete mode 100644 files/files/usr/lib/F123-wrappers/en-US/pdf.sh delete mode 100644 files/files/usr/lib/F123-wrappers/en-US/pdmenu_default.sh delete mode 100644 files/files/usr/lib/F123-wrappers/en-US/pdmenu_development.sh delete mode 100644 files/files/usr/lib/F123-wrappers/en-US/reminders.sh delete mode 100644 files/files/usr/lib/F123-wrappers/en-US/restore-accessibility.sh delete mode 100644 files/files/usr/lib/F123-wrappers/en-US/rtf.sh delete mode 100644 files/files/usr/lib/F123-wrappers/en-US/select-language.sh delete mode 100644 files/files/usr/lib/F123-wrappers/en-US/system-backup.sh delete mode 100644 files/files/usr/lib/F123-wrappers/en-US/timezone.sh delete mode 100644 files/files/usr/lib/F123-wrappers/en-US/tips.sh delete mode 100644 files/files/usr/lib/F123-wrappers/en-US/txt.sh delete mode 100644 files/files/usr/lib/F123-wrappers/en-US/uot.sh delete mode 100644 files/files/usr/lib/F123-wrappers/en-US/x-self-voiced delete mode 100644 files/files/usr/lib/F123-wrappers/en-US/xlauncher delete mode 100644 files/files/usr/lib/F123-wrappers/en-US/xml.sh delete mode 100644 files/files/usr/lib/F123-wrappers/es-ES/about.sh delete mode 100644 files/files/usr/lib/F123-wrappers/es-ES/backup-manager.sh delete mode 100644 files/files/usr/lib/F123-wrappers/es-ES/blueman-launcher delete mode 100644 files/files/usr/lib/F123-wrappers/es-ES/bookreader.sh delete mode 100644 files/files/usr/lib/F123-wrappers/es-ES/change-mode.sh delete mode 100644 files/files/usr/lib/F123-wrappers/es-ES/chuser.sh delete mode 100644 files/files/usr/lib/F123-wrappers/es-ES/configure-email.sh delete mode 100644 files/files/usr/lib/F123-wrappers/es-ES/configure-passwords.sh delete mode 100644 files/files/usr/lib/F123-wrappers/es-ES/configure-pianobar.sh delete mode 100644 files/files/usr/lib/F123-wrappers/es-ES/configure-security.sh delete mode 100644 files/files/usr/lib/F123-wrappers/es-ES/configure-sound.sh delete mode 100644 files/files/usr/lib/F123-wrappers/es-ES/configure-speech.sh delete mode 100644 files/files/usr/lib/F123-wrappers/es-ES/doc.sh delete mode 100644 files/files/usr/lib/F123-wrappers/es-ES/docm.sh delete mode 100644 files/files/usr/lib/F123-wrappers/es-ES/docx.sh delete mode 100644 files/files/usr/lib/F123-wrappers/es-ES/dot.sh delete mode 100644 files/files/usr/lib/F123-wrappers/es-ES/fodt.sh delete mode 100644 files/files/usr/lib/F123-wrappers/es-ES/html.sh delete mode 100644 files/files/usr/lib/F123-wrappers/es-ES/language-chooser.sh delete mode 100644 files/files/usr/lib/F123-wrappers/es-ES/mail-launcher.sh delete mode 100644 files/files/usr/lib/F123-wrappers/es-ES/mumble-manager-add-server.sh delete mode 100644 files/files/usr/lib/F123-wrappers/es-ES/mumble-manager-remove-server.sh delete mode 100644 files/files/usr/lib/F123-wrappers/es-ES/mumble-manager.sh delete mode 100644 files/files/usr/lib/F123-wrappers/es-ES/odt.sh delete mode 100644 files/files/usr/lib/F123-wrappers/es-ES/ott.sh delete mode 100644 files/files/usr/lib/F123-wrappers/es-ES/pdf.sh delete mode 100644 files/files/usr/lib/F123-wrappers/es-ES/pdmenu_default.sh delete mode 100644 files/files/usr/lib/F123-wrappers/es-ES/pdmenu_development.sh delete mode 100644 files/files/usr/lib/F123-wrappers/es-ES/reminders.sh delete mode 100644 files/files/usr/lib/F123-wrappers/es-ES/restore-accessibility.sh delete mode 100644 files/files/usr/lib/F123-wrappers/es-ES/restore-manager.sh delete mode 100644 files/files/usr/lib/F123-wrappers/es-ES/rtf.sh delete mode 100644 files/files/usr/lib/F123-wrappers/es-ES/select-language.sh delete mode 100644 files/files/usr/lib/F123-wrappers/es-ES/system-backup.sh delete mode 100644 files/files/usr/lib/F123-wrappers/es-ES/timezone.sh delete mode 100644 files/files/usr/lib/F123-wrappers/es-ES/txt.sh delete mode 100644 files/files/usr/lib/F123-wrappers/es-ES/uot.sh delete mode 100644 files/files/usr/lib/F123-wrappers/es-ES/x-self-voiced delete mode 100644 files/files/usr/lib/F123-wrappers/es-ES/xlauncher delete mode 100644 files/files/usr/lib/F123-wrappers/es-ES/xml.sh delete mode 100755 files/files/usr/lib/F123-wrappers/mud-loader.sh delete mode 120000 files/files/usr/lib/F123-wrappers/ne/en_US/doc.sh delete mode 120000 files/files/usr/lib/F123-wrappers/ne/en_US/docm.sh delete mode 100755 files/files/usr/lib/F123-wrappers/ne/en_US/docx.sh delete mode 120000 files/files/usr/lib/F123-wrappers/ne/en_US/dot.sh delete mode 120000 files/files/usr/lib/F123-wrappers/ne/en_US/fodt.sh delete mode 120000 files/files/usr/lib/F123-wrappers/ne/en_US/html.sh delete mode 120000 files/files/usr/lib/F123-wrappers/ne/en_US/odt.sh delete mode 120000 files/files/usr/lib/F123-wrappers/ne/en_US/ott.sh delete mode 120000 files/files/usr/lib/F123-wrappers/ne/en_US/pdf.sh delete mode 120000 files/files/usr/lib/F123-wrappers/ne/en_US/rtf.sh delete mode 120000 files/files/usr/lib/F123-wrappers/ne/en_US/txt.sh delete mode 120000 files/files/usr/lib/F123-wrappers/ne/en_US/uot.sh delete mode 120000 files/files/usr/lib/F123-wrappers/ne/en_US/xml.sh delete mode 100644 files/files/usr/lib/F123-wrappers/pt-BR/about.sh delete mode 100644 files/files/usr/lib/F123-wrappers/pt-BR/backup-manager.sh delete mode 100644 files/files/usr/lib/F123-wrappers/pt-BR/blueman-launcher delete mode 100644 files/files/usr/lib/F123-wrappers/pt-BR/bookreader.sh delete mode 100644 files/files/usr/lib/F123-wrappers/pt-BR/change-mode.sh delete mode 100644 files/files/usr/lib/F123-wrappers/pt-BR/chuser.sh delete mode 100644 files/files/usr/lib/F123-wrappers/pt-BR/configure-email.sh delete mode 100644 files/files/usr/lib/F123-wrappers/pt-BR/configure-passwords.sh delete mode 100644 files/files/usr/lib/F123-wrappers/pt-BR/configure-pianobar.sh delete mode 100644 files/files/usr/lib/F123-wrappers/pt-BR/configure-security.sh delete mode 100644 files/files/usr/lib/F123-wrappers/pt-BR/configure-sound.sh delete mode 100644 files/files/usr/lib/F123-wrappers/pt-BR/configure-speech.sh delete mode 100644 files/files/usr/lib/F123-wrappers/pt-BR/doc.sh delete mode 100644 files/files/usr/lib/F123-wrappers/pt-BR/docm.sh delete mode 100644 files/files/usr/lib/F123-wrappers/pt-BR/docx.sh delete mode 100644 files/files/usr/lib/F123-wrappers/pt-BR/dot.sh delete mode 100644 files/files/usr/lib/F123-wrappers/pt-BR/fodt.sh delete mode 100644 files/files/usr/lib/F123-wrappers/pt-BR/html.sh delete mode 100644 files/files/usr/lib/F123-wrappers/pt-BR/language-chooser.sh delete mode 100644 files/files/usr/lib/F123-wrappers/pt-BR/mail-launcher.sh delete mode 100644 files/files/usr/lib/F123-wrappers/pt-BR/mud-loader.sh delete mode 100644 files/files/usr/lib/F123-wrappers/pt-BR/mumble-manager-add-server.sh delete mode 100644 files/files/usr/lib/F123-wrappers/pt-BR/mumble-manager-remove-server.sh delete mode 100644 files/files/usr/lib/F123-wrappers/pt-BR/mumble-manager.sh delete mode 100644 files/files/usr/lib/F123-wrappers/pt-BR/odt.sh delete mode 100644 files/files/usr/lib/F123-wrappers/pt-BR/ott.sh delete mode 100644 files/files/usr/lib/F123-wrappers/pt-BR/pdf.sh delete mode 100644 files/files/usr/lib/F123-wrappers/pt-BR/pdmenu_default.sh delete mode 100644 files/files/usr/lib/F123-wrappers/pt-BR/pdmenu_development.sh delete mode 100644 files/files/usr/lib/F123-wrappers/pt-BR/restore-accessibility.sh delete mode 100644 files/files/usr/lib/F123-wrappers/pt-BR/restore-manager.sh delete mode 100644 files/files/usr/lib/F123-wrappers/pt-BR/rtf.sh delete mode 100644 files/files/usr/lib/F123-wrappers/pt-BR/select-language.sh delete mode 100644 files/files/usr/lib/F123-wrappers/pt-BR/system-backup.sh delete mode 100644 files/files/usr/lib/F123-wrappers/pt-BR/timezone.sh delete mode 100644 files/files/usr/lib/F123-wrappers/pt-BR/tips.sh delete mode 100644 files/files/usr/lib/F123-wrappers/pt-BR/txt.sh delete mode 100644 files/files/usr/lib/F123-wrappers/pt-BR/uot.sh delete mode 100644 files/files/usr/lib/F123-wrappers/pt-BR/x-self-voiced delete mode 100644 files/files/usr/lib/F123-wrappers/pt-BR/xlauncher delete mode 100644 files/files/usr/lib/F123-wrappers/pt-BR/xml.sh delete mode 100755 files/files/usr/lib/F123-wrappers/reminders.sh delete mode 100755 files/files/usr/lib/F123-wrappers/restore-accessibility.sh delete mode 100755 files/files/usr/lib/F123-wrappers/restore-manager.sh delete mode 100755 files/files/usr/lib/F123-wrappers/system-backup.sh delete mode 100755 files/files/usr/lib/F123-wrappers/timezone.sh delete mode 100755 files/files/usr/lib/F123-wrappers/tips.sh delete mode 100755 files/files/usr/lib/F123-wrappers/x-self-voiced delete mode 100755 files/files/usr/lib/F123-wrappers/xlauncher rename files/files/usr/lib/{F123-includes => stormux-includes}/preferences-manager.sh (100%) rename files/files/usr/lib/{F123-includes => stormux-includes}/script_functions.sh (100%) rename files/files/usr/lib/{F123-wrappers => stormux-wrappers}/about.sh (100%) rename files/files/usr/lib/{F123-wrappers => stormux-wrappers}/backup-manager.sh (96%) rename files/files/usr/lib/{F123-wrappers/ar-SA => stormux-wrappers}/blueman-launcher (100%) mode change 100644 => 100755 rename files/files/usr/lib/{F123-wrappers/ar-SA => stormux-wrappers}/bookreader.sh (100%) mode change 100644 => 100755 rename files/files/usr/lib/{F123-wrappers => stormux-wrappers}/change-mode.sh (97%) rename files/files/usr/lib/{F123-wrappers => stormux-wrappers}/chuser.sh (96%) rename files/files/usr/lib/{F123-wrappers => stormux-wrappers}/clilauncher.sh (100%) rename files/files/usr/lib/{F123-wrappers => stormux-wrappers}/configure-email.sh (93%) rename files/files/usr/lib/{F123-wrappers/en-US => stormux-wrappers}/configure-passwords.sh (98%) mode change 100644 => 100755 rename files/files/usr/lib/{F123-wrappers/en-US => stormux-wrappers}/configure-pianobar.sh (98%) mode change 100644 => 100755 rename files/files/usr/lib/{F123-wrappers => stormux-wrappers}/configure-security.sh (98%) rename files/files/usr/lib/{F123-wrappers => stormux-wrappers}/configure-sound.sh (97%) rename files/files/usr/lib/{F123-wrappers => stormux-wrappers}/configure-speech.sh (99%) rename files/files/usr/lib/{F123-wrappers => stormux-wrappers}/configure-web-browser.sh (97%) rename files/files/usr/lib/{F123-wrappers => stormux-wrappers}/first-boot (92%) rename files/files/usr/lib/{F123-wrappers => stormux-wrappers}/language-chooser.sh (97%) rename files/files/usr/lib/{F123-wrappers => stormux-wrappers}/mail-launcher.sh (89%) rename files/files/usr/lib/{F123-wrappers/es-ES => stormux-wrappers}/mud-loader.sh (95%) mode change 100644 => 100755 rename files/files/usr/lib/{F123-wrappers => stormux-wrappers}/pdmenu.sh (89%) rename files/files/usr/lib/{F123-wrappers/pt-BR => stormux-wrappers}/reminders.sh (97%) mode change 100644 => 100755 rename files/files/usr/lib/{F123-wrappers/ar-SA => stormux-wrappers}/restore-accessibility.sh (96%) mode change 100644 => 100755 rename files/files/usr/lib/{F123-wrappers/en-US => stormux-wrappers}/restore-manager.sh (96%) mode change 100644 => 100755 rename files/files/usr/lib/{F123-wrappers => stormux-wrappers}/select-language.sh (100%) rename files/files/usr/lib/{F123-wrappers/ar-SA => stormux-wrappers}/system-backup.sh (96%) mode change 100644 => 100755 rename files/files/usr/lib/{F123-wrappers/ar-SA => stormux-wrappers}/timezone.sh (100%) mode change 100644 => 100755 rename files/files/usr/lib/{F123-wrappers/es-ES => stormux-wrappers}/tips.sh (94%) mode change 100644 => 100755 rename files/files/usr/lib/{F123-wrappers/ar-SA => stormux-wrappers}/x-self-voiced (100%) mode change 100644 => 100755 rename files/files/usr/lib/{F123-wrappers/ar-SA => stormux-wrappers}/xlauncher (100%) mode change 100644 => 100755 diff --git a/files/files/usr/lib/F123-wrappers/ar-SA/about.sh b/files/files/usr/lib/F123-wrappers/ar-SA/about.sh deleted file mode 100644 index 5890ca1..0000000 --- a/files/files/usr/lib/F123-wrappers/ar-SA/about.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash -# about.sh -# Description: Provides nicely formatted version information. -# -# Copyright 2019, F123 Consulting, -# Copyright 2019, Storm Dragon, -# -# 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="$( -# Copyright 2019, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/ar-SA/change-mode.sh b/files/files/usr/lib/F123-wrappers/ar-SA/change-mode.sh deleted file mode 100644 index 3ab5900..0000000 --- a/files/files/usr/lib/F123-wrappers/ar-SA/change-mode.sh +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/bash -# change-mode: Configuration utility to change the menu and available services. -# -# Copyright 2019, F123 Consulting, -# Copyright 2019, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/ar-SA/chuser.sh b/files/files/usr/lib/F123-wrappers/ar-SA/chuser.sh deleted file mode 100644 index 42ac7a0..0000000 --- a/files/files/usr/lib/F123-wrappers/ar-SA/chuser.sh +++ /dev/null @@ -1,91 +0,0 @@ -#!/bin/bash -# chuser.sh -# Description: Changes the username to something new at login -# -# Copyright 2019, F123 Consulting, -# Copyright 2019, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/ar-SA/configure-email.sh b/files/files/usr/lib/F123-wrappers/ar-SA/configure-email.sh deleted file mode 100644 index 1b1386e..0000000 --- a/files/files/usr/lib/F123-wrappers/ar-SA/configure-email.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/bash -# configure-email.sh -# Description: Select prefered email client and configure it. -# -# Copyright 2018, F123 Consulting, -# Copyright 2018, Storm Dragon, -# -# 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=\$( /dev/null - echo -n "setting set screen#suspendingScreen=\$( -# Copyright 2018, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/ar-SA/configure-pianobar.sh b/files/files/usr/lib/F123-wrappers/ar-SA/configure-pianobar.sh deleted file mode 100644 index c4a7bb2..0000000 --- a/files/files/usr/lib/F123-wrappers/ar-SA/configure-pianobar.sh +++ /dev/null @@ -1,97 +0,0 @@ -#!/bin/bash -# configure-pianobar.sh -# Description: Easily configure pianobar. -# -# Copyright 2018, F123 Consulting, -# Copyright 2018, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/ar-SA/configure-security.sh b/files/files/usr/lib/F123-wrappers/ar-SA/configure-security.sh deleted file mode 100644 index d5f1fa2..0000000 --- a/files/files/usr/lib/F123-wrappers/ar-SA/configure-security.sh +++ /dev/null @@ -1,92 +0,0 @@ -#!/bin/bash -# configure-security -# -# Copyright 2018, F123 Consulting, -# Copyright 2018, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/ar-SA/configure-sound.sh b/files/files/usr/lib/F123-wrappers/ar-SA/configure-sound.sh deleted file mode 100644 index 939e29d..0000000 --- a/files/files/usr/lib/F123-wrappers/ar-SA/configure-sound.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash -# configure-sound -# -# Copyright 2018, F123 Consulting, -# Copyright 2018, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/ar-SA/configure-speech.sh b/files/files/usr/lib/F123-wrappers/ar-SA/configure-speech.sh deleted file mode 100644 index da714e1..0000000 --- a/files/files/usr/lib/F123-wrappers/ar-SA/configure-speech.sh +++ /dev/null @@ -1,134 +0,0 @@ -#!/bin/bash -# configure-speech -# -# Copyright 2018, F123 Consulting, -# Copyright 2018, Storm Dragon, -# Copyright 2018, Kyle, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/ar-SA/doc.sh b/files/files/usr/lib/F123-wrappers/ar-SA/doc.sh deleted file mode 100644 index acb67a6..0000000 --- a/files/files/usr/lib/F123-wrappers/ar-SA/doc.sh +++ /dev/null @@ -1 +0,0 @@ -docx.sh \ No newline at end of file diff --git a/files/files/usr/lib/F123-wrappers/ar-SA/docm.sh b/files/files/usr/lib/F123-wrappers/ar-SA/docm.sh deleted file mode 100644 index acb67a6..0000000 --- a/files/files/usr/lib/F123-wrappers/ar-SA/docm.sh +++ /dev/null @@ -1 +0,0 @@ -docx.sh \ No newline at end of file diff --git a/files/files/usr/lib/F123-wrappers/ar-SA/docx.sh b/files/files/usr/lib/F123-wrappers/ar-SA/docx.sh deleted file mode 100644 index 9b2d9eb..0000000 --- a/files/files/usr/lib/F123-wrappers/ar-SA/docx.sh +++ /dev/null @@ -1,81 +0,0 @@ -#!/bin/bash -# docx.sh -# Description: Helper for ne macro to convert from markdown to docx -# -# Copyright 2019, F123 Consulting, -# Copyright 2019, Storm Dragon, -# -# 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 - diff --git a/files/files/usr/lib/F123-wrappers/ar-SA/dot.sh b/files/files/usr/lib/F123-wrappers/ar-SA/dot.sh deleted file mode 100644 index acb67a6..0000000 --- a/files/files/usr/lib/F123-wrappers/ar-SA/dot.sh +++ /dev/null @@ -1 +0,0 @@ -docx.sh \ No newline at end of file diff --git a/files/files/usr/lib/F123-wrappers/ar-SA/fodt.sh b/files/files/usr/lib/F123-wrappers/ar-SA/fodt.sh deleted file mode 100644 index acb67a6..0000000 --- a/files/files/usr/lib/F123-wrappers/ar-SA/fodt.sh +++ /dev/null @@ -1 +0,0 @@ -docx.sh \ No newline at end of file diff --git a/files/files/usr/lib/F123-wrappers/ar-SA/html.sh b/files/files/usr/lib/F123-wrappers/ar-SA/html.sh deleted file mode 100644 index acb67a6..0000000 --- a/files/files/usr/lib/F123-wrappers/ar-SA/html.sh +++ /dev/null @@ -1 +0,0 @@ -docx.sh \ No newline at end of file diff --git a/files/files/usr/lib/F123-wrappers/ar-SA/language-chooser.sh b/files/files/usr/lib/F123-wrappers/ar-SA/language-chooser.sh deleted file mode 100644 index 78ca201..0000000 --- a/files/files/usr/lib/F123-wrappers/ar-SA/language-chooser.sh +++ /dev/null @@ -1,77 +0,0 @@ -#!/bin/bash -# language-chooser.sh -# Description: Set languages for fast language switching. -# -# Copyright 2019, F123 Consulting, -# Copyright 2019, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/ar-SA/mail-launcher.sh b/files/files/usr/lib/F123-wrappers/ar-SA/mail-launcher.sh deleted file mode 100644 index ad107ef..0000000 --- a/files/files/usr/lib/F123-wrappers/ar-SA/mail-launcher.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash -# mail-launcher.sh -# Description Launch the correct mail client as specified in preferences. -# -# Copyright 2018, F123 Consulting, -# Copyright 2018, Storm Dragon, -# -# 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=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( -# Copyright 2019, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/ar-SA/mumble-manager-add-server.sh b/files/files/usr/lib/F123-wrappers/ar-SA/mumble-manager-add-server.sh deleted file mode 100644 index 1e705c5..0000000 --- a/files/files/usr/lib/F123-wrappers/ar-SA/mumble-manager-add-server.sh +++ /dev/null @@ -1 +0,0 @@ -mumble-manager.sh \ No newline at end of file diff --git a/files/files/usr/lib/F123-wrappers/ar-SA/mumble-manager-remove-server.sh b/files/files/usr/lib/F123-wrappers/ar-SA/mumble-manager-remove-server.sh deleted file mode 100644 index 1e705c5..0000000 --- a/files/files/usr/lib/F123-wrappers/ar-SA/mumble-manager-remove-server.sh +++ /dev/null @@ -1 +0,0 @@ -mumble-manager.sh \ No newline at end of file diff --git a/files/files/usr/lib/F123-wrappers/ar-SA/mumble-manager.sh b/files/files/usr/lib/F123-wrappers/ar-SA/mumble-manager.sh deleted file mode 100644 index 8de1b77..0000000 --- a/files/files/usr/lib/F123-wrappers/ar-SA/mumble-manager.sh +++ /dev/null @@ -1,125 +0,0 @@ -#!/bin/bash -# mumble-manager -# Description: Make managing servers with barnard easy. -# -# Copyright 2019, F123 Consulting, -# Copyright 2019, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/ar-SA/odt.sh b/files/files/usr/lib/F123-wrappers/ar-SA/odt.sh deleted file mode 100644 index acb67a6..0000000 --- a/files/files/usr/lib/F123-wrappers/ar-SA/odt.sh +++ /dev/null @@ -1 +0,0 @@ -docx.sh \ No newline at end of file diff --git a/files/files/usr/lib/F123-wrappers/ar-SA/ott.sh b/files/files/usr/lib/F123-wrappers/ar-SA/ott.sh deleted file mode 100644 index acb67a6..0000000 --- a/files/files/usr/lib/F123-wrappers/ar-SA/ott.sh +++ /dev/null @@ -1 +0,0 @@ -docx.sh \ No newline at end of file diff --git a/files/files/usr/lib/F123-wrappers/ar-SA/pdf.sh b/files/files/usr/lib/F123-wrappers/ar-SA/pdf.sh deleted file mode 100644 index acb67a6..0000000 --- a/files/files/usr/lib/F123-wrappers/ar-SA/pdf.sh +++ /dev/null @@ -1 +0,0 @@ -docx.sh \ No newline at end of file diff --git a/files/files/usr/lib/F123-wrappers/ar-SA/pdmenu_default.sh b/files/files/usr/lib/F123-wrappers/ar-SA/pdmenu_default.sh deleted file mode 100644 index c85510f..0000000 --- a/files/files/usr/lib/F123-wrappers/ar-SA/pdmenu_default.sh +++ /dev/null @@ -1,339 +0,0 @@ -#!/bin/bash -# F123 menu -# -# Copyright 2018, F123 Consulting, -# Copyright 2018, Kyle, -# Copyright 2018, Storm Dragon, -# -# 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=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - #exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - #exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - #exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - #exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - #exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - #exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - #exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - #exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - #exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - #exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /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 diff --git a/files/files/usr/lib/F123-wrappers/ar-SA/pdmenu_development.sh b/files/files/usr/lib/F123-wrappers/ar-SA/pdmenu_development.sh deleted file mode 100644 index 788b223..0000000 --- a/files/files/usr/lib/F123-wrappers/ar-SA/pdmenu_development.sh +++ /dev/null @@ -1,339 +0,0 @@ -#!/bin/bash -# F123 menu -# -# Copyright 2018, F123 Consulting, -# Copyright 2018, Kyle, -# Copyright 2018, Storm Dragon, -# -# 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=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /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 diff --git a/files/files/usr/lib/F123-wrappers/ar-SA/reminders.sh b/files/files/usr/lib/F123-wrappers/ar-SA/reminders.sh deleted file mode 100644 index 7ed03ce..0000000 --- a/files/files/usr/lib/F123-wrappers/ar-SA/reminders.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/bash -# reminders -# -# Copyright 2018, F123 Consulting, -# Copyright 2018, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/ar-SA/restore-manager.sh b/files/files/usr/lib/F123-wrappers/ar-SA/restore-manager.sh deleted file mode 100644 index ae534c5..0000000 --- a/files/files/usr/lib/F123-wrappers/ar-SA/restore-manager.sh +++ /dev/null @@ -1,78 +0,0 @@ -#!/bin/bash -# restore-manager.sh -# Description: -# -# Copyright 2019, F123 Consulting, -# Copyright 2019, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/ar-SA/rtf.sh b/files/files/usr/lib/F123-wrappers/ar-SA/rtf.sh deleted file mode 100644 index acb67a6..0000000 --- a/files/files/usr/lib/F123-wrappers/ar-SA/rtf.sh +++ /dev/null @@ -1 +0,0 @@ -docx.sh \ No newline at end of file diff --git a/files/files/usr/lib/F123-wrappers/ar-SA/select-language.sh b/files/files/usr/lib/F123-wrappers/ar-SA/select-language.sh deleted file mode 100644 index 858e09b..0000000 --- a/files/files/usr/lib/F123-wrappers/ar-SA/select-language.sh +++ /dev/null @@ -1,104 +0,0 @@ -#!/bin/bash -# Select-language -# -# Copyright 2018, F123 Consulting, -# Copyright 2018, Storm Dragon, -# Copyright 2018, Kyle, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/ar-SA/tips.sh b/files/files/usr/lib/F123-wrappers/ar-SA/tips.sh deleted file mode 100644 index be36b73..0000000 --- a/files/files/usr/lib/F123-wrappers/ar-SA/tips.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/bash -# tips.sh -# Description -# -# Copyright 2019, F123 Consulting, -# Copyright 2019, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/ar-SA/txt.sh b/files/files/usr/lib/F123-wrappers/ar-SA/txt.sh deleted file mode 100644 index acb67a6..0000000 --- a/files/files/usr/lib/F123-wrappers/ar-SA/txt.sh +++ /dev/null @@ -1 +0,0 @@ -docx.sh \ No newline at end of file diff --git a/files/files/usr/lib/F123-wrappers/ar-SA/uot.sh b/files/files/usr/lib/F123-wrappers/ar-SA/uot.sh deleted file mode 100644 index acb67a6..0000000 --- a/files/files/usr/lib/F123-wrappers/ar-SA/uot.sh +++ /dev/null @@ -1 +0,0 @@ -docx.sh \ No newline at end of file diff --git a/files/files/usr/lib/F123-wrappers/ar-SA/xml.sh b/files/files/usr/lib/F123-wrappers/ar-SA/xml.sh deleted file mode 100644 index acb67a6..0000000 --- a/files/files/usr/lib/F123-wrappers/ar-SA/xml.sh +++ /dev/null @@ -1 +0,0 @@ -docx.sh \ No newline at end of file diff --git a/files/files/usr/lib/F123-wrappers/blueman-launcher b/files/files/usr/lib/F123-wrappers/blueman-launcher deleted file mode 100755 index d5eac79..0000000 --- a/files/files/usr/lib/F123-wrappers/blueman-launcher +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash -# blueman-launcher -# -# Copyright 2019, F123 Consulting, -# Copyright 2019, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/bookreader.sh b/files/files/usr/lib/F123-wrappers/bookreader.sh deleted file mode 100755 index 88c6a2c..0000000 --- a/files/files/usr/lib/F123-wrappers/bookreader.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/bash -# F123 book reader -# -# Copyright 2018, F123 Consulting, -# Copyright 2018, Kyle, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/configure-passwords.sh b/files/files/usr/lib/F123-wrappers/configure-passwords.sh deleted file mode 100755 index bfea402..0000000 --- a/files/files/usr/lib/F123-wrappers/configure-passwords.sh +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/bash -# configure-passwords -# -# Copyright 2018, F123 Consulting, -# Copyright 2018, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/configure-pianobar.sh b/files/files/usr/lib/F123-wrappers/configure-pianobar.sh deleted file mode 100755 index c4a7bb2..0000000 --- a/files/files/usr/lib/F123-wrappers/configure-pianobar.sh +++ /dev/null @@ -1,97 +0,0 @@ -#!/bin/bash -# configure-pianobar.sh -# Description: Easily configure pianobar. -# -# Copyright 2018, F123 Consulting, -# Copyright 2018, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/en-US/about.sh b/files/files/usr/lib/F123-wrappers/en-US/about.sh deleted file mode 100644 index 5890ca1..0000000 --- a/files/files/usr/lib/F123-wrappers/en-US/about.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash -# about.sh -# Description: Provides nicely formatted version information. -# -# Copyright 2019, F123 Consulting, -# Copyright 2019, Storm Dragon, -# -# 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="$( -# Copyright 2019, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/en-US/blueman-launcher b/files/files/usr/lib/F123-wrappers/en-US/blueman-launcher deleted file mode 100644 index d5eac79..0000000 --- a/files/files/usr/lib/F123-wrappers/en-US/blueman-launcher +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash -# blueman-launcher -# -# Copyright 2019, F123 Consulting, -# Copyright 2019, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/en-US/bookreader.sh b/files/files/usr/lib/F123-wrappers/en-US/bookreader.sh deleted file mode 100644 index 88c6a2c..0000000 --- a/files/files/usr/lib/F123-wrappers/en-US/bookreader.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/bash -# F123 book reader -# -# Copyright 2018, F123 Consulting, -# Copyright 2018, Kyle, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/en-US/change-mode.sh b/files/files/usr/lib/F123-wrappers/en-US/change-mode.sh deleted file mode 100644 index 3ab5900..0000000 --- a/files/files/usr/lib/F123-wrappers/en-US/change-mode.sh +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/bash -# change-mode: Configuration utility to change the menu and available services. -# -# Copyright 2019, F123 Consulting, -# Copyright 2019, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/en-US/chuser.sh b/files/files/usr/lib/F123-wrappers/en-US/chuser.sh deleted file mode 100644 index 42ac7a0..0000000 --- a/files/files/usr/lib/F123-wrappers/en-US/chuser.sh +++ /dev/null @@ -1,91 +0,0 @@ -#!/bin/bash -# chuser.sh -# Description: Changes the username to something new at login -# -# Copyright 2019, F123 Consulting, -# Copyright 2019, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/en-US/configure-email.sh b/files/files/usr/lib/F123-wrappers/en-US/configure-email.sh deleted file mode 100644 index 1b1386e..0000000 --- a/files/files/usr/lib/F123-wrappers/en-US/configure-email.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/bash -# configure-email.sh -# Description: Select prefered email client and configure it. -# -# Copyright 2018, F123 Consulting, -# Copyright 2018, Storm Dragon, -# -# 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=\$( /dev/null - echo -n "setting set screen#suspendingScreen=\$( -# Copyright 2018, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/en-US/configure-sound.sh b/files/files/usr/lib/F123-wrappers/en-US/configure-sound.sh deleted file mode 100644 index 939e29d..0000000 --- a/files/files/usr/lib/F123-wrappers/en-US/configure-sound.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash -# configure-sound -# -# Copyright 2018, F123 Consulting, -# Copyright 2018, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/en-US/configure-speech.sh b/files/files/usr/lib/F123-wrappers/en-US/configure-speech.sh deleted file mode 100644 index da714e1..0000000 --- a/files/files/usr/lib/F123-wrappers/en-US/configure-speech.sh +++ /dev/null @@ -1,134 +0,0 @@ -#!/bin/bash -# configure-speech -# -# Copyright 2018, F123 Consulting, -# Copyright 2018, Storm Dragon, -# Copyright 2018, Kyle, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/en-US/doc.sh b/files/files/usr/lib/F123-wrappers/en-US/doc.sh deleted file mode 100644 index acb67a6..0000000 --- a/files/files/usr/lib/F123-wrappers/en-US/doc.sh +++ /dev/null @@ -1 +0,0 @@ -docx.sh \ No newline at end of file diff --git a/files/files/usr/lib/F123-wrappers/en-US/docm.sh b/files/files/usr/lib/F123-wrappers/en-US/docm.sh deleted file mode 100644 index acb67a6..0000000 --- a/files/files/usr/lib/F123-wrappers/en-US/docm.sh +++ /dev/null @@ -1 +0,0 @@ -docx.sh \ No newline at end of file diff --git a/files/files/usr/lib/F123-wrappers/en-US/docx.sh b/files/files/usr/lib/F123-wrappers/en-US/docx.sh deleted file mode 100644 index 9b2d9eb..0000000 --- a/files/files/usr/lib/F123-wrappers/en-US/docx.sh +++ /dev/null @@ -1,81 +0,0 @@ -#!/bin/bash -# docx.sh -# Description: Helper for ne macro to convert from markdown to docx -# -# Copyright 2019, F123 Consulting, -# Copyright 2019, Storm Dragon, -# -# 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 - diff --git a/files/files/usr/lib/F123-wrappers/en-US/dot.sh b/files/files/usr/lib/F123-wrappers/en-US/dot.sh deleted file mode 100644 index acb67a6..0000000 --- a/files/files/usr/lib/F123-wrappers/en-US/dot.sh +++ /dev/null @@ -1 +0,0 @@ -docx.sh \ No newline at end of file diff --git a/files/files/usr/lib/F123-wrappers/en-US/fodt.sh b/files/files/usr/lib/F123-wrappers/en-US/fodt.sh deleted file mode 100644 index acb67a6..0000000 --- a/files/files/usr/lib/F123-wrappers/en-US/fodt.sh +++ /dev/null @@ -1 +0,0 @@ -docx.sh \ No newline at end of file diff --git a/files/files/usr/lib/F123-wrappers/en-US/html.sh b/files/files/usr/lib/F123-wrappers/en-US/html.sh deleted file mode 100644 index acb67a6..0000000 --- a/files/files/usr/lib/F123-wrappers/en-US/html.sh +++ /dev/null @@ -1 +0,0 @@ -docx.sh \ No newline at end of file diff --git a/files/files/usr/lib/F123-wrappers/en-US/language-chooser.sh b/files/files/usr/lib/F123-wrappers/en-US/language-chooser.sh deleted file mode 100644 index 78ca201..0000000 --- a/files/files/usr/lib/F123-wrappers/en-US/language-chooser.sh +++ /dev/null @@ -1,77 +0,0 @@ -#!/bin/bash -# language-chooser.sh -# Description: Set languages for fast language switching. -# -# Copyright 2019, F123 Consulting, -# Copyright 2019, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/en-US/mail-launcher.sh b/files/files/usr/lib/F123-wrappers/en-US/mail-launcher.sh deleted file mode 100644 index ad107ef..0000000 --- a/files/files/usr/lib/F123-wrappers/en-US/mail-launcher.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash -# mail-launcher.sh -# Description Launch the correct mail client as specified in preferences. -# -# Copyright 2018, F123 Consulting, -# Copyright 2018, Storm Dragon, -# -# 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=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( -# Copyright 2019, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/en-US/mumble-manager-add-server.sh b/files/files/usr/lib/F123-wrappers/en-US/mumble-manager-add-server.sh deleted file mode 100644 index 1e705c5..0000000 --- a/files/files/usr/lib/F123-wrappers/en-US/mumble-manager-add-server.sh +++ /dev/null @@ -1 +0,0 @@ -mumble-manager.sh \ No newline at end of file diff --git a/files/files/usr/lib/F123-wrappers/en-US/mumble-manager-remove-server.sh b/files/files/usr/lib/F123-wrappers/en-US/mumble-manager-remove-server.sh deleted file mode 100644 index 1e705c5..0000000 --- a/files/files/usr/lib/F123-wrappers/en-US/mumble-manager-remove-server.sh +++ /dev/null @@ -1 +0,0 @@ -mumble-manager.sh \ No newline at end of file diff --git a/files/files/usr/lib/F123-wrappers/en-US/mumble-manager.sh b/files/files/usr/lib/F123-wrappers/en-US/mumble-manager.sh deleted file mode 100644 index 8de1b77..0000000 --- a/files/files/usr/lib/F123-wrappers/en-US/mumble-manager.sh +++ /dev/null @@ -1,125 +0,0 @@ -#!/bin/bash -# mumble-manager -# Description: Make managing servers with barnard easy. -# -# Copyright 2019, F123 Consulting, -# Copyright 2019, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/en-US/odt.sh b/files/files/usr/lib/F123-wrappers/en-US/odt.sh deleted file mode 100644 index acb67a6..0000000 --- a/files/files/usr/lib/F123-wrappers/en-US/odt.sh +++ /dev/null @@ -1 +0,0 @@ -docx.sh \ No newline at end of file diff --git a/files/files/usr/lib/F123-wrappers/en-US/ott.sh b/files/files/usr/lib/F123-wrappers/en-US/ott.sh deleted file mode 100644 index acb67a6..0000000 --- a/files/files/usr/lib/F123-wrappers/en-US/ott.sh +++ /dev/null @@ -1 +0,0 @@ -docx.sh \ No newline at end of file diff --git a/files/files/usr/lib/F123-wrappers/en-US/pdf.sh b/files/files/usr/lib/F123-wrappers/en-US/pdf.sh deleted file mode 100644 index acb67a6..0000000 --- a/files/files/usr/lib/F123-wrappers/en-US/pdf.sh +++ /dev/null @@ -1 +0,0 @@ -docx.sh \ No newline at end of file diff --git a/files/files/usr/lib/F123-wrappers/en-US/pdmenu_default.sh b/files/files/usr/lib/F123-wrappers/en-US/pdmenu_default.sh deleted file mode 100644 index c85510f..0000000 --- a/files/files/usr/lib/F123-wrappers/en-US/pdmenu_default.sh +++ /dev/null @@ -1,339 +0,0 @@ -#!/bin/bash -# F123 menu -# -# Copyright 2018, F123 Consulting, -# Copyright 2018, Kyle, -# Copyright 2018, Storm Dragon, -# -# 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=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - #exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - #exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - #exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - #exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - #exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - #exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - #exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - #exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - #exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - #exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /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 diff --git a/files/files/usr/lib/F123-wrappers/en-US/pdmenu_development.sh b/files/files/usr/lib/F123-wrappers/en-US/pdmenu_development.sh deleted file mode 100644 index 788b223..0000000 --- a/files/files/usr/lib/F123-wrappers/en-US/pdmenu_development.sh +++ /dev/null @@ -1,339 +0,0 @@ -#!/bin/bash -# F123 menu -# -# Copyright 2018, F123 Consulting, -# Copyright 2018, Kyle, -# Copyright 2018, Storm Dragon, -# -# 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=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /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 diff --git a/files/files/usr/lib/F123-wrappers/en-US/reminders.sh b/files/files/usr/lib/F123-wrappers/en-US/reminders.sh deleted file mode 100644 index 7ed03ce..0000000 --- a/files/files/usr/lib/F123-wrappers/en-US/reminders.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/bash -# reminders -# -# Copyright 2018, F123 Consulting, -# Copyright 2018, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/en-US/restore-accessibility.sh b/files/files/usr/lib/F123-wrappers/en-US/restore-accessibility.sh deleted file mode 100644 index 4a05324..0000000 --- a/files/files/usr/lib/F123-wrappers/en-US/restore-accessibility.sh +++ /dev/null @@ -1,76 +0,0 @@ -#!/bin/bash -# reset-a11y.sh -# Description: completely restore the system to last known working state -# -# Copyright 2019, F123 Consulting, -# Copyright 2019, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/en-US/rtf.sh b/files/files/usr/lib/F123-wrappers/en-US/rtf.sh deleted file mode 100644 index acb67a6..0000000 --- a/files/files/usr/lib/F123-wrappers/en-US/rtf.sh +++ /dev/null @@ -1 +0,0 @@ -docx.sh \ No newline at end of file diff --git a/files/files/usr/lib/F123-wrappers/en-US/select-language.sh b/files/files/usr/lib/F123-wrappers/en-US/select-language.sh deleted file mode 100644 index 858e09b..0000000 --- a/files/files/usr/lib/F123-wrappers/en-US/select-language.sh +++ /dev/null @@ -1,104 +0,0 @@ -#!/bin/bash -# Select-language -# -# Copyright 2018, F123 Consulting, -# Copyright 2018, Storm Dragon, -# Copyright 2018, Kyle, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/en-US/system-backup.sh b/files/files/usr/lib/F123-wrappers/en-US/system-backup.sh deleted file mode 100644 index 8f9feb9..0000000 --- a/files/files/usr/lib/F123-wrappers/en-US/system-backup.sh +++ /dev/null @@ -1,78 +0,0 @@ -#!/bin/bash -# system-backup.sh -# Description: -# -# Copyright 2019, F123 Consulting, -# Copyright 2019, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/en-US/timezone.sh b/files/files/usr/lib/F123-wrappers/en-US/timezone.sh deleted file mode 100644 index e153976..0000000 --- a/files/files/usr/lib/F123-wrappers/en-US/timezone.sh +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/bash -# Make setting the timezone easier -# -# Copyright 2018, F123 Consulting, -# Copyright 2018, Storm Dragon, -# Copyright 2018, Kyle, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/en-US/tips.sh b/files/files/usr/lib/F123-wrappers/en-US/tips.sh deleted file mode 100644 index be36b73..0000000 --- a/files/files/usr/lib/F123-wrappers/en-US/tips.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/bash -# tips.sh -# Description -# -# Copyright 2019, F123 Consulting, -# Copyright 2019, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/en-US/txt.sh b/files/files/usr/lib/F123-wrappers/en-US/txt.sh deleted file mode 100644 index acb67a6..0000000 --- a/files/files/usr/lib/F123-wrappers/en-US/txt.sh +++ /dev/null @@ -1 +0,0 @@ -docx.sh \ No newline at end of file diff --git a/files/files/usr/lib/F123-wrappers/en-US/uot.sh b/files/files/usr/lib/F123-wrappers/en-US/uot.sh deleted file mode 100644 index acb67a6..0000000 --- a/files/files/usr/lib/F123-wrappers/en-US/uot.sh +++ /dev/null @@ -1 +0,0 @@ -docx.sh \ No newline at end of file diff --git a/files/files/usr/lib/F123-wrappers/en-US/x-self-voiced b/files/files/usr/lib/F123-wrappers/en-US/x-self-voiced deleted file mode 100644 index 8ce80c1..0000000 --- a/files/files/usr/lib/F123-wrappers/en-US/x-self-voiced +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash -# x-self-voiced -# -# Copyright 2019, F123 Consulting, -# Copyright 2019, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/en-US/xlauncher b/files/files/usr/lib/F123-wrappers/en-US/xlauncher deleted file mode 100644 index ca951ea..0000000 --- a/files/files/usr/lib/F123-wrappers/en-US/xlauncher +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash -# xlauncher -# -# Copyright 2018, F123 Consulting, -# Copyright 2018, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/en-US/xml.sh b/files/files/usr/lib/F123-wrappers/en-US/xml.sh deleted file mode 100644 index acb67a6..0000000 --- a/files/files/usr/lib/F123-wrappers/en-US/xml.sh +++ /dev/null @@ -1 +0,0 @@ -docx.sh \ No newline at end of file diff --git a/files/files/usr/lib/F123-wrappers/es-ES/about.sh b/files/files/usr/lib/F123-wrappers/es-ES/about.sh deleted file mode 100644 index 5890ca1..0000000 --- a/files/files/usr/lib/F123-wrappers/es-ES/about.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash -# about.sh -# Description: Provides nicely formatted version information. -# -# Copyright 2019, F123 Consulting, -# Copyright 2019, Storm Dragon, -# -# 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="$( -# Copyright 2019, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/es-ES/blueman-launcher b/files/files/usr/lib/F123-wrappers/es-ES/blueman-launcher deleted file mode 100644 index d5eac79..0000000 --- a/files/files/usr/lib/F123-wrappers/es-ES/blueman-launcher +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash -# blueman-launcher -# -# Copyright 2019, F123 Consulting, -# Copyright 2019, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/es-ES/bookreader.sh b/files/files/usr/lib/F123-wrappers/es-ES/bookreader.sh deleted file mode 100644 index 88c6a2c..0000000 --- a/files/files/usr/lib/F123-wrappers/es-ES/bookreader.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/bash -# F123 book reader -# -# Copyright 2018, F123 Consulting, -# Copyright 2018, Kyle, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/es-ES/change-mode.sh b/files/files/usr/lib/F123-wrappers/es-ES/change-mode.sh deleted file mode 100644 index 3ab5900..0000000 --- a/files/files/usr/lib/F123-wrappers/es-ES/change-mode.sh +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/bash -# change-mode: Configuration utility to change the menu and available services. -# -# Copyright 2019, F123 Consulting, -# Copyright 2019, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/es-ES/chuser.sh b/files/files/usr/lib/F123-wrappers/es-ES/chuser.sh deleted file mode 100644 index 42ac7a0..0000000 --- a/files/files/usr/lib/F123-wrappers/es-ES/chuser.sh +++ /dev/null @@ -1,91 +0,0 @@ -#!/bin/bash -# chuser.sh -# Description: Changes the username to something new at login -# -# Copyright 2019, F123 Consulting, -# Copyright 2019, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/es-ES/configure-email.sh b/files/files/usr/lib/F123-wrappers/es-ES/configure-email.sh deleted file mode 100644 index 1b1386e..0000000 --- a/files/files/usr/lib/F123-wrappers/es-ES/configure-email.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/bash -# configure-email.sh -# Description: Select prefered email client and configure it. -# -# Copyright 2018, F123 Consulting, -# Copyright 2018, Storm Dragon, -# -# 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=\$( /dev/null - echo -n "setting set screen#suspendingScreen=\$( -# Copyright 2018, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/es-ES/configure-pianobar.sh b/files/files/usr/lib/F123-wrappers/es-ES/configure-pianobar.sh deleted file mode 100644 index c4a7bb2..0000000 --- a/files/files/usr/lib/F123-wrappers/es-ES/configure-pianobar.sh +++ /dev/null @@ -1,97 +0,0 @@ -#!/bin/bash -# configure-pianobar.sh -# Description: Easily configure pianobar. -# -# Copyright 2018, F123 Consulting, -# Copyright 2018, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/es-ES/configure-security.sh b/files/files/usr/lib/F123-wrappers/es-ES/configure-security.sh deleted file mode 100644 index d5f1fa2..0000000 --- a/files/files/usr/lib/F123-wrappers/es-ES/configure-security.sh +++ /dev/null @@ -1,92 +0,0 @@ -#!/bin/bash -# configure-security -# -# Copyright 2018, F123 Consulting, -# Copyright 2018, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/es-ES/configure-sound.sh b/files/files/usr/lib/F123-wrappers/es-ES/configure-sound.sh deleted file mode 100644 index 939e29d..0000000 --- a/files/files/usr/lib/F123-wrappers/es-ES/configure-sound.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash -# configure-sound -# -# Copyright 2018, F123 Consulting, -# Copyright 2018, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/es-ES/configure-speech.sh b/files/files/usr/lib/F123-wrappers/es-ES/configure-speech.sh deleted file mode 100644 index da714e1..0000000 --- a/files/files/usr/lib/F123-wrappers/es-ES/configure-speech.sh +++ /dev/null @@ -1,134 +0,0 @@ -#!/bin/bash -# configure-speech -# -# Copyright 2018, F123 Consulting, -# Copyright 2018, Storm Dragon, -# Copyright 2018, Kyle, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/es-ES/doc.sh b/files/files/usr/lib/F123-wrappers/es-ES/doc.sh deleted file mode 100644 index acb67a6..0000000 --- a/files/files/usr/lib/F123-wrappers/es-ES/doc.sh +++ /dev/null @@ -1 +0,0 @@ -docx.sh \ No newline at end of file diff --git a/files/files/usr/lib/F123-wrappers/es-ES/docm.sh b/files/files/usr/lib/F123-wrappers/es-ES/docm.sh deleted file mode 100644 index acb67a6..0000000 --- a/files/files/usr/lib/F123-wrappers/es-ES/docm.sh +++ /dev/null @@ -1 +0,0 @@ -docx.sh \ No newline at end of file diff --git a/files/files/usr/lib/F123-wrappers/es-ES/docx.sh b/files/files/usr/lib/F123-wrappers/es-ES/docx.sh deleted file mode 100644 index 9b2d9eb..0000000 --- a/files/files/usr/lib/F123-wrappers/es-ES/docx.sh +++ /dev/null @@ -1,81 +0,0 @@ -#!/bin/bash -# docx.sh -# Description: Helper for ne macro to convert from markdown to docx -# -# Copyright 2019, F123 Consulting, -# Copyright 2019, Storm Dragon, -# -# 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 - diff --git a/files/files/usr/lib/F123-wrappers/es-ES/dot.sh b/files/files/usr/lib/F123-wrappers/es-ES/dot.sh deleted file mode 100644 index acb67a6..0000000 --- a/files/files/usr/lib/F123-wrappers/es-ES/dot.sh +++ /dev/null @@ -1 +0,0 @@ -docx.sh \ No newline at end of file diff --git a/files/files/usr/lib/F123-wrappers/es-ES/fodt.sh b/files/files/usr/lib/F123-wrappers/es-ES/fodt.sh deleted file mode 100644 index acb67a6..0000000 --- a/files/files/usr/lib/F123-wrappers/es-ES/fodt.sh +++ /dev/null @@ -1 +0,0 @@ -docx.sh \ No newline at end of file diff --git a/files/files/usr/lib/F123-wrappers/es-ES/html.sh b/files/files/usr/lib/F123-wrappers/es-ES/html.sh deleted file mode 100644 index acb67a6..0000000 --- a/files/files/usr/lib/F123-wrappers/es-ES/html.sh +++ /dev/null @@ -1 +0,0 @@ -docx.sh \ No newline at end of file diff --git a/files/files/usr/lib/F123-wrappers/es-ES/language-chooser.sh b/files/files/usr/lib/F123-wrappers/es-ES/language-chooser.sh deleted file mode 100644 index 78ca201..0000000 --- a/files/files/usr/lib/F123-wrappers/es-ES/language-chooser.sh +++ /dev/null @@ -1,77 +0,0 @@ -#!/bin/bash -# language-chooser.sh -# Description: Set languages for fast language switching. -# -# Copyright 2019, F123 Consulting, -# Copyright 2019, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/es-ES/mail-launcher.sh b/files/files/usr/lib/F123-wrappers/es-ES/mail-launcher.sh deleted file mode 100644 index ad107ef..0000000 --- a/files/files/usr/lib/F123-wrappers/es-ES/mail-launcher.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash -# mail-launcher.sh -# Description Launch the correct mail client as specified in preferences. -# -# Copyright 2018, F123 Consulting, -# Copyright 2018, Storm Dragon, -# -# 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=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( -# Copyright 2019, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/es-ES/odt.sh b/files/files/usr/lib/F123-wrappers/es-ES/odt.sh deleted file mode 100644 index acb67a6..0000000 --- a/files/files/usr/lib/F123-wrappers/es-ES/odt.sh +++ /dev/null @@ -1 +0,0 @@ -docx.sh \ No newline at end of file diff --git a/files/files/usr/lib/F123-wrappers/es-ES/ott.sh b/files/files/usr/lib/F123-wrappers/es-ES/ott.sh deleted file mode 100644 index acb67a6..0000000 --- a/files/files/usr/lib/F123-wrappers/es-ES/ott.sh +++ /dev/null @@ -1 +0,0 @@ -docx.sh \ No newline at end of file diff --git a/files/files/usr/lib/F123-wrappers/es-ES/pdf.sh b/files/files/usr/lib/F123-wrappers/es-ES/pdf.sh deleted file mode 100644 index acb67a6..0000000 --- a/files/files/usr/lib/F123-wrappers/es-ES/pdf.sh +++ /dev/null @@ -1 +0,0 @@ -docx.sh \ No newline at end of file diff --git a/files/files/usr/lib/F123-wrappers/es-ES/pdmenu_default.sh b/files/files/usr/lib/F123-wrappers/es-ES/pdmenu_default.sh deleted file mode 100644 index c85510f..0000000 --- a/files/files/usr/lib/F123-wrappers/es-ES/pdmenu_default.sh +++ /dev/null @@ -1,339 +0,0 @@ -#!/bin/bash -# F123 menu -# -# Copyright 2018, F123 Consulting, -# Copyright 2018, Kyle, -# Copyright 2018, Storm Dragon, -# -# 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=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - #exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - #exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - #exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - #exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - #exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - #exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - #exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - #exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - #exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - #exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /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 diff --git a/files/files/usr/lib/F123-wrappers/es-ES/pdmenu_development.sh b/files/files/usr/lib/F123-wrappers/es-ES/pdmenu_development.sh deleted file mode 100644 index 788b223..0000000 --- a/files/files/usr/lib/F123-wrappers/es-ES/pdmenu_development.sh +++ /dev/null @@ -1,339 +0,0 @@ -#!/bin/bash -# F123 menu -# -# Copyright 2018, F123 Consulting, -# Copyright 2018, Kyle, -# Copyright 2018, Storm Dragon, -# -# 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=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /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 diff --git a/files/files/usr/lib/F123-wrappers/es-ES/reminders.sh b/files/files/usr/lib/F123-wrappers/es-ES/reminders.sh deleted file mode 100644 index 7ed03ce..0000000 --- a/files/files/usr/lib/F123-wrappers/es-ES/reminders.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/bash -# reminders -# -# Copyright 2018, F123 Consulting, -# Copyright 2018, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/es-ES/restore-accessibility.sh b/files/files/usr/lib/F123-wrappers/es-ES/restore-accessibility.sh deleted file mode 100644 index 4a05324..0000000 --- a/files/files/usr/lib/F123-wrappers/es-ES/restore-accessibility.sh +++ /dev/null @@ -1,76 +0,0 @@ -#!/bin/bash -# reset-a11y.sh -# Description: completely restore the system to last known working state -# -# Copyright 2019, F123 Consulting, -# Copyright 2019, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/es-ES/restore-manager.sh b/files/files/usr/lib/F123-wrappers/es-ES/restore-manager.sh deleted file mode 100644 index ae534c5..0000000 --- a/files/files/usr/lib/F123-wrappers/es-ES/restore-manager.sh +++ /dev/null @@ -1,78 +0,0 @@ -#!/bin/bash -# restore-manager.sh -# Description: -# -# Copyright 2019, F123 Consulting, -# Copyright 2019, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/es-ES/rtf.sh b/files/files/usr/lib/F123-wrappers/es-ES/rtf.sh deleted file mode 100644 index acb67a6..0000000 --- a/files/files/usr/lib/F123-wrappers/es-ES/rtf.sh +++ /dev/null @@ -1 +0,0 @@ -docx.sh \ No newline at end of file diff --git a/files/files/usr/lib/F123-wrappers/es-ES/select-language.sh b/files/files/usr/lib/F123-wrappers/es-ES/select-language.sh deleted file mode 100644 index 858e09b..0000000 --- a/files/files/usr/lib/F123-wrappers/es-ES/select-language.sh +++ /dev/null @@ -1,104 +0,0 @@ -#!/bin/bash -# Select-language -# -# Copyright 2018, F123 Consulting, -# Copyright 2018, Storm Dragon, -# Copyright 2018, Kyle, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/es-ES/system-backup.sh b/files/files/usr/lib/F123-wrappers/es-ES/system-backup.sh deleted file mode 100644 index 8f9feb9..0000000 --- a/files/files/usr/lib/F123-wrappers/es-ES/system-backup.sh +++ /dev/null @@ -1,78 +0,0 @@ -#!/bin/bash -# system-backup.sh -# Description: -# -# Copyright 2019, F123 Consulting, -# Copyright 2019, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/es-ES/timezone.sh b/files/files/usr/lib/F123-wrappers/es-ES/timezone.sh deleted file mode 100644 index e153976..0000000 --- a/files/files/usr/lib/F123-wrappers/es-ES/timezone.sh +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/bash -# Make setting the timezone easier -# -# Copyright 2018, F123 Consulting, -# Copyright 2018, Storm Dragon, -# Copyright 2018, Kyle, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/es-ES/txt.sh b/files/files/usr/lib/F123-wrappers/es-ES/txt.sh deleted file mode 100644 index acb67a6..0000000 --- a/files/files/usr/lib/F123-wrappers/es-ES/txt.sh +++ /dev/null @@ -1 +0,0 @@ -docx.sh \ No newline at end of file diff --git a/files/files/usr/lib/F123-wrappers/es-ES/uot.sh b/files/files/usr/lib/F123-wrappers/es-ES/uot.sh deleted file mode 100644 index acb67a6..0000000 --- a/files/files/usr/lib/F123-wrappers/es-ES/uot.sh +++ /dev/null @@ -1 +0,0 @@ -docx.sh \ No newline at end of file diff --git a/files/files/usr/lib/F123-wrappers/es-ES/x-self-voiced b/files/files/usr/lib/F123-wrappers/es-ES/x-self-voiced deleted file mode 100644 index 8ce80c1..0000000 --- a/files/files/usr/lib/F123-wrappers/es-ES/x-self-voiced +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash -# x-self-voiced -# -# Copyright 2019, F123 Consulting, -# Copyright 2019, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/es-ES/xlauncher b/files/files/usr/lib/F123-wrappers/es-ES/xlauncher deleted file mode 100644 index ca951ea..0000000 --- a/files/files/usr/lib/F123-wrappers/es-ES/xlauncher +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash -# xlauncher -# -# Copyright 2018, F123 Consulting, -# Copyright 2018, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/es-ES/xml.sh b/files/files/usr/lib/F123-wrappers/es-ES/xml.sh deleted file mode 100644 index acb67a6..0000000 --- a/files/files/usr/lib/F123-wrappers/es-ES/xml.sh +++ /dev/null @@ -1 +0,0 @@ -docx.sh \ No newline at end of file diff --git a/files/files/usr/lib/F123-wrappers/mud-loader.sh b/files/files/usr/lib/F123-wrappers/mud-loader.sh deleted file mode 100755 index 2ffb845..0000000 --- a/files/files/usr/lib/F123-wrappers/mud-loader.sh +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/bash -#!/bin/bash -# mud_loader.xh -# Description: Easlily load mud soundpacks. -# -# Copyright 2019, F123 Consulting, -# Copyright 2019, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/ne/en_US/doc.sh b/files/files/usr/lib/F123-wrappers/ne/en_US/doc.sh deleted file mode 120000 index acb67a6..0000000 --- a/files/files/usr/lib/F123-wrappers/ne/en_US/doc.sh +++ /dev/null @@ -1 +0,0 @@ -docx.sh \ No newline at end of file diff --git a/files/files/usr/lib/F123-wrappers/ne/en_US/docm.sh b/files/files/usr/lib/F123-wrappers/ne/en_US/docm.sh deleted file mode 120000 index acb67a6..0000000 --- a/files/files/usr/lib/F123-wrappers/ne/en_US/docm.sh +++ /dev/null @@ -1 +0,0 @@ -docx.sh \ No newline at end of file diff --git a/files/files/usr/lib/F123-wrappers/ne/en_US/docx.sh b/files/files/usr/lib/F123-wrappers/ne/en_US/docx.sh deleted file mode 100755 index 9b2d9eb..0000000 --- a/files/files/usr/lib/F123-wrappers/ne/en_US/docx.sh +++ /dev/null @@ -1,81 +0,0 @@ -#!/bin/bash -# docx.sh -# Description: Helper for ne macro to convert from markdown to docx -# -# Copyright 2019, F123 Consulting, -# Copyright 2019, Storm Dragon, -# -# 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 - diff --git a/files/files/usr/lib/F123-wrappers/ne/en_US/dot.sh b/files/files/usr/lib/F123-wrappers/ne/en_US/dot.sh deleted file mode 120000 index acb67a6..0000000 --- a/files/files/usr/lib/F123-wrappers/ne/en_US/dot.sh +++ /dev/null @@ -1 +0,0 @@ -docx.sh \ No newline at end of file diff --git a/files/files/usr/lib/F123-wrappers/ne/en_US/fodt.sh b/files/files/usr/lib/F123-wrappers/ne/en_US/fodt.sh deleted file mode 120000 index acb67a6..0000000 --- a/files/files/usr/lib/F123-wrappers/ne/en_US/fodt.sh +++ /dev/null @@ -1 +0,0 @@ -docx.sh \ No newline at end of file diff --git a/files/files/usr/lib/F123-wrappers/ne/en_US/html.sh b/files/files/usr/lib/F123-wrappers/ne/en_US/html.sh deleted file mode 120000 index acb67a6..0000000 --- a/files/files/usr/lib/F123-wrappers/ne/en_US/html.sh +++ /dev/null @@ -1 +0,0 @@ -docx.sh \ No newline at end of file diff --git a/files/files/usr/lib/F123-wrappers/ne/en_US/odt.sh b/files/files/usr/lib/F123-wrappers/ne/en_US/odt.sh deleted file mode 120000 index acb67a6..0000000 --- a/files/files/usr/lib/F123-wrappers/ne/en_US/odt.sh +++ /dev/null @@ -1 +0,0 @@ -docx.sh \ No newline at end of file diff --git a/files/files/usr/lib/F123-wrappers/ne/en_US/ott.sh b/files/files/usr/lib/F123-wrappers/ne/en_US/ott.sh deleted file mode 120000 index acb67a6..0000000 --- a/files/files/usr/lib/F123-wrappers/ne/en_US/ott.sh +++ /dev/null @@ -1 +0,0 @@ -docx.sh \ No newline at end of file diff --git a/files/files/usr/lib/F123-wrappers/ne/en_US/pdf.sh b/files/files/usr/lib/F123-wrappers/ne/en_US/pdf.sh deleted file mode 120000 index acb67a6..0000000 --- a/files/files/usr/lib/F123-wrappers/ne/en_US/pdf.sh +++ /dev/null @@ -1 +0,0 @@ -docx.sh \ No newline at end of file diff --git a/files/files/usr/lib/F123-wrappers/ne/en_US/rtf.sh b/files/files/usr/lib/F123-wrappers/ne/en_US/rtf.sh deleted file mode 120000 index acb67a6..0000000 --- a/files/files/usr/lib/F123-wrappers/ne/en_US/rtf.sh +++ /dev/null @@ -1 +0,0 @@ -docx.sh \ No newline at end of file diff --git a/files/files/usr/lib/F123-wrappers/ne/en_US/txt.sh b/files/files/usr/lib/F123-wrappers/ne/en_US/txt.sh deleted file mode 120000 index acb67a6..0000000 --- a/files/files/usr/lib/F123-wrappers/ne/en_US/txt.sh +++ /dev/null @@ -1 +0,0 @@ -docx.sh \ No newline at end of file diff --git a/files/files/usr/lib/F123-wrappers/ne/en_US/uot.sh b/files/files/usr/lib/F123-wrappers/ne/en_US/uot.sh deleted file mode 120000 index acb67a6..0000000 --- a/files/files/usr/lib/F123-wrappers/ne/en_US/uot.sh +++ /dev/null @@ -1 +0,0 @@ -docx.sh \ No newline at end of file diff --git a/files/files/usr/lib/F123-wrappers/ne/en_US/xml.sh b/files/files/usr/lib/F123-wrappers/ne/en_US/xml.sh deleted file mode 120000 index acb67a6..0000000 --- a/files/files/usr/lib/F123-wrappers/ne/en_US/xml.sh +++ /dev/null @@ -1 +0,0 @@ -docx.sh \ No newline at end of file diff --git a/files/files/usr/lib/F123-wrappers/pt-BR/about.sh b/files/files/usr/lib/F123-wrappers/pt-BR/about.sh deleted file mode 100644 index 5890ca1..0000000 --- a/files/files/usr/lib/F123-wrappers/pt-BR/about.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash -# about.sh -# Description: Provides nicely formatted version information. -# -# Copyright 2019, F123 Consulting, -# Copyright 2019, Storm Dragon, -# -# 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="$( -# Copyright 2019, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/pt-BR/blueman-launcher b/files/files/usr/lib/F123-wrappers/pt-BR/blueman-launcher deleted file mode 100644 index d5eac79..0000000 --- a/files/files/usr/lib/F123-wrappers/pt-BR/blueman-launcher +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash -# blueman-launcher -# -# Copyright 2019, F123 Consulting, -# Copyright 2019, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/pt-BR/bookreader.sh b/files/files/usr/lib/F123-wrappers/pt-BR/bookreader.sh deleted file mode 100644 index 88c6a2c..0000000 --- a/files/files/usr/lib/F123-wrappers/pt-BR/bookreader.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/bash -# F123 book reader -# -# Copyright 2018, F123 Consulting, -# Copyright 2018, Kyle, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/pt-BR/change-mode.sh b/files/files/usr/lib/F123-wrappers/pt-BR/change-mode.sh deleted file mode 100644 index 3ab5900..0000000 --- a/files/files/usr/lib/F123-wrappers/pt-BR/change-mode.sh +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/bash -# change-mode: Configuration utility to change the menu and available services. -# -# Copyright 2019, F123 Consulting, -# Copyright 2019, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/pt-BR/chuser.sh b/files/files/usr/lib/F123-wrappers/pt-BR/chuser.sh deleted file mode 100644 index 42ac7a0..0000000 --- a/files/files/usr/lib/F123-wrappers/pt-BR/chuser.sh +++ /dev/null @@ -1,91 +0,0 @@ -#!/bin/bash -# chuser.sh -# Description: Changes the username to something new at login -# -# Copyright 2019, F123 Consulting, -# Copyright 2019, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/pt-BR/configure-email.sh b/files/files/usr/lib/F123-wrappers/pt-BR/configure-email.sh deleted file mode 100644 index 1b1386e..0000000 --- a/files/files/usr/lib/F123-wrappers/pt-BR/configure-email.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/bash -# configure-email.sh -# Description: Select prefered email client and configure it. -# -# Copyright 2018, F123 Consulting, -# Copyright 2018, Storm Dragon, -# -# 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=\$( /dev/null - echo -n "setting set screen#suspendingScreen=\$( -# Copyright 2018, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/pt-BR/configure-pianobar.sh b/files/files/usr/lib/F123-wrappers/pt-BR/configure-pianobar.sh deleted file mode 100644 index c4a7bb2..0000000 --- a/files/files/usr/lib/F123-wrappers/pt-BR/configure-pianobar.sh +++ /dev/null @@ -1,97 +0,0 @@ -#!/bin/bash -# configure-pianobar.sh -# Description: Easily configure pianobar. -# -# Copyright 2018, F123 Consulting, -# Copyright 2018, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/pt-BR/configure-security.sh b/files/files/usr/lib/F123-wrappers/pt-BR/configure-security.sh deleted file mode 100644 index d5f1fa2..0000000 --- a/files/files/usr/lib/F123-wrappers/pt-BR/configure-security.sh +++ /dev/null @@ -1,92 +0,0 @@ -#!/bin/bash -# configure-security -# -# Copyright 2018, F123 Consulting, -# Copyright 2018, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/pt-BR/configure-sound.sh b/files/files/usr/lib/F123-wrappers/pt-BR/configure-sound.sh deleted file mode 100644 index 939e29d..0000000 --- a/files/files/usr/lib/F123-wrappers/pt-BR/configure-sound.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash -# configure-sound -# -# Copyright 2018, F123 Consulting, -# Copyright 2018, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/pt-BR/configure-speech.sh b/files/files/usr/lib/F123-wrappers/pt-BR/configure-speech.sh deleted file mode 100644 index da714e1..0000000 --- a/files/files/usr/lib/F123-wrappers/pt-BR/configure-speech.sh +++ /dev/null @@ -1,134 +0,0 @@ -#!/bin/bash -# configure-speech -# -# Copyright 2018, F123 Consulting, -# Copyright 2018, Storm Dragon, -# Copyright 2018, Kyle, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/pt-BR/doc.sh b/files/files/usr/lib/F123-wrappers/pt-BR/doc.sh deleted file mode 100644 index acb67a6..0000000 --- a/files/files/usr/lib/F123-wrappers/pt-BR/doc.sh +++ /dev/null @@ -1 +0,0 @@ -docx.sh \ No newline at end of file diff --git a/files/files/usr/lib/F123-wrappers/pt-BR/docm.sh b/files/files/usr/lib/F123-wrappers/pt-BR/docm.sh deleted file mode 100644 index acb67a6..0000000 --- a/files/files/usr/lib/F123-wrappers/pt-BR/docm.sh +++ /dev/null @@ -1 +0,0 @@ -docx.sh \ No newline at end of file diff --git a/files/files/usr/lib/F123-wrappers/pt-BR/docx.sh b/files/files/usr/lib/F123-wrappers/pt-BR/docx.sh deleted file mode 100644 index 9b2d9eb..0000000 --- a/files/files/usr/lib/F123-wrappers/pt-BR/docx.sh +++ /dev/null @@ -1,81 +0,0 @@ -#!/bin/bash -# docx.sh -# Description: Helper for ne macro to convert from markdown to docx -# -# Copyright 2019, F123 Consulting, -# Copyright 2019, Storm Dragon, -# -# 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 - diff --git a/files/files/usr/lib/F123-wrappers/pt-BR/dot.sh b/files/files/usr/lib/F123-wrappers/pt-BR/dot.sh deleted file mode 100644 index acb67a6..0000000 --- a/files/files/usr/lib/F123-wrappers/pt-BR/dot.sh +++ /dev/null @@ -1 +0,0 @@ -docx.sh \ No newline at end of file diff --git a/files/files/usr/lib/F123-wrappers/pt-BR/fodt.sh b/files/files/usr/lib/F123-wrappers/pt-BR/fodt.sh deleted file mode 100644 index acb67a6..0000000 --- a/files/files/usr/lib/F123-wrappers/pt-BR/fodt.sh +++ /dev/null @@ -1 +0,0 @@ -docx.sh \ No newline at end of file diff --git a/files/files/usr/lib/F123-wrappers/pt-BR/html.sh b/files/files/usr/lib/F123-wrappers/pt-BR/html.sh deleted file mode 100644 index acb67a6..0000000 --- a/files/files/usr/lib/F123-wrappers/pt-BR/html.sh +++ /dev/null @@ -1 +0,0 @@ -docx.sh \ No newline at end of file diff --git a/files/files/usr/lib/F123-wrappers/pt-BR/language-chooser.sh b/files/files/usr/lib/F123-wrappers/pt-BR/language-chooser.sh deleted file mode 100644 index 78ca201..0000000 --- a/files/files/usr/lib/F123-wrappers/pt-BR/language-chooser.sh +++ /dev/null @@ -1,77 +0,0 @@ -#!/bin/bash -# language-chooser.sh -# Description: Set languages for fast language switching. -# -# Copyright 2019, F123 Consulting, -# Copyright 2019, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/pt-BR/mail-launcher.sh b/files/files/usr/lib/F123-wrappers/pt-BR/mail-launcher.sh deleted file mode 100644 index ad107ef..0000000 --- a/files/files/usr/lib/F123-wrappers/pt-BR/mail-launcher.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash -# mail-launcher.sh -# Description Launch the correct mail client as specified in preferences. -# -# Copyright 2018, F123 Consulting, -# Copyright 2018, Storm Dragon, -# -# 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=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( -# Copyright 2019, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/pt-BR/mumble-manager-add-server.sh b/files/files/usr/lib/F123-wrappers/pt-BR/mumble-manager-add-server.sh deleted file mode 100644 index 1e705c5..0000000 --- a/files/files/usr/lib/F123-wrappers/pt-BR/mumble-manager-add-server.sh +++ /dev/null @@ -1 +0,0 @@ -mumble-manager.sh \ No newline at end of file diff --git a/files/files/usr/lib/F123-wrappers/pt-BR/mumble-manager-remove-server.sh b/files/files/usr/lib/F123-wrappers/pt-BR/mumble-manager-remove-server.sh deleted file mode 100644 index 1e705c5..0000000 --- a/files/files/usr/lib/F123-wrappers/pt-BR/mumble-manager-remove-server.sh +++ /dev/null @@ -1 +0,0 @@ -mumble-manager.sh \ No newline at end of file diff --git a/files/files/usr/lib/F123-wrappers/pt-BR/mumble-manager.sh b/files/files/usr/lib/F123-wrappers/pt-BR/mumble-manager.sh deleted file mode 100644 index 8de1b77..0000000 --- a/files/files/usr/lib/F123-wrappers/pt-BR/mumble-manager.sh +++ /dev/null @@ -1,125 +0,0 @@ -#!/bin/bash -# mumble-manager -# Description: Make managing servers with barnard easy. -# -# Copyright 2019, F123 Consulting, -# Copyright 2019, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/pt-BR/odt.sh b/files/files/usr/lib/F123-wrappers/pt-BR/odt.sh deleted file mode 100644 index acb67a6..0000000 --- a/files/files/usr/lib/F123-wrappers/pt-BR/odt.sh +++ /dev/null @@ -1 +0,0 @@ -docx.sh \ No newline at end of file diff --git a/files/files/usr/lib/F123-wrappers/pt-BR/ott.sh b/files/files/usr/lib/F123-wrappers/pt-BR/ott.sh deleted file mode 100644 index acb67a6..0000000 --- a/files/files/usr/lib/F123-wrappers/pt-BR/ott.sh +++ /dev/null @@ -1 +0,0 @@ -docx.sh \ No newline at end of file diff --git a/files/files/usr/lib/F123-wrappers/pt-BR/pdf.sh b/files/files/usr/lib/F123-wrappers/pt-BR/pdf.sh deleted file mode 100644 index acb67a6..0000000 --- a/files/files/usr/lib/F123-wrappers/pt-BR/pdf.sh +++ /dev/null @@ -1 +0,0 @@ -docx.sh \ No newline at end of file diff --git a/files/files/usr/lib/F123-wrappers/pt-BR/pdmenu_default.sh b/files/files/usr/lib/F123-wrappers/pt-BR/pdmenu_default.sh deleted file mode 100644 index c85510f..0000000 --- a/files/files/usr/lib/F123-wrappers/pt-BR/pdmenu_default.sh +++ /dev/null @@ -1,339 +0,0 @@ -#!/bin/bash -# F123 menu -# -# Copyright 2018, F123 Consulting, -# Copyright 2018, Kyle, -# Copyright 2018, Storm Dragon, -# -# 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=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - #exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - #exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - #exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - #exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - #exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - #exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - #exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - #exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - #exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - #exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /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 diff --git a/files/files/usr/lib/F123-wrappers/pt-BR/pdmenu_development.sh b/files/files/usr/lib/F123-wrappers/pt-BR/pdmenu_development.sh deleted file mode 100644 index 788b223..0000000 --- a/files/files/usr/lib/F123-wrappers/pt-BR/pdmenu_development.sh +++ /dev/null @@ -1,339 +0,0 @@ -#!/bin/bash -# F123 menu -# -# Copyright 2018, F123 Consulting, -# Copyright 2018, Kyle, -# Copyright 2018, Storm Dragon, -# -# 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=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null - exec:::echo -n "setting set screen#suspendingScreen=\$( /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 diff --git a/files/files/usr/lib/F123-wrappers/pt-BR/restore-accessibility.sh b/files/files/usr/lib/F123-wrappers/pt-BR/restore-accessibility.sh deleted file mode 100644 index 4a05324..0000000 --- a/files/files/usr/lib/F123-wrappers/pt-BR/restore-accessibility.sh +++ /dev/null @@ -1,76 +0,0 @@ -#!/bin/bash -# reset-a11y.sh -# Description: completely restore the system to last known working state -# -# Copyright 2019, F123 Consulting, -# Copyright 2019, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/pt-BR/restore-manager.sh b/files/files/usr/lib/F123-wrappers/pt-BR/restore-manager.sh deleted file mode 100644 index ae534c5..0000000 --- a/files/files/usr/lib/F123-wrappers/pt-BR/restore-manager.sh +++ /dev/null @@ -1,78 +0,0 @@ -#!/bin/bash -# restore-manager.sh -# Description: -# -# Copyright 2019, F123 Consulting, -# Copyright 2019, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/pt-BR/rtf.sh b/files/files/usr/lib/F123-wrappers/pt-BR/rtf.sh deleted file mode 100644 index acb67a6..0000000 --- a/files/files/usr/lib/F123-wrappers/pt-BR/rtf.sh +++ /dev/null @@ -1 +0,0 @@ -docx.sh \ No newline at end of file diff --git a/files/files/usr/lib/F123-wrappers/pt-BR/select-language.sh b/files/files/usr/lib/F123-wrappers/pt-BR/select-language.sh deleted file mode 100644 index 858e09b..0000000 --- a/files/files/usr/lib/F123-wrappers/pt-BR/select-language.sh +++ /dev/null @@ -1,104 +0,0 @@ -#!/bin/bash -# Select-language -# -# Copyright 2018, F123 Consulting, -# Copyright 2018, Storm Dragon, -# Copyright 2018, Kyle, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/pt-BR/system-backup.sh b/files/files/usr/lib/F123-wrappers/pt-BR/system-backup.sh deleted file mode 100644 index 8f9feb9..0000000 --- a/files/files/usr/lib/F123-wrappers/pt-BR/system-backup.sh +++ /dev/null @@ -1,78 +0,0 @@ -#!/bin/bash -# system-backup.sh -# Description: -# -# Copyright 2019, F123 Consulting, -# Copyright 2019, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/pt-BR/timezone.sh b/files/files/usr/lib/F123-wrappers/pt-BR/timezone.sh deleted file mode 100644 index e153976..0000000 --- a/files/files/usr/lib/F123-wrappers/pt-BR/timezone.sh +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/bash -# Make setting the timezone easier -# -# Copyright 2018, F123 Consulting, -# Copyright 2018, Storm Dragon, -# Copyright 2018, Kyle, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/pt-BR/tips.sh b/files/files/usr/lib/F123-wrappers/pt-BR/tips.sh deleted file mode 100644 index be36b73..0000000 --- a/files/files/usr/lib/F123-wrappers/pt-BR/tips.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/bash -# tips.sh -# Description -# -# Copyright 2019, F123 Consulting, -# Copyright 2019, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/pt-BR/txt.sh b/files/files/usr/lib/F123-wrappers/pt-BR/txt.sh deleted file mode 100644 index acb67a6..0000000 --- a/files/files/usr/lib/F123-wrappers/pt-BR/txt.sh +++ /dev/null @@ -1 +0,0 @@ -docx.sh \ No newline at end of file diff --git a/files/files/usr/lib/F123-wrappers/pt-BR/uot.sh b/files/files/usr/lib/F123-wrappers/pt-BR/uot.sh deleted file mode 100644 index acb67a6..0000000 --- a/files/files/usr/lib/F123-wrappers/pt-BR/uot.sh +++ /dev/null @@ -1 +0,0 @@ -docx.sh \ No newline at end of file diff --git a/files/files/usr/lib/F123-wrappers/pt-BR/x-self-voiced b/files/files/usr/lib/F123-wrappers/pt-BR/x-self-voiced deleted file mode 100644 index 8ce80c1..0000000 --- a/files/files/usr/lib/F123-wrappers/pt-BR/x-self-voiced +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash -# x-self-voiced -# -# Copyright 2019, F123 Consulting, -# Copyright 2019, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/pt-BR/xlauncher b/files/files/usr/lib/F123-wrappers/pt-BR/xlauncher deleted file mode 100644 index ca951ea..0000000 --- a/files/files/usr/lib/F123-wrappers/pt-BR/xlauncher +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash -# xlauncher -# -# Copyright 2018, F123 Consulting, -# Copyright 2018, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/pt-BR/xml.sh b/files/files/usr/lib/F123-wrappers/pt-BR/xml.sh deleted file mode 100644 index acb67a6..0000000 --- a/files/files/usr/lib/F123-wrappers/pt-BR/xml.sh +++ /dev/null @@ -1 +0,0 @@ -docx.sh \ No newline at end of file diff --git a/files/files/usr/lib/F123-wrappers/reminders.sh b/files/files/usr/lib/F123-wrappers/reminders.sh deleted file mode 100755 index 7ed03ce..0000000 --- a/files/files/usr/lib/F123-wrappers/reminders.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/bash -# reminders -# -# Copyright 2018, F123 Consulting, -# Copyright 2018, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/restore-accessibility.sh b/files/files/usr/lib/F123-wrappers/restore-accessibility.sh deleted file mode 100755 index 4a05324..0000000 --- a/files/files/usr/lib/F123-wrappers/restore-accessibility.sh +++ /dev/null @@ -1,76 +0,0 @@ -#!/bin/bash -# reset-a11y.sh -# Description: completely restore the system to last known working state -# -# Copyright 2019, F123 Consulting, -# Copyright 2019, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/restore-manager.sh b/files/files/usr/lib/F123-wrappers/restore-manager.sh deleted file mode 100755 index ae534c5..0000000 --- a/files/files/usr/lib/F123-wrappers/restore-manager.sh +++ /dev/null @@ -1,78 +0,0 @@ -#!/bin/bash -# restore-manager.sh -# Description: -# -# Copyright 2019, F123 Consulting, -# Copyright 2019, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/system-backup.sh b/files/files/usr/lib/F123-wrappers/system-backup.sh deleted file mode 100755 index 8f9feb9..0000000 --- a/files/files/usr/lib/F123-wrappers/system-backup.sh +++ /dev/null @@ -1,78 +0,0 @@ -#!/bin/bash -# system-backup.sh -# Description: -# -# Copyright 2019, F123 Consulting, -# Copyright 2019, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/timezone.sh b/files/files/usr/lib/F123-wrappers/timezone.sh deleted file mode 100755 index e153976..0000000 --- a/files/files/usr/lib/F123-wrappers/timezone.sh +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/bash -# Make setting the timezone easier -# -# Copyright 2018, F123 Consulting, -# Copyright 2018, Storm Dragon, -# Copyright 2018, Kyle, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/tips.sh b/files/files/usr/lib/F123-wrappers/tips.sh deleted file mode 100755 index be36b73..0000000 --- a/files/files/usr/lib/F123-wrappers/tips.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/bash -# tips.sh -# Description -# -# Copyright 2019, F123 Consulting, -# Copyright 2019, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/x-self-voiced b/files/files/usr/lib/F123-wrappers/x-self-voiced deleted file mode 100755 index 8ce80c1..0000000 --- a/files/files/usr/lib/F123-wrappers/x-self-voiced +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash -# x-self-voiced -# -# Copyright 2019, F123 Consulting, -# Copyright 2019, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-wrappers/xlauncher b/files/files/usr/lib/F123-wrappers/xlauncher deleted file mode 100755 index ca951ea..0000000 --- a/files/files/usr/lib/F123-wrappers/xlauncher +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash -# xlauncher -# -# Copyright 2018, F123 Consulting, -# Copyright 2018, Storm Dragon, -# -# 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 diff --git a/files/files/usr/lib/F123-includes/preferences-manager.sh b/files/files/usr/lib/stormux-includes/preferences-manager.sh similarity index 100% rename from files/files/usr/lib/F123-includes/preferences-manager.sh rename to files/files/usr/lib/stormux-includes/preferences-manager.sh diff --git a/files/files/usr/lib/F123-includes/script_functions.sh b/files/files/usr/lib/stormux-includes/script_functions.sh similarity index 100% rename from files/files/usr/lib/F123-includes/script_functions.sh rename to files/files/usr/lib/stormux-includes/script_functions.sh diff --git a/files/files/usr/lib/F123-wrappers/about.sh b/files/files/usr/lib/stormux-wrappers/about.sh similarity index 100% rename from files/files/usr/lib/F123-wrappers/about.sh rename to files/files/usr/lib/stormux-wrappers/about.sh diff --git a/files/files/usr/lib/F123-wrappers/backup-manager.sh b/files/files/usr/lib/stormux-wrappers/backup-manager.sh similarity index 96% rename from files/files/usr/lib/F123-wrappers/backup-manager.sh rename to files/files/usr/lib/stormux-wrappers/backup-manager.sh index 036c152..5110d1c 100755 --- a/files/files/usr/lib/F123-wrappers/backup-manager.sh +++ b/files/files/usr/lib/stormux-wrappers/backup-manager.sh @@ -23,8 +23,8 @@ #--code-- # Load functions and reusable code: -if [[ -d /usr/lib/F123-includes/ ]]; then - for i in /usr/lib/F123-includes/*.sh ; do +if [[ -d /usr/lib/stormux-includes/ ]]; then + for i in /usr/lib/stormux-includes/*.sh ; do source $i done fi diff --git a/files/files/usr/lib/F123-wrappers/ar-SA/blueman-launcher b/files/files/usr/lib/stormux-wrappers/blueman-launcher old mode 100644 new mode 100755 similarity index 100% rename from files/files/usr/lib/F123-wrappers/ar-SA/blueman-launcher rename to files/files/usr/lib/stormux-wrappers/blueman-launcher diff --git a/files/files/usr/lib/F123-wrappers/ar-SA/bookreader.sh b/files/files/usr/lib/stormux-wrappers/bookreader.sh old mode 100644 new mode 100755 similarity index 100% rename from files/files/usr/lib/F123-wrappers/ar-SA/bookreader.sh rename to files/files/usr/lib/stormux-wrappers/bookreader.sh diff --git a/files/files/usr/lib/F123-wrappers/change-mode.sh b/files/files/usr/lib/stormux-wrappers/change-mode.sh similarity index 97% rename from files/files/usr/lib/F123-wrappers/change-mode.sh rename to files/files/usr/lib/stormux-wrappers/change-mode.sh index 2b1c889..12bb00d 100755 --- a/files/files/usr/lib/F123-wrappers/change-mode.sh +++ b/files/files/usr/lib/stormux-wrappers/change-mode.sh @@ -26,7 +26,7 @@ export TEXTDOMAINDIR=/usr/share/locale . gettext.sh # Load F123 includes -for i in /usr/lib/F123-includes/*.sh ; do +for i in /usr/lib/stormux-includes/*.sh ; do source $i done diff --git a/files/files/usr/lib/F123-wrappers/chuser.sh b/files/files/usr/lib/stormux-wrappers/chuser.sh similarity index 96% rename from files/files/usr/lib/F123-wrappers/chuser.sh rename to files/files/usr/lib/stormux-wrappers/chuser.sh index e35ff8a..8d07d3b 100755 --- a/files/files/usr/lib/F123-wrappers/chuser.sh +++ b/files/files/usr/lib/stormux-wrappers/chuser.sh @@ -23,8 +23,8 @@ #--code-- # Load functions and reusable code: -if [[ -d /usr/lib/F123-includes/ ]]; then - for i in /usr/lib/F123-includes/*.sh ; do +if [[ -d /usr/lib/stormux-includes/ ]]; then + for i in /usr/lib/stormux-includes/*.sh ; do source $i done fi diff --git a/files/files/usr/lib/F123-wrappers/clilauncher.sh b/files/files/usr/lib/stormux-wrappers/clilauncher.sh similarity index 100% rename from files/files/usr/lib/F123-wrappers/clilauncher.sh rename to files/files/usr/lib/stormux-wrappers/clilauncher.sh diff --git a/files/files/usr/lib/F123-wrappers/configure-email.sh b/files/files/usr/lib/stormux-wrappers/configure-email.sh similarity index 93% rename from files/files/usr/lib/F123-wrappers/configure-email.sh rename to files/files/usr/lib/stormux-wrappers/configure-email.sh index 1b1386e..639b614 100755 --- a/files/files/usr/lib/F123-wrappers/configure-email.sh +++ b/files/files/usr/lib/stormux-wrappers/configure-email.sh @@ -23,7 +23,7 @@ #--code-- # Load functions and reusable code: -source /usr/lib/F123-includes/script_functions.sh +source /usr/lib/stormux-includes/script_functions.sh # List of possible email clients. clientList=( @@ -44,7 +44,7 @@ case "${client}" in "thunderbird") python /usr/share/fenrirscreenreader/tools/fenrir-ignore-screen &> /dev/null echo -n "setting set screen#suspendingScreen=\$( /dev/null echo -n "setting set screen#suspendingScreen=\$( "${configPath}/config" diff --git a/files/files/usr/lib/F123-wrappers/configure-security.sh b/files/files/usr/lib/stormux-wrappers/configure-security.sh similarity index 98% rename from files/files/usr/lib/F123-wrappers/configure-security.sh rename to files/files/usr/lib/stormux-wrappers/configure-security.sh index 2d322e4..10bb053 100755 --- a/files/files/usr/lib/F123-wrappers/configure-security.sh +++ b/files/files/usr/lib/stormux-wrappers/configure-security.sh @@ -26,7 +26,7 @@ export TEXTDOMAINDIR=/usr/share/locale . gettext.sh # Load F123 includes -for i in /usr/lib/F123-includes/*.sh ; do +for i in /usr/lib/stormux-includes/*.sh ; do source $i done diff --git a/files/files/usr/lib/F123-wrappers/configure-sound.sh b/files/files/usr/lib/stormux-wrappers/configure-sound.sh similarity index 97% rename from files/files/usr/lib/F123-wrappers/configure-sound.sh rename to files/files/usr/lib/stormux-wrappers/configure-sound.sh index 939e29d..39b06d3 100755 --- a/files/files/usr/lib/F123-wrappers/configure-sound.sh +++ b/files/files/usr/lib/stormux-wrappers/configure-sound.sh @@ -26,7 +26,7 @@ export TEXTDOMAINDIR=/usr/share/locale . gettext.sh # Load F123 includes -for i in /usr/lib/F123-includes/*.sh ; do +for i in /usr/lib/stormux-includes/*.sh ; do source $i done diff --git a/files/files/usr/lib/F123-wrappers/configure-speech.sh b/files/files/usr/lib/stormux-wrappers/configure-speech.sh similarity index 99% rename from files/files/usr/lib/F123-wrappers/configure-speech.sh rename to files/files/usr/lib/stormux-wrappers/configure-speech.sh index b34bdab..bf90bf3 100755 --- a/files/files/usr/lib/F123-wrappers/configure-speech.sh +++ b/files/files/usr/lib/stormux-wrappers/configure-speech.sh @@ -27,7 +27,7 @@ export TEXTDOMAINDIR=/usr/share/locale . gettext.sh # include script functions -for i in /usr/lib/F123-includes/*.sh ; do +for i in /usr/lib/stormux-includes/*.sh ; do source $i done diff --git a/files/files/usr/lib/F123-wrappers/configure-web-browser.sh b/files/files/usr/lib/stormux-wrappers/configure-web-browser.sh similarity index 97% rename from files/files/usr/lib/F123-wrappers/configure-web-browser.sh rename to files/files/usr/lib/stormux-wrappers/configure-web-browser.sh index a85cd37..4188307 100755 --- a/files/files/usr/lib/F123-wrappers/configure-web-browser.sh +++ b/files/files/usr/lib/stormux-wrappers/configure-web-browser.sh @@ -23,8 +23,8 @@ #--code-- # Load functions and reusable code: -if [[ -d /usr/lib/F123-includes/ ]]; then - for i in /usr/lib/F123-includes/*.sh ; do +if [[ -d /usr/lib/stormux-includes/ ]]; then + for i in /usr/lib/stormux-includes/*.sh ; do source $i done fi diff --git a/files/files/usr/lib/F123-wrappers/first-boot b/files/files/usr/lib/stormux-wrappers/first-boot similarity index 92% rename from files/files/usr/lib/F123-wrappers/first-boot rename to files/files/usr/lib/stormux-wrappers/first-boot index e353ab1..cc11f07 100755 --- a/files/files/usr/lib/F123-wrappers/first-boot +++ b/files/files/usr/lib/stormux-wrappers/first-boot @@ -28,8 +28,8 @@ export TEXTDOMAIN=first-boot export TEXTDOMAINDIR=/usr/share/locale . gettext.sh -# Include F123-includes -for i in /usr/lib/F123-includes/*.sh ; do +# Include stormux-includes +for i in /usr/lib/stormux-includes/*.sh ; do source $i done source ~/.preferences @@ -88,7 +88,7 @@ setup_complete() { # remove the firstboot file if it exists. [[ -e ~/.firstboot ]] && rm -fv ~/.firstboot |& log if [[ "$userName" != "stormux" && "$userName" != "$USER" ]]; then - /usr/lib/F123-wrappers/chuser.sh $userName + /usr/lib/stormux-wrappers/chuser.sh $userName fi sudo reboot } @@ -115,8 +115,8 @@ xdg-user-dirs-update |& log # See comments in the functions themselves for details if [[ ! -s ~/.firstboot ]]; then touch ~/.firstboot - echo "Running /usr/lib/F123-wrappers/select-language.sh" | log - /usr/lib/F123-wrappers/select-language.sh + echo "Running /usr/lib/stormux-wrappers/select-language.sh" | log + /usr/lib/stormux-wrappers/select-language.sh fi # Start keyboard layout. @@ -150,8 +150,8 @@ else fi echo "Prompting for password change." | log if [[ "$(yesno "$(gettext "Do you want to change passwords for users of this system? Since everyone knows that the default password is f123, it is recommended that you change it.")")" == "Yes" ]]; then - echo "Running /usr/lib/F123-wrappers/configure-passwords.sh" | log - /usr/lib/F123-wrappers/configure-passwords.sh + echo "Running /usr/lib/stormux-wrappers/configure-passwords.sh" | log + /usr/lib/stormux-wrappers/configure-passwords.sh fi echo "Requesting user information." | log get_user_info @@ -165,14 +165,14 @@ if ! ping -c1 gitlab.com |& log | dialog --progressbox "$(gettext "Checking inte gettext "Unable to connect to the internet. You may experience loss of functionality until a connection is established." fi # Set and sync timezone -echo "Running /usr/lib/F123-wrappers/timezone.sh" | log -/usr/lib/F123-wrappers/timezone.sh +echo "Running /usr/lib/stormux-wrappers/timezone.sh" | log +/usr/lib/stormux-wrappers/timezone.sh # Synchronize repositories so that installations should go smoothly. sudo pacman -Syy |& log | dialog --progressbox "$(gettext "Configuring system, please wait...")" 0 0 echo "Prompting for security configuration." | log if [[ "$(yesno "$(gettext "Do you want to change security options for this system? If you press 'Enter' for yes, you will be able to make this computer a bit more secure, but also a bit less convenient.")")" == "Yes" ]]; then - echo "Running /usr/lib/F123-wrappers/configure-security.sh" | log - /usr/lib/F123-wrappers/configure-security.sh + echo "Running /usr/lib/stormux-wrappers/configure-security.sh" | log + /usr/lib/stormux-wrappers/configure-security.sh fi echo "displaying setup complete text" | log setup_complete diff --git a/files/files/usr/lib/F123-wrappers/language-chooser.sh b/files/files/usr/lib/stormux-wrappers/language-chooser.sh similarity index 97% rename from files/files/usr/lib/F123-wrappers/language-chooser.sh rename to files/files/usr/lib/stormux-wrappers/language-chooser.sh index 5e83a8f..e488d31 100755 --- a/files/files/usr/lib/F123-wrappers/language-chooser.sh +++ b/files/files/usr/lib/stormux-wrappers/language-chooser.sh @@ -23,7 +23,7 @@ #--code-- # Load functions and reusable code: -source /usr/lib/F123-includes/script_functions.sh +source /usr/lib/stormux-includes/script_functions.sh export TEXTDOMAIN=language-chooser export TEXTDOMAINDIR=/usr/share/locale source gettext.sh diff --git a/files/files/usr/lib/F123-wrappers/mail-launcher.sh b/files/files/usr/lib/stormux-wrappers/mail-launcher.sh similarity index 89% rename from files/files/usr/lib/F123-wrappers/mail-launcher.sh rename to files/files/usr/lib/stormux-wrappers/mail-launcher.sh index baaab44..2a873ba 100755 --- a/files/files/usr/lib/F123-wrappers/mail-launcher.sh +++ b/files/files/usr/lib/stormux-wrappers/mail-launcher.sh @@ -27,15 +27,15 @@ case "${preferences[emailClient]}" in "mutt") echo "exec:::command mutt";; "thunderbird") cat << EOF exec:::clear - exec:::/usr/lib/F123-wrappers/tips.sh thunderbird + exec:::/usr/lib/stormux-wrappers/tips.sh thunderbird exec:::python /usr/share/fenrirscreenreader/tools/fenrir-ignore-screen &> /dev/null exec:::echo -n "setting set screen#suspendingScreen=\$( /dev/null exec:::echo -n "setting set screen#suspendingScreen=\$(