Skip to content

Commit 147bafb

Browse files
committed
Improve support for orca
1 parent 942044d commit 147bafb

2 files changed

Lines changed: 34 additions & 2 deletions

File tree

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/usr/bin/env sh
2+
3+
# if $1 is --enable start orca, if --disable stop orca
4+
5+
if [ "$1" = "--enable" ]; then
6+
7+
# Autostart in GNOME
8+
GSETTINGS_BACKEND=dconf gsettings set org.gnome.desktop.a11y.applications screen-reader-enabled true 2> /dev/null
9+
10+
# Autostart in XFCE
11+
xfconf-query -c xfce4-session -n -t bool -p /general/StartAssistiveTechnologies -s true 2> /dev/null
12+
13+
# Autostart in KDE
14+
kwriteconfig6 --file ~/.config/kaccessrc --group ScreenReader --key Enabled true 2> /dev/null
15+
16+
# Start orca
17+
exec orca
18+
19+
elif [ "$1" = "--disable" ];
20+
# Autostart in GNOME
21+
GSETTINGS_BACKEND=dconf gsettings set org.gnome.desktop.a11y.applications screen-reader-enabled false 2> /dev/null
22+
23+
# Autostart in XFCE
24+
xfconf-query -c xfce4-session -n -t bool -p /general/StartAssistiveTechnologies -s false 2> /dev/null
25+
26+
# Autostart in KDE
27+
kwriteconfig6 --file ~/.config/kaccessrc --group ScreenReader --key Enabled false 2> /dev/null
28+
29+
killall orca
30+
else
31+
echo $"Possible options: --enable or --disable"
32+
fi

bigbashview/usr/lib/bbv/ui/qt.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,10 +170,10 @@ def run_orca(self):
170170
process_check = os.system("pgrep orca > /dev/null 2>&1")
171171

172172
if process_check == 0: # If pgrep returns 0, the Orca process is running
173-
os.system("killall orca")
173+
os.system("bigbashview-orca --disable &")
174174
print("Orca process terminated.")
175175
else:
176-
os.system("orca &") # Start the Orca process in the background
176+
os.system("bigbashview-orca --enable &") # Start the Orca process in the background
177177
print("Orca process started.")
178178
except Exception as e:
179179
# Handle any exceptions that occur while managing the Orca process

0 commit comments

Comments
 (0)