Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wp-ulike domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/illphate/public_html/wp-includes/functions.php on line 6131

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the astra domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/illphate/public_html/wp-includes/functions.php on line 6131

Notice: Trying to access array offset on value of type bool in /home/illphate/public_html/wp-content/plugins/user-submitted-posts/library/core-functions.php on line 84

Notice: Trying to access array offset on value of type bool in /home/illphate/public_html/wp-content/plugins/user-submitted-posts/library/core-functions.php on line 85

Notice: Trying to access array offset on value of type bool in /home/illphate/public_html/wp-content/plugins/user-submitted-posts/library/core-functions.php on line 86

Notice: Trying to access array offset on value of type bool in /home/illphate/public_html/wp-content/plugins/user-submitted-posts/library/core-functions.php on line 87

Notice: Trying to access array offset on value of type bool in /home/illphate/public_html/wp-content/plugins/user-submitted-posts/library/core-functions.php on line 88

Deprecated: Function WP_Dependencies->add_data() was called with an argument that is deprecated since version 6.9.0! IE conditional comments are ignored by all supported browsers. in /home/illphate/public_html/wp-includes/functions.php on line 6131
Fadcam Volume Button Script | Illphated Dot COM
Notice: Trying to access array offset on value of type bool in /home/illphate/public_html/wp-content/plugins/user-submitted-posts/library/core-functions.php on line 84

Notice: Trying to access array offset on value of type bool in /home/illphate/public_html/wp-content/plugins/user-submitted-posts/library/core-functions.php on line 85

Notice: Trying to access array offset on value of type bool in /home/illphate/public_html/wp-content/plugins/user-submitted-posts/library/core-functions.php on line 86

Notice: Trying to access array offset on value of type bool in /home/illphate/public_html/wp-content/plugins/user-submitted-posts/library/core-functions.php on line 87

Notice: Trying to access array offset on value of type bool in /home/illphate/public_html/wp-content/plugins/user-submitted-posts/library/core-functions.php on line 88

ILLPHATED dot COM

 
 

Fadcam volume button script


Notice: Trying to access array offset on value of type bool in /home/illphate/public_html/wp-content/plugins/user-submitted-posts/library/core-functions.php on line 84

Notice: Trying to access array offset on value of type bool in /home/illphate/public_html/wp-content/plugins/user-submitted-posts/library/core-functions.php on line 85

Notice: Trying to access array offset on value of type bool in /home/illphate/public_html/wp-content/plugins/user-submitted-posts/library/core-functions.php on line 86

Notice: Trying to access array offset on value of type bool in /home/illphate/public_html/wp-content/plugins/user-submitted-posts/library/core-functions.php on line 87

Notice: Trying to access array offset on value of type bool in /home/illphate/public_html/wp-content/plugins/user-submitted-posts/library/core-functions.php on line 88
NORDVPN_ILLPHATED
SHARE THIS NOW!

Illphated

keysh

 

 

set -eu

NORDVPN_ILLPHATED

# Time-out in seconds for single volume press
TO=0.150
# Time-out in seconds for holding down volume button
TO_HOLD=0.100
# Duration of vibration in ms
DUR_S=100
# How long to keep your phone awake when using volume buttons in ms
WL_MAX=1500

# Track the toggle state
STATE=0 # 0 = Start Activity, 1 = Stop Activity

on_both_pressed() {
if [ “$STATE” -eq 0 ]; then
# Launch RecordingStartActivity
cmd intent -t activity -p com.fadcam/.RecordingStartActivity
STATE=1
else
# Launch RecordingStopActivity
cmd intent -t activity -p com.fadcam/.RecordingStopActivity
STATE=0
fi
cmd vibrate $DUR_S
}

on_up() {
read -t $TO key && {
[ “$key” = “$PRESS_DOWN” ] && {
on_both_pressed
return
}
cmd volume current up
return
}
while true; do
read -t $TO_HOLD key || {
cmd volume current up
continue
}
return
done
}

on_down() {
read -t $TO key && {
[ “$key” = “$PRESS_UP” ] && {
on_both_pressed
return
}
cmd volume current down
return
}
while true; do
read -t $TO_HOLD key || {
cmd volume current down
continue
}
return
done
}

loop() {
while read key; do
cmd wakelock acquire $WL_MAX
case “$key” in
“$PRESS_UP” )
on_up
;;
“$PRESS_DOWN” )
on_down
;;
esac
cmd wakelock release
done
}

encode_list() {
ENCODED=””; for arg in “$@”; do
ENCODED=”${ENCODED}${#arg}:${arg}”
done
ENCODED=”${#ENCODED}:$ENCODED”
}
cmd() {
encode_list “$@”;
echo “$ENCODED”
}

loop

EmailURL

7 thoughts on “Fadcam volume button script”

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top

Notice: ob_end_flush(): failed to send buffer of zlib output compression (0) in /home/illphate/public_html/wp-includes/functions.php on line 5481