File tree Expand file tree Collapse file tree 2 files changed +74
-0
lines changed Expand file tree Collapse file tree 2 files changed +74
-0
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ title : " Vis tilgængelighedsfunktioner"
3
+ parent : " Desktop"
4
+ source : scripts/desktop/dconf_a11y.sh
5
+ parameters :
6
+ - name : " Aktivér?"
7
+ type : " boolean"
8
+ default : null
9
+ mandatory : false
10
+ compatibility :
11
+ - " 22.04"
12
+ - " BorgerPC"
13
+ ---
14
+
15
+ ## Beskrivelse
16
+ Viser en menu for at styre systemets tilgængelighedsfunktioner øverst på skærmen.
17
+
18
+ Dette script er allerede indbygget i image 5.0.0 og fremover.
19
+
20
+ Dette script er blevet testet og virker på Ubuntu 22.04.
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env sh
2
+
3
+ # SYNOPSIS
4
+ # dconf_policy_a11y.sh [ENFORCE]
5
+ #
6
+ # DESCRIPTION
7
+ # This script installs a policy that forces the Universal Access menu to be
8
+ # shown at all times.
9
+ #
10
+ # Use a boolean to decide whether to enforce or not. An unchecked box will
11
+ # remove the policy and a checked one will enforce it.
12
+ #
13
+ # IMPLEMENTATION
14
+ # copyright Copyright 2022, Magenta ApS
15
+ # license GNU General Public License
16
+
17
+ set -x
18
+
19
+ if get_os2borgerpc_config os2_product | grep --quiet kiosk; then
20
+ echo " Dette script er ikke designet til at blive anvendt på en kiosk-maskine."
21
+ exit 1
22
+ fi
23
+
24
+ # Change these three to set a different policy to another value
25
+ POLICY_PATH=" org/gnome/desktop/a11y"
26
+ POLICY=" always-show-universal-access-status"
27
+ POLICY_VALUE=" true"
28
+
29
+ POLICY_FILE=" /etc/dconf/db/os2borgerpc.d/00-accessibility"
30
+ POLICY_LOCK_FILE=" /etc/dconf/db/os2borgerpc.d/locks/00-accessibility"
31
+
32
+ ACTIVATE=$1
33
+
34
+ # Delete the previous lock file (its name has changed)
35
+ rm --force /etc/dconf/db/os2borgerpc.d/locks/accessibility
36
+
37
+ if [ " $ACTIVATE " = ' True' ]; then
38
+
39
+ cat > " $POLICY_FILE " << -END
40
+ [$POLICY_PATH ]
41
+ $POLICY =$POLICY_VALUE
42
+ END
43
+
44
+ # Tell the system that the values of the dconf keys we've just set can no
45
+ # longer be overridden by the user
46
+ cat > " $POLICY_LOCK_FILE " << -END
47
+ /$POLICY_PATH /$POLICY
48
+ END
49
+ else
50
+ rm -f " $POLICY_FILE " " $POLICY_LOCK_FILE "
51
+ fi
52
+
53
+ # Incorporate all of the text files we've just created into the system's dconf databases
54
+ dconf update
You can’t perform that action at this time.
0 commit comments