OSDN Git Service

[update] : Added tap command
authorhayao <hayao@fascode.net>
Thu, 11 Feb 2021 06:53:41 +0000 (15:53 +0900)
committerhayao <hayao@fascode.net>
Thu, 11 Feb 2021 06:53:41 +0000 (15:53 +0900)
dmc

diff --git a/dmc b/dmc
index e6da41b..a6abbfa 100755 (executable)
--- a/dmc
+++ b/dmc
@@ -36,6 +36,7 @@ script_usage(){
     echo "    cursor                            Run cursor selection wizard"
     echo "    sound [true or false]             Toggle the sound when an event occurs"
     echo "    logo [image]                      Specify the logo of the login screen"
+    echo "    tap [true or false]               Toggle whether to recognize the tap as a click"
     echo
     echo " Webkit2 command:"
     echo "    theme                             Run theme selection wizard"
@@ -561,6 +562,15 @@ command_gdm_sound(){
     gdm_set_config "org/gnome/desktop/sound" "event-sounds" "${1}"
 }
 
+command_gdm_tap(){
+    if ! check_bool "${1-""}"; then
+        msg_error "Please specify true or false"
+        script_usage
+        exit 1
+    fi
+    gdm_set_config "org/gnome/desktop/peripherals/touchpad" "tap-to-click" "${1}"
+}
+
 #== Webkit2用の汎用関数 ==#
 webkit2_init_configs(){
     if [[ ! -f "${GREETER_CONFIG["lightdm-webkit2-greeter"]}" ]]; then
@@ -840,6 +850,11 @@ case "${DISPLAY_MANAGER}" in
                 gdm_init_configs
                 command_gdm_logo ${COMMAND_ARGS}
                 ;;
+            "tap")
+                check_root
+                gdm_init_configs
+                command_gdm_tap ${COMMAND_ARGS}
+                ;;
             *)
                 msg_error "Undefined commnad(${COMMAND})"
                 ;;