diff --git a/configs/default_hooks/sxmo_hook_notification.sh b/configs/default_hooks/sxmo_hook_notification.sh index 910bfc1..d8ca113 100755 --- a/configs/default_hooks/sxmo_hook_notification.sh +++ b/configs/default_hooks/sxmo_hook_notification.sh @@ -8,9 +8,9 @@ #if [ ! -f "$XDG_CONFIG_HOME"/sxmo/.novibrate ]; then # VIBS=5 # VIBI=0 -# while [ $VIBI -lt $VIBS ]; do -# sxmo_vibrate 400 & +# while [ "$VIBI" -lt "$VIBS" ]; do +# sxmo_vibrate 400 "${SXMO_VIBRATE_STRENGTH:-1}" & # sleep 0.5 -# VIBI=$(echo $VIBI+1 | bc) +# VIBI="$(echo "$VIBI+1" | bc)" # done #fi diff --git a/configs/default_hooks/sxmo_hook_ring.sh b/configs/default_hooks/sxmo_hook_ring.sh index 1677f33..14bfd35 100755 --- a/configs/default_hooks/sxmo_hook_ring.sh +++ b/configs/default_hooks/sxmo_hook_ring.sh @@ -14,7 +14,7 @@ if sxmo_modemcall.sh list_active_calls \ | grep -v ringing-in \ | grep -q .; then - sxmo_vibrate 1500 + sxmo_vibrate 1500 "${SXMO_VIBRATE_STRENGTH:-1}" exit fi @@ -39,7 +39,7 @@ if [ ! -f "$XDG_CONFIG_HOME"/sxmo/.noring ] && [ ! -f "$XDG_CONFIG_HOME"/sxmo/.n echo "$MPVID" > "$XDG_RUNTIME_DIR/sxmo.ring.pid" # vibrate while mpv is running while kill -0 $MPVID; do - sxmo_vibrate 1500 + sxmo_vibrate 1500 "${SXMO_VIBRATE_STRENGTH:-1}" sleep 0.5 done @@ -59,7 +59,7 @@ elif [ ! -f "$XDG_CONFIG_HOME"/sxmo/.noring ] && [ -f "$XDG_CONFIG_HOME"/sxmo/.n elif [ ! -f "$XDG_CONFIG_HOME"/sxmo/.novibrate ] && [ -f "$XDG_CONFIG_HOME"/sxmo/.noring ]; then smxo_log "VIBRATE ONLY" for _ in $(seq 5); do - sxmo_vibrate 1500 + sxmo_vibrate 1500 "${SXMO_VIBRATE_STRENGTH:-1}" sleep 0.5 done & echo "$!" > "$XDG_RUNTIME_DIR/sxmo.ring.pid" diff --git a/configs/default_hooks/sxmo_hook_sms.sh b/configs/default_hooks/sxmo_hook_sms.sh index 1a50e7c..63417e3 100755 --- a/configs/default_hooks/sxmo_hook_sms.sh +++ b/configs/default_hooks/sxmo_hook_sms.sh @@ -24,7 +24,7 @@ if ! sxmo_modemcall.sh list_active_calls | grep -q active; then fi if [ ! -f "$XDG_CONFIG_HOME"/sxmo/.novibrate ]; then - sxmo_vibrate 500 + sxmo_vibrate 500 "${SXMO_VIBRATE_STRENGTH:-1}" fi fi diff --git a/scripts/appscripts/sxmo_timer.sh b/scripts/appscripts/sxmo_timer.sh index 9722b3d..8088c1a 100755 --- a/scripts/appscripts/sxmo_timer.sh +++ b/scripts/appscripts/sxmo_timer.sh @@ -22,7 +22,7 @@ timerrun() { while : ; do notify-send "Done with $*"; - sxmo_vibrate 1000 + sxmo_vibrate 1000 "${SXMO_VIBRATE_STRENGTH:-1}" sleep 0.5 done } diff --git a/scripts/deviceprofiles/README.md b/scripts/deviceprofiles/README.md index 810063a..116fdc7 100644 --- a/scripts/deviceprofiles/README.md +++ b/scripts/deviceprofiles/README.md @@ -96,3 +96,4 @@ SXMO_RTW_SCAN_INTERVAL | Does the wifi kernel module offer a rtw_scan_interval_t SXMO_SYS_FILES | String of files for sxmo_setpermissions.sh to make +rw (see sxmo_setpermissions.sh) SXMO_VIBRATE_DEV | Path to vibration device (see sxmo_vibrate.c and clickclack.c) [default: /dev/input/by-path/platform-vibrator-event] +SXMO_VIBRATE_STRENGTH | Strength parameter to pass to sxmo_vibrate [default: 1] diff --git a/scripts/deviceprofiles/sxmo_deviceprofile_oneplus,enchilada.sh b/scripts/deviceprofiles/sxmo_deviceprofile_oneplus,enchilada.sh index 538b685..f41fd5d 100755 --- a/scripts/deviceprofiles/sxmo_deviceprofile_oneplus,enchilada.sh +++ b/scripts/deviceprofiles/sxmo_deviceprofile_oneplus,enchilada.sh @@ -7,4 +7,5 @@ export SXMO_POWER_BUTTON="0:0:pm8941_pwrkey" export SXMO_MONITOR="DSI-1" export SXMO_DISABLE_LEDS="1" export SXMO_VIBRATE_DEV="/dev/input/by-path/platform-c440000.spmi-platform-c440000.spmi:pmic@3:haptics@c000-event" +export SXMO_VIBRATE_STRENGTH="5000" export SXMO_SWAY_SCALE="3" diff --git a/scripts/deviceprofiles/sxmo_deviceprofile_oneplus,fajita.sh b/scripts/deviceprofiles/sxmo_deviceprofile_oneplus,fajita.sh index 879b058..65f5cb9 100755 --- a/scripts/deviceprofiles/sxmo_deviceprofile_oneplus,fajita.sh +++ b/scripts/deviceprofiles/sxmo_deviceprofile_oneplus,fajita.sh @@ -7,4 +7,5 @@ export SXMO_VOLUME_BUTTON="1:1:Volume_keys" export SXMO_POWER_BUTTON="0:0:pm8941_pwrkey" export SXMO_MONITOR="DSI-1" export SXMO_VIBRATE_DEV="/dev/input/by-path/platform-c440000.spmi-platform-c440000.spmi:pmic@3:haptics@c000-event" +export SXMO_VIBRATE_STRENGTH="5000" export SXMO_SWAY_SCALE="3" diff --git a/scripts/modem/sxmo_modem.sh b/scripts/modem/sxmo_modem.sh index d2cec5c..af5b494 100755 --- a/scripts/modem/sxmo_modem.sh +++ b/scripts/modem/sxmo_modem.sh @@ -95,7 +95,7 @@ checkforfinishedcalls() { # If it was the last call if ! sxmo_modemcall.sh list_active_calls | grep -q .; then # Cleanup - sxmo_vibrate 1000 & + sxmo_vibrate 1000 "${SXMO_VIBRATE_STRENGTH:-1}" & sxmo_daemons.sh stop incall_menu sxmo_daemons.sh stop proximity_lock