mirror of
https://github.com/FunKey-Project/FunKey-OS.git
synced 2025-12-12 23:58:50 +01:00
Corrected buggy quick_action scripts
This commit is contained in:
parent
c1f793be46
commit
e391eeaeed
@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
STEP_BRIGHTNESS=10
|
||||
NOTIF_TIME_ON=2
|
||||
NOTIF_DURATION=2
|
||||
|
||||
# Get current value
|
||||
current_brightness=$(brightness_get)
|
||||
@ -18,5 +18,5 @@ if [ ${new_brightness} -ne ${current_brightness} ]; then
|
||||
fi
|
||||
|
||||
# Notif
|
||||
notif_set ${NOTIF_TIME_ON} " BRIGHTNESS: ${new_brightness}%%"
|
||||
notif_set ${NOTIF_DURATION} " BRIGHTNESS: ${new_brightness}%%"
|
||||
exit 0
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
STEP_BRIGHTNESS=10
|
||||
NOTIF_TIME_ON=2
|
||||
NOTIF_DURATION=2
|
||||
|
||||
# Get current value
|
||||
current_brightness=$(brightness_get)
|
||||
|
||||
# Compute new brightness value
|
||||
new_brightness=${current_brightness}+${STEP_BRIGHTNESS}
|
||||
let new_brightness=${current_brightness}+${STEP_BRIGHTNESS}
|
||||
if [ ${new_brightness} -gt 100 ]; then
|
||||
new_brightness=100
|
||||
fi
|
||||
@ -18,5 +18,5 @@ if [ ${new_brightness} -ne ${current_brightness} ]; then
|
||||
fi
|
||||
|
||||
# Notif
|
||||
notif_set ${NOTIF_TIME_ON} " BRIGHTNESS: ${new_brightness}%%"
|
||||
notif_set ${NOTIF_DURATION} " BRIGHTNESS: ${new_brightness}%%"
|
||||
exit 0
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
STEP_VOLUME=10
|
||||
NOTIF_TIME_ON=2
|
||||
NOTIF_DURATION=2
|
||||
|
||||
# Get current value
|
||||
current_volume=$(volume_get)
|
||||
@ -9,7 +9,7 @@ current_volume=$(volume_get)
|
||||
# Compute new volume value
|
||||
new_volume=0
|
||||
if [ ${current_volume} -gt ${STEP_VOLUME} ]; then
|
||||
new_volume=${current_volume}-${STEP_VOLUME}
|
||||
let new_volume=${current_volume}-${STEP_VOLUME}
|
||||
fi
|
||||
|
||||
# Change volume
|
||||
@ -18,5 +18,5 @@ if [ ${new_volume} -ne ${current_volume} ]; then
|
||||
fi
|
||||
|
||||
# Notif
|
||||
notif_set ${NOTIF_TIME_ON} " VOLUME: ${new_volume}%%"
|
||||
notif_set ${NOTIF_DURATION} " VOLUME: ${new_volume}%%"
|
||||
exit 0
|
||||
|
||||
@ -1,22 +1,22 @@
|
||||
#!/bin/sh
|
||||
|
||||
STEP_VOLUME=10
|
||||
NOTIF_TIME_ON=2
|
||||
NOTIF_DURATION=2
|
||||
|
||||
# Get current value
|
||||
current_volume=$(volume_get)
|
||||
|
||||
# Compute new volume value
|
||||
new_volume=${current_volume}+${STEP_VOLUME}
|
||||
let new_volume=${current_volume}+${STEP_VOLUME}
|
||||
if [ ${new_volume} -gt 100 ]; then
|
||||
new_volume=100
|
||||
fi
|
||||
|
||||
# Change volume
|
||||
if [ ${new_volume} -ne {current_$volume} ]; then
|
||||
if [ ${new_volume} -ne ${current_volume} ]; then
|
||||
volume_set ${new_volume}
|
||||
fi
|
||||
|
||||
# Notif
|
||||
notif_set ${NOTIF_TIME_ON} " VOLUME: ${new_volume}%%"
|
||||
notif_set ${NOTIF_DURATION} " VOLUME: ${new_volume}%%"
|
||||
exit 0
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user