summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--man/Makefile.am2
-rw-r--r--man/mate-gsettings-toggle.142
-rw-r--r--tools/Makefile.am2
-rwxr-xr-xtools/mate-gsettings-toggle48
4 files changed, 2 insertions, 92 deletions
diff --git a/man/Makefile.am b/man/Makefile.am
index bf674c5..89acd1e 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -1,4 +1,4 @@
-man_MANS = mate-gsettings-toggle.1
+man_MANS =
if MATE_ABOUT_ENABLED
man_MANS += mate-about.1
diff --git a/man/mate-gsettings-toggle.1 b/man/mate-gsettings-toggle.1
deleted file mode 100644
index e8a5089..0000000
--- a/man/mate-gsettings-toggle.1
+++ /dev/null
@@ -1,42 +0,0 @@
-.\" Copyright (C) Sander Sweers 2014 <[email protected]>
-.\"
-.\" This is free software; you may redistribute it and/or modify
-.\" it under the terms of the GNU General Public License as
-.\" published by the Free Software Foundation; either version 2,
-.\" or (at your option) any later version.
-.\"
-.\" This is distributed in the hope that it will be useful, but
-.\" WITHOUT ANY WARRANTY; without even the implied warranty of
-.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-.\" GNU General Public License for more details.
-.\"
-.\"You should have received a copy of the GNU General Public License along
-.\"with this program; if not, write to the Free Software Foundation, Inc.,
-.\"51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-.TH mate-gsettings-toggle 1 "2014\-01\-17" "MATE"
-.SH NAME
-.B mate-gsettings-toggle
-\- wrapper for MATE gsettings keys
-.SH SYNOPSIS
-.B mate-gsettings-toggle
-.RI KEY
-.SH DESCRIPTION
-.B mate-gsettings-toggle
-is a small wrapper script around the gsettings command.
-.P
-Gsettings does not have toggle option which mateconftool-2 and gconftool-2 did.
-mate-gsettings-toggle is a small wrapper around the gsettings command which adds
-toggle functionality.
-.SH OPTIONS
-.B mate-gsettings-toggle
-takes a limited set of gsettings keys that are in the org.mate.applications-at
-SCHEMA. The keys can be one of: screen-keyboard-enabled screen-magnifier-enabled
-screen-reader-enabled.
-.SH AUTHORS
-.B mate-gsettings-toggle
-is written by Sander Sweers <[email protected]>
-.P
-This manual was written by Sander Sweers <[email protected]> for the MATE desktop
-project.
-.SH SEE ALSO
-.BR "gsettings" (1)
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
-