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