Merge pull request #314 from fewtarius/dev
Move jslisten config to the jslisten package, and add a userspace configuration file.
This commit is contained in:
commit
fd05e1fd6b
3 changed files with 48 additions and 14 deletions
25
packages/tools/sysutils/jslisten/config/jslisten_hotkeys
Normal file
25
packages/tools/sysutils/jslisten/config/jslisten_hotkeys
Normal file
|
@ -0,0 +1,25 @@
|
|||
###
|
||||
### JSListen hotkey preferences
|
||||
###
|
||||
|
||||
###
|
||||
### This configuration file provides key values to jslisten,
|
||||
### copy to /storage/roms/.config and modify as desired.
|
||||
###
|
||||
### For a list of available buttons, cat /etc/profile.d/01-deviceconfig
|
||||
###
|
||||
|
||||
BTN_PAUSE=${DEVICE_BTN_START}
|
||||
BTN_QUIT_HOTKEY=${DEVICE_BTN_SELECT}
|
||||
BTN_QUIT_SELECT=${DEVICE_BTN_START}
|
||||
BTN_SKIP5S=${DEVICE_BTN_TR}
|
||||
BTN_BACK5S=${DEVICE_BTN_TL}
|
||||
BTN_SKIP60S=${DEVICE_BTN_TR2}
|
||||
BTN_BACK60S=${DEVICE_BTN_TL2}
|
||||
BTN_KILL_HOTKEY=${DEVICE_BTN_TL}
|
||||
BTN_KILL_SELECTA=${DEVICE_BTN_SELECT}
|
||||
BTN_KILL_SELECTB=${DEVICE_BTN_START}
|
||||
BTN_BRIGHTNESS_UP_HOTKEY=${DEVICE_BTN_TL}
|
||||
BTN_BRIGHTNESS_UP_SELECT=${DEVICE_BTN_DPAD_UP}
|
||||
BTN_BRIGHTNESS_DOWN_HOTKEY=${DEVICE_BTN_TL}
|
||||
BTN_BRIGHTNESS_DOWN_SELECT=${DEVICE_BTN_DPAD_DOWN}
|
|
@ -21,4 +21,6 @@ make_target() {
|
|||
makeinstall_target() {
|
||||
mkdir -p ${INSTALL}/usr/bin
|
||||
cp bin/jslisten ${INSTALL}/usr/bin
|
||||
mkdir -p ${INSTALL}/usr/config
|
||||
cp ${PKG_DIR}/config/jslisten_hotkeys ${INSTALL}/usr/config
|
||||
}
|
||||
|
|
|
@ -6,6 +6,13 @@
|
|||
|
||||
export PATH="$PATH:/usr/local/bin:/usr/bin:/storage/bin"
|
||||
|
||||
if [ -e "/storage/roms/jslisten_hotkeys" ]
|
||||
then
|
||||
source /storage/roms/jslisten_hotkeys
|
||||
else
|
||||
source /usr/config/jslisten_hotkeys
|
||||
fi
|
||||
|
||||
jslisten() {
|
||||
JSLISTENCONF="/storage/.config/system/configs/jslisten.cfg"
|
||||
if [ "$1" == "set" ]
|
||||
|
@ -19,28 +26,28 @@ jslisten() {
|
|||
cat <<EOF >${JSLISTENCONF}
|
||||
[Pause]
|
||||
program="/usr/bin/manage_mpv.sh pause"
|
||||
button1=${DEVICE_BTN_START}
|
||||
button1=${BTN_PAUSE}
|
||||
|
||||
[Exit]
|
||||
program="/usr/bin/manage_mpv.sh quit"
|
||||
button1=${DEVICE_BTN_SELECT}
|
||||
button2=${DEVICE_BTN_START}
|
||||
button1=${BTN_QUIT_HOTKEY}
|
||||
button2=${BTN_QUIT_SELECT}
|
||||
|
||||
[Skip5s]
|
||||
program="/usr/bin/manage_mpv.sh skip5s"
|
||||
button1=${DEVICE_BTN_TR}
|
||||
button1=${BTN_SKIP5S}
|
||||
|
||||
[Back5s]
|
||||
program="/usr/bin/manage_mpv.sh back5s"
|
||||
button1=${DEVICE_BTN_TL}
|
||||
button1=${BTN_BACK5S}
|
||||
|
||||
[Skip60s]
|
||||
program="/usr/bin/manage_mpv.sh skip60s"
|
||||
button1=${DEVICE_BTN_TR2}
|
||||
button1=${BTN_SKIP60S}
|
||||
|
||||
[Back60s]
|
||||
program="/usr/bin/manage_mpv.sh back60s"
|
||||
button1=${DEVICE_BTN_TL2}
|
||||
button1=${BTN_BACK60S}
|
||||
|
||||
EOF
|
||||
fi
|
||||
|
@ -48,19 +55,19 @@ EOF
|
|||
cat <<EOF >>${JSLISTENCONF}
|
||||
[KillAll]
|
||||
program="/usr/bin/killall ${2}"
|
||||
button1=${DEVICE_BTN_TL}
|
||||
button2=${DEVICE_BTN_SELECT}
|
||||
button3=${DEVICE_BTN_START}
|
||||
button1=${BTN_KILL_HOTKEY}
|
||||
button2=${BTN_KILL_SELECTA}
|
||||
button3=${BTN_KILL_SELECTB}
|
||||
|
||||
[BrightnessUp]
|
||||
program="/usr/bin/brightness up"
|
||||
button1=${DEVICE_BTN_TL}
|
||||
button2=${DEVICE_BTN_DPAD_UP}
|
||||
button1=${BTN_BRIGHTNESS_UP_HOTKEY}
|
||||
button2=${BTN_BRIGHTNESS_UP_SELECT}
|
||||
|
||||
[BrightnessDown]
|
||||
program="/usr/bin/brightness down"
|
||||
button1=${DEVICE_BTN_TL}
|
||||
button2=${DEVICE_BTN_DPAD_DOWN}
|
||||
button1=${BTN_BRIGHTNESS_DOWN_HOTKEY}
|
||||
button2=${BTN_BRIGHTNESS_DOWN_SELECT}
|
||||
|
||||
EOF
|
||||
systemctl start jslisten
|
Loading…
Reference in a new issue