2022-02-05 14:23:32 +00:00
|
|
|
#!/bin/bash
|
2023-07-15 20:21:10 +00:00
|
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
# Copyright (C) 2020-present redwolftech
|
|
|
|
# Copyright (C) 2020-present Fewtarius
|
2022-02-05 14:23:32 +00:00
|
|
|
|
2023-06-26 23:45:47 +00:00
|
|
|
. /etc/profile
|
2023-06-26 23:22:46 +00:00
|
|
|
jslisten set "mpv"
|
2023-07-15 20:21:10 +00:00
|
|
|
|
2023-07-29 00:44:10 +00:00
|
|
|
FBWIDTH="$(fbwidth)"
|
|
|
|
FBHEIGHT="$(fbheight)"
|
2023-07-15 20:21:10 +00:00
|
|
|
|
|
|
|
ASPECT=$(printf "%.2f" $(echo "(${FBWIDTH} / ${FBHEIGHT})" | bc -l))
|
|
|
|
|
|
|
|
case ${ASPECT} in
|
|
|
|
1.*)
|
|
|
|
RES="${FBWIDTH}x${FBHEIGHT}"
|
|
|
|
;;
|
|
|
|
0.*)
|
|
|
|
RES="${FBHEIGHT}x${FBWIDTH}"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
/usr/bin/mpv --fullscreen --geometry=${RES} --hwdec=auto --input-ipc-server=/tmp/mpvsocket "${1}"
|
2022-02-05 14:23:32 +00:00
|
|
|
exit 0
|