diff --git a/CMakeLists.txt b/CMakeLists.txt index c33ff56f5..283ed3acb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -401,7 +401,7 @@ add_subdirectory(src/pam-inhibit-autologin) if (DISABLE_DSS_SNIPE) # bin install(TARGETS dde-lock lightdm-deepin-greeter greeter-display-setting DESTINATION ${CMAKE_INSTALL_BINDIR}) - install(FILES files/deepin-greeter DESTINATION ${CMAKE_INSTALL_BINDIR}) + install(PROGRAMS files/deepin-greeter DESTINATION ${CMAKE_INSTALL_BINDIR}) # install x files file(GLOB SCRIPTS @@ -419,7 +419,7 @@ if (DISABLE_DSS_SNIPE) install(FILES files/wayland/lightdm-deepin-greeter-wayland.desktop DESTINATION ${CMAKE_INSTALL_DATADIR}/xgreeters/) else () # snipe install(TARGETS dde-lock lightdm-deepin-greeter DESTINATION ${CMAKE_INSTALL_BINDIR}) - install(FILES files/snipe/deepin-greeter DESTINATION ${CMAKE_INSTALL_BINDIR}) + install(PROGRAMS files/snipe/deepin-greeter DESTINATION ${CMAKE_INSTALL_BINDIR}) file(GLOB SCRIPTS files/snipe/scripts/*) install(PROGRAMS ${SCRIPTS} DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/deepin/greeters.d) @@ -490,4 +490,4 @@ endif () install(FILES files/deepin-debug-config/org.deepin.dde.session-shell.json DESTINATION ${CMAKE_INSTALL_DATADIR}/deepin-debug-config/deepin-debug-config.d) install(FILES files/deepin-log-config/org.deepin.dde.session-shell.json - DESTINATION ${CMAKE_INSTALL_DATADIR}/deepin-log-viewer/deepin-log.conf.d) \ No newline at end of file + DESTINATION ${CMAKE_INSTALL_DATADIR}/deepin-log-viewer/deepin-log.conf.d) diff --git a/configs/org.deepin.dde.lock.json b/configs/org.deepin.dde.lock.json index 370146add..2de40b78c 100755 --- a/configs/org.deepin.dde.lock.json +++ b/configs/org.deepin.dde.lock.json @@ -53,7 +53,7 @@ "visibility": "private" }, "enableShortcutForLock":{ - "value": ["Screenshot","Screen Recorder","Full screenshot"], + "value": ["Screenshot","Screen Recorder","Full screenshot","WLAN"], "serial": 0, "flags": [], "name": "EnableShortcutForLock", diff --git a/files/wayland/lightdm-deepin-greeter-wayland b/files/wayland/lightdm-deepin-greeter-wayland index 5656b3c59..e9493a940 100755 --- a/files/wayland/lightdm-deepin-greeter-wayland +++ b/files/wayland/lightdm-deepin-greeter-wayland @@ -15,4 +15,37 @@ if [ -x $display_daemon ]; then fi +#在满足条件下,设置tapToClick=true +#解析dbus信息输出 +dbus_values_get_strings(){ + local input="$1" + echo "$input" | grep -oP 'string \K".*?"' | tr -d '"' +} +dbus_values_get_bool(){ + local input="$1" + echo "$input" | grep -oP 'boolean \Ktrue|false' | awk '{print $1}' +} + +#判断并设置设备属性 +device_handle(){ + local input="$1" + local dbus_touchpad=$(dbus-send --session --print-reply --dest=org.kde.KWin $input org.freedesktop.DBus.Properties.Get string:"org.kde.KWin.InputDevice" string:"touchpad") + local touchpad=$(dbus_values_get_bool "$dbus_touchpad") + + if [ "$touchpad" = "true" ]; then + dbus-send --session --dest=org.kde.KWin "$input" org.freedesktop.DBus.Properties.Set string:"org.kde.KWin.InputDevice" string:"tapToClick" variant:boolean:true + fi +} + +#获取设备列表 +dbus_devices=$(dbus-send --session --print-reply --dest=org.kde.KWin /org/kde/KWin/InputDevice org.freedesktop.DBus.Properties.Get string:"org.kde.KWin.InputDeviceManager" string:"devicesSysNames") +devices_strings=$(dbus_values_get_strings "$dbus_devices") + +#遍历设备列表 +device_path="/org/kde/KWin/InputDevice/" +for dev in $devices_strings; do + path="${device_path}${dev}" + device_handle "$path" +done + /usr/share/dde-session-shell/greeters.d/launch-binary