42 lines
1.2 KiB
Bash
Executable File
42 lines
1.2 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# Script para ejecutar un slideshow con eom
|
|
# de una carpeta al azar dentro de un directorio
|
|
if [[ $1 == 1 ]]
|
|
then
|
|
FOLDER=/home/sergio/zx/scr_packs
|
|
SUBFOLDERS=("${FOLDER}"/*/)
|
|
NUM=$(( RANDOM % ${#SUBFOLDERS[@]}))
|
|
#eom -f -s "${SUBFOLDERS[$NUM]}"
|
|
feh "${SUBFOLDERS[$NUM]}" -z -D 60 -F -Y
|
|
fi
|
|
|
|
|
|
# Script para montar un tunel ssh hasta una camara
|
|
# y mostrar el stream de video con el vlc
|
|
# Añadir al fichero ~/.ssh/config la siguiente información
|
|
# Host cam
|
|
# HostName sustancia.synology.me
|
|
# User sergio
|
|
# Port 4545
|
|
# LocalForward 127.0.0.1:3501 192.168.1.150:554
|
|
if [[ $1 == 2 ]]
|
|
then
|
|
sleep 20
|
|
ssh -f -o ExitOnForwardFailure=yes cam sleep 30
|
|
vlc -f rtsp://admin:ImouCr1st1n4@127.0.0.1:3501
|
|
fi
|
|
|
|
|
|
# Script para mostrar un video al azar de una carpeta
|
|
# en modo pantalla completa y en bucle
|
|
if [[ $1 == 3 ]]
|
|
then
|
|
FOLDER=/home/sergio/Vídeos/zx_spectrum
|
|
VIDEOS=("${FOLDER}"/*)
|
|
NUM=$(( RANDOM % ${#VIDEOS[@]}))
|
|
ls -d $FOLDER > /tmp/auto_raspi.m3u
|
|
#vlc "${VIDEOS[$NUM]}" --fullscreen --loop --no-osd --mouse-hide-timeout=1 --no-mouse-events
|
|
vlc /tmp/auto_raspi.m3u --random --fullscreen --loop --no-osd --mouse-hide-timeout=1 --no-mouse-events
|
|
fi
|