diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b170f92 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +**/__pycache__/ +*.pyc +*.pyo +*.pyd diff --git a/i38.sh b/i38.sh index 3c18f47..cc56920 100755 --- a/i38.sh +++ b/i38.sh @@ -295,6 +295,23 @@ if [[ $(yesno "Do you want to use multiple keyboard layouts?") -eq 0 ]]; then fi # Volume jump volumeJump=$(rangebox "How much should pressing the volume keys change the volume?" 1 15 5) +# Screen Reader +unset programList +for i in cthulhu orca ; do + if command -v ${i/#-/} &> /dev/null ; then + if [ -n "$programList" ]; then + programList="$programList $i" + else + programList="$i" + fi + fi +done +if [ "$programList" != "${programList// /}" ]; then + screenReader="$(menulist ":Screen Reader" $programList)" +else + screenReader="${programList/#-/}" +fi +export screenReader="$(command -v $screenReader)" # Email client unset programList for i in betterbird evolution thunderbird ; do @@ -311,7 +328,7 @@ if [ "$programList" != "${programList// /}" ]; then else emailClient="${programList/#-/}" fi -emailClient="$(command -v $emailClient)" +export emailClient="$(command -v $emailClient)" # Web browser unset programList for i in brave chromium epiphany firefox google-chrome-stable google-chrome-unstable microsoft-edge-stable microsoft-edge-beta microsoft-edge-dev midori seamonkey ; do @@ -328,7 +345,7 @@ if [ "$programList" != "${programList// /}" ]; then else webBrowser="${programList/#-/}" fi -webBrowser="$(command -v $webBrowser)" +export webBrowser="$(command -v $webBrowser)" # Text editor unset programList for i in emacs geany gedit kate kwrite l3afpad leafpad libreoffice mousepad pluma ; do @@ -345,7 +362,7 @@ textEditor="$(menulist "Text editor:" $programList)" else textEditor="${programList/#-/}" fi -textEditor="$(command -v $textEditor)" +export textEditor="$(command -v $textEditor)" # File browser # Configure file browser unset programList @@ -363,7 +380,7 @@ if [ "$programList" != "${programList// /}" ]; then else fileBrowser="${programList/#-/}" fi -fileBrowser="$(command -v $fileBrowser)" +export fileBrowser="$(command -v $fileBrowser)" # Auto mount removable media udiskie=1 if command -v udiskie &> /dev/null ; then @@ -375,14 +392,14 @@ if command -v dex &> /dev/null ; then export dex=$(yesno "Would you like to autostart applications with dex?") fi if [[ $dex -eq 0 ]]; then - dex -t "${XDG_CONFIG_HOME:-${HOME}/.config}/autostart" -c $(command -v orca) + dex -t "${XDG_CONFIG_HOME:-${HOME}/.config}/autostart" -c $(command -v $screenReader) fi if command -v acpi &> /dev/null ; then batteryAlert=1 batteryAlert=$(yesno "Do you want low battery notifications?") fi brlapi=1 -brlapi=$(yesno "Do you want to use a braille display with Orca?") +brlapi=$(yesno "Do you want to use a braille display with $screenReader?") sounds=1 sounds=$(yesno "Do you want window event sounds?") # Play Login Sound @@ -623,8 +640,8 @@ bindsym Mod1+b exec --no-startup-id ${i3Path}/scripts/battery_status.sh, mode "d bindsym g exec ${i3Path}/scripts/game_controler.sh -s, mode "default" # Get a list of windows in the current workspace bindsym apostrophe exec --no-startup-id ${i3Path}/scripts/window_list.sh, mode "default" -# Restart orca -bindsym Shift+o exec $(command -v orca) --replace, mode "default" +# Restart $screenReader +bindsym Shift+o exec $screenReader --replace, mode "default" $(if [[ $usingSway -eq 0 ]]; then echo "# reload the configuration file" echo "bindsym Control+semicolon exec bash -c '$i3msg -t command reload && spd-say -P important -Cw "I38 Configuration reloaded."', mode "default"" @@ -693,7 +710,7 @@ else echo 'exec --no-startup-id x11bell play -nqV0 synth .1 sq norm -12' fi echo 'exec --no-startup-id clipster -d' - echo 'exec orca' + echo "exec $screenReader" echo "exec_always --no-startup-id ${i3Path}/scripts/desktop.sh" fi)