jslisten: control volume and brightness virtually with btn and d-pad

This commit is contained in:
sydarn 2024-01-10 18:53:51 +01:00
parent a23e28636e
commit 41ef9361be
2 changed files with 25 additions and 1 deletions

View file

@ -22,3 +22,4 @@ BTN_QUIT_SELECT=${DEVICE_BTN_START}
BTN_KILL_HOTKEY=${DEVICE_BTN_TL}
BTN_KILL_SELECTA=${DEVICE_BTN_SELECT}
BTN_KILL_SELECTB=${DEVICE_BTN_START}
BTN_VOLBRIGHT_HOTKEY=${DEVICE_BTN_SELECT}

View file

@ -13,6 +13,28 @@ else
source /usr/config/jslisten_hotkeys
fi
read -d '\n' GLOBAL << EOF
[IncrVol]
program="/usr/bin/volume up"
button1="${BTN_VOLBRIGHT_HOTKEY}"
button2="${DEVICE_BTN_DPAD_RIGHT}"
[DecrVol]
program="/usr/bin/volume down"
button1="${BTN_VOLBRIGHT_HOTKEY}"
button2="${DEVICE_BTN_DPAD_LEFT}"
[IncrBright]
program="/usr/bin/brightness up"
button1="${BTN_VOLBRIGHT_HOTKEY}"
button2="${DEVICE_BTN_DPAD_UP}"
[DecrBright]
program="/usr/bin/brightness down"
button1="${BTN_VOLBRIGHT_HOTKEY}"
button2="${DEVICE_BTN_DPAD_DOWN}"
EOF
jslisten() {
JSLISTENCONF="/storage/.config/system/configs/jslisten.cfg"
if [ "$1" == "set" ]
@ -71,6 +93,7 @@ button1=${BTN_KILL_HOTKEY}
button2=${BTN_KILL_SELECTA}
button3=${BTN_KILL_SELECTB}
$(echo "$GLOBAL")
EOF
systemctl start jslisten
elif [ "$1" == "stop" ]