diff --git a/home/pi/autorun.sh b/home/pi/autorun.sh index fe46127..35ffa1c 100644 --- a/home/pi/autorun.sh +++ b/home/pi/autorun.sh @@ -18,4 +18,5 @@ sudo cp /home/pi/91-vita.rules /etc/udev/rules.d/ sudo cp /home/pi/92-dvita.rules /etc/udev/rules.d/ sudo udevadm trigger --action=change sudo xrandr -d :0 -s 1280x720 -r 60.00 -bash /home/pi/screensaveron.sh & \ No newline at end of file +bash /home/pi/screensaveron.sh & +/usr/lib/notification-daemon/notification-daemon & \ No newline at end of file diff --git a/home/pi/boot_txt_d.sh b/home/pi/boot_txt_d.sh index 3f0108a..6485b3a 100644 --- a/home/pi/boot_txt_d.sh +++ b/home/pi/boot_txt_d.sh @@ -1,2 +1,3 @@ #!/bin/sh -sudo mv /home/pi/Templates/Disable/cmdline.txt /boot/ \ No newline at end of file +sudo mv /home/pi/Templates/Disable/cmdline.txt /boot/ +notify-send -i /home/pi/Pictures/Icons/pspic.png "VitaDock Plus" "Boot messages disabled." \ No newline at end of file diff --git a/home/pi/boot_txt_e.sh b/home/pi/boot_txt_e.sh index c1a1c29..dae7ae6 100644 --- a/home/pi/boot_txt_e.sh +++ b/home/pi/boot_txt_e.sh @@ -1,2 +1,3 @@ #!/bin/sh sudo mv /boot/cmdline.txt /home/pi/Templates/Disable/ +notify-send -i /home/pi/Pictures/Icons/pspic.png "VitaDock Plus" "Boot messages enabled." diff --git a/home/pi/format.sh b/home/pi/format.sh index 6c37395..8fb0ce8 100644 --- a/home/pi/format.sh +++ b/home/pi/format.sh @@ -1 +1,2 @@ +notify-send -i /home/pi/Pictures/Icons/pspic.png "VitaDock Plus" "Resetting first boot message..." sudo rm 1.txt && reboot diff --git a/home/pi/fps.sh b/home/pi/fps.sh index f80f5e1..c3dbaf8 100644 --- a/home/pi/fps.sh +++ b/home/pi/fps.sh @@ -1,2 +1,3 @@ #!/bin/bash -printf "fps" | tee /home/pi/vitadock.conf \ No newline at end of file +printf "fps" | tee /home/pi/vitadock.conf +notify-send -i /home/pi/Pictures/Icons/pspic.png "VitaDock Plus" "Switched to SD @ 60FPS." \ No newline at end of file diff --git a/home/pi/lowlatency.sh b/home/pi/lowlatency.sh index 4295757..e44c557 100644 --- a/home/pi/lowlatency.sh +++ b/home/pi/lowlatency.sh @@ -1,4 +1,10 @@ #!/bin/bash -sudo systemctl set-default multi-user.target -sudo reboot now \ No newline at end of file +MODEL="/sys/firmware/devicetree/base/model" + +if grep -q "Raspberry Pi 4" "$MODEL"; then + notify-send -i /home/pi/Pictures/Icons/pspic.png "VitaDock Plus" "This feature is not supported on your Pi model." +else + sudo systemctl set-default multi-user.target + sudo reboot now +fi \ No newline at end of file diff --git a/home/pi/pc.sh b/home/pi/pc.sh index 5935cd3..7dfda65 100644 --- a/home/pi/pc.sh +++ b/home/pi/pc.sh @@ -1,2 +1,3 @@ #!/bin/bash -printf "pc" | tee /home/pi/vitadock.conf \ No newline at end of file +printf "pc" | tee /home/pi/vitadock.conf +notify-send -i /home/pi/Pictures/Icons/pspic.png "VitaDock Plus" "Switched to Plugin Controlled mode." \ No newline at end of file diff --git a/home/pi/res.sh b/home/pi/res.sh index 1416678..aafb2dc 100644 --- a/home/pi/res.sh +++ b/home/pi/res.sh @@ -1,2 +1,3 @@ #!/bin/bash -printf "res" | tee /home/pi/vitadock.conf \ No newline at end of file +printf "res" | tee /home/pi/vitadock.conf +notify-send -i /home/pi/Pictures/Icons/pspic.png "VitaDock Plus" "Switched to HD @ 30FPS." \ No newline at end of file diff --git a/home/pi/run.sh b/home/pi/run.sh index 75d69ea..0f37dd5 100644 --- a/home/pi/run.sh +++ b/home/pi/run.sh @@ -12,17 +12,17 @@ fi FILE="/home/pi/vitadock.conf" if grep -q fps "$FILE"; then v4l2-ctl -d /dev/video0 -v width=864,height=488,pixelformat=nv12 -p 60 - ffmpeg -s:v copy -r:v copy -c:v h264_mmal -c:v h264_omx -pix_fmt:v nv12 -pre:v ultrafast -color_primaries smpte170m -color_trc smpte170m -colorspace smpte170m -color_range 2 -nostdin -f v4l2 /dev/video0 | ffplay -fs -autoexit -alwaysontop -fast -sws_flags lanczos -framerate 60 -fflags nobuffer -flags low_delay -framedrop -avioflags direct -fflags discardcorrupt -probesize 32 -analyzeduration 0 -sync ext /dev/video0 + ffmpeg -s:v copy -r:v copy -c:v h264_mmal -c:v h264_omx -pix_fmt:v nv12 -pre:v ultrafast -color_primaries smpte170m -color_trc smpte170m -colorspace smpte170m -color_range tv -nostdin -f v4l2 /dev/video0 | ffplay -fs -autoexit -alwaysontop -fast -sws_flags lanczos -framerate 60 -fflags nobuffer -flags low_delay -framedrop -avioflags direct -fflags discardcorrupt -probesize 32 -analyzeduration 0 -sync ext /dev/video0 fi if grep -q res "$FILE"; then v4l2-ctl -d /dev/video0 -v width=960,height=544,pixelformat=nv12 -p 30 - ffmpeg -s:v copy -r:v copy -c:v h264_mmal -c:v h264_omx -pix_fmt:v nv12 -pre:v ultrafast -color_primaries smpte170m -color_trc smpte170m -colorspace smpte170m -color_range 2 -nostdin -f v4l2 /dev/video0 | ffplay -fs -autoexit -alwaysontop -fast -sws_flags lanczos -framerate 30 -fflags nobuffer -flags low_delay -framedrop -avioflags direct -fflags discardcorrupt -probesize 32 -analyzeduration 0 -sync ext /dev/video0 + ffmpeg -s:v copy -r:v copy -c:v h264_mmal -c:v h264_omx -pix_fmt:v nv12 -pre:v ultrafast -color_primaries smpte170m -color_trc smpte170m -colorspace smpte170m -color_range tv -nostdin -f v4l2 /dev/video0 | ffplay -fs -autoexit -alwaysontop -fast -sws_flags lanczos -framerate 30 -fflags nobuffer -flags low_delay -framedrop -avioflags direct -fflags discardcorrupt -probesize 32 -analyzeduration 0 -sync ext /dev/video0 fi if grep -q sharp "$FILE"; then v4l2-ctl -d /dev/video0 -v width=1280,height=720,pixelformat=nv12 -p 30 - ffmpeg -s:v copy -r:v copy -c:v h264_mmal -c:v h264_omx -pix_fmt:v nv12 -pre:v ultrafast -color_primaries smpte170m -color_trc smpte170m -colorspace smpte170m -color_range 2 -nostdin -f v4l2 /dev/video0 | ffplay -fs -autoexit -alwaysontop -fast -framerate 30 -fflags nobuffer -flags low_delay -framedrop -avioflags direct -fflags discardcorrupt -probesize 32 -analyzeduration 0 -sync ext /dev/video0 + ffmpeg -s:v copy -r:v copy -c:v h264_mmal -c:v h264_omx -pix_fmt:v nv12 -pre:v ultrafast -color_primaries smpte170m -color_trc smpte170m -colorspace smpte170m -color_range tv -nostdin -f v4l2 /dev/video0 | ffplay -fs -autoexit -alwaysontop -fast -framerate 30 -fflags nobuffer -flags low_delay -framedrop -avioflags direct -fflags discardcorrupt -probesize 32 -analyzeduration 0 -sync ext /dev/video0 fi if grep -q pc "$FILE"; then v4l2-ctl -d /dev/video0 -v pixelformat=nv12 - ffmpeg -s:v copy -r:v copy -c:v h264_mmal -c:v h264_omx -pix_fmt:v nv12 -pre:v ultrafast -color_primaries smpte170m -color_trc smpte170m -colorspace smpte170m -color_range 2 -nostdin -f v4l2 /dev/video0 | ffplay -fs -autoexit -alwaysontop -fast -sws_flags lanczos -fflags nobuffer -flags low_delay -framedrop -avioflags direct -fflags discardcorrupt -probesize 32 -analyzeduration 0 -sync ext /dev/video0 + ffmpeg -s:v copy -r:v copy -c:v h264_mmal -c:v h264_omx -pix_fmt:v nv12 -pre:v ultrafast -color_primaries smpte170m -color_trc smpte170m -colorspace smpte170m -color_range tv -nostdin -f v4l2 /dev/video0 | ffplay -fs -autoexit -alwaysontop -fast -sws_flags lanczos -fflags nobuffer -flags low_delay -framedrop -avioflags direct -fflags discardcorrupt -probesize 32 -analyzeduration 0 -sync ext /dev/video0 fi diff --git a/home/pi/sharpscale.sh b/home/pi/sharpscale.sh index 3c70746..f5fdbce 100644 --- a/home/pi/sharpscale.sh +++ b/home/pi/sharpscale.sh @@ -1,2 +1,3 @@ #!/bin/bash -printf "sharp" | tee /home/pi/vitadock.conf \ No newline at end of file +printf "sharp" | tee /home/pi/vitadock.conf +notify-send -i /home/pi/Pictures/Icons/pspic.png "VitaDock Plus" "Switched to Sharpscale mode." \ No newline at end of file diff --git a/home/pi/splash.png b/home/pi/splash.png new file mode 100644 index 0000000..562d0a9 Binary files /dev/null and b/home/pi/splash.png differ diff --git a/home/pi/switchbt.sh b/home/pi/switchbt.sh index 1e04542..ec4115f 100644 --- a/home/pi/switchbt.sh +++ b/home/pi/switchbt.sh @@ -1 +1,2 @@ +notify-send -i /home/pi/Pictures/Icons/pspic.png "VitaDock Plus" "Switching to Dongle Bluetooth..." sudo mv ./blacklist-bluetooth.conf /etc/modprobe.d/ && reboot \ No newline at end of file diff --git a/home/pi/switchbtti.sh b/home/pi/switchbtti.sh index 90bf51b..641c99d 100644 --- a/home/pi/switchbtti.sh +++ b/home/pi/switchbtti.sh @@ -1 +1,2 @@ +notify-send -i /home/pi/Pictures/Icons/pspic.png "VitaDock Plus" "Switching to Internal Bluetooth..." sudo mv /etc/modprobe.d/blacklist-bluetooth.conf ./ && reboot \ No newline at end of file