#!/bin/bash

## Copyright (C) 2021 - 2023 ENCRYPTED SUPPORT LP <adrelanos@whonix.org>
## See the file COPYING for copying conditions.

set -x

#### meta start
#### project Whonix and Kicksecure
#### category usability
#### description
## `easo` stands for `easyorca`.
## A short name to avoid y vs z on English vs German and other keyboard
## layouts. Cannot be called `easyorca` due to technical reasons.
## https://gitlab.gnome.org/GNOME/orca/-/issues/189
##
## Simple wrapper that runs the following commands:
##
## - `amixer set Master 50%`
## - `orca --replace & disown`
## - `dsudo easyorca-root`.
##
## Works only as long as the default password has not been changed because it
## is using `dsudo`.
##
## `dsudo`, see:
## https://www.whonix.org/wiki/Root#dsudo_-_default_password_sudo
##
## After default password was changed, users would have to use
## `sudo easyorca-root` instead.
#### meta end

## TODO: amixer is no longer installed by default. Is this still required with PipeWire?
#amixer set Master 50%

orca --replace & disown

true "INFO: waiting for 5 seconds to make sure orca has started."

sleep 5

dsudo easyorca-root
