summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorinfirit <[email protected]>2014-11-03 16:07:44 +0100
committerinfirit <[email protected]>2014-11-03 16:07:44 +0100
commit84869fa92c31d41daf98731bf195ba618be4de30 (patch)
tree21a341af94467556f3be1812c47eb9357241615f /tools
parente9ae72f43c0c5d859685c29a926284edb5455d4e (diff)
downloadmate-desktop-84869fa92c31d41daf98731bf195ba618be4de30.tar.bz2
mate-desktop-84869fa92c31d41daf98731bf195ba618be4de30.tar.xz
We toggle in mate-settings-daemon now.
Diffstat (limited to 'tools')
-rw-r--r--tools/Makefile.am2
-rwxr-xr-xtools/mate-gsettings-toggle48
2 files changed, 1 insertions, 49 deletions
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 2646289..7e53cf0 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -1,5 +1,5 @@
bin_PROGRAMS = mate-color-select
-bin_SCRIPTS = mate-gsettings-toggle
+bin_SCRIPTS =
AM_CPPFLAGS = \
-I$(top_srcdir)
diff --git a/tools/mate-gsettings-toggle b/tools/mate-gsettings-toggle
deleted file mode 100755
index f650073..0000000
--- a/tools/mate-gsettings-toggle
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/usr/bin/env sh
-
-SCHEMA="org.mate.applications-at"
-KEYS="screen-keyboard-enabled screen-magnifier-enabled screen-reader-enabled"
-GSETTINGS="$(which gsettings 2> /dev/null)"
-
-if [ "${?}" != "0" ]; then
- printf "gsettings command not found....\n"
- printf "please install gsettings which is part of glib\n"
- exit 1
-fi
-
-found="0"
-for key in ${KEYS}; do
- if [ "${key}" = "${1}" ]; then
- found="1"
- fi
-done
-
-if [ "${found}" = "0" ]; then
- printf "Invalid key \"${1}\", should be one of:\n"
- printf "${KEYS}\n"
- exit 1
-fi
-
-curval=$(eval "${GSETTINGS} get ${SCHEMA} ${1}")
-
-case ${curval} in
-"false")
- $(eval "${GSETTINGS} set ${SCHEMA} ${1} 'true'")
- if [ "${?}" = "0" ]; then
- printf "Toggle true\n"
- exit 0
- else
- printf "Something went wrong: got exit status ${?}\n"
- exit 1
- fi;;
-"true")
- $(eval "${GSETTINGS} set ${SCHEMA} ${1} 'false'")
- if [ "${?}" = "0" ]; then
- printf "Toggle false\n"
- exit 0
- else
- printf "Something went wrong: got exit status ${?}\n"
- exit 1
- fi;;
-esac
-