Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

33 when desktop gui opened problem #45

Merged
merged 5 commits into from
Jan 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions images_slide_show.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,31 @@ display() {

kill_display_processes

# Find an unused TTY
unused_tty=""
for tty in {1..7}; do
if ! who | grep -q "tty$tty"; then
unused_tty=$tty
break
fi
done

if [ -z "$unused_tty" ]; then
echo "No unused TTY found!"
return 1
else
echo "Using TTY $unused_tty"
fi

if [[ ${#image_files[@]} -gt 0 && ${#video_files[@]} -gt 0 ]]; then
while true; do
sudo fbi -a -r 3 -t $DISPLAYTIME --blend $BLENDTIME -T 1 --noverbose -1 "${image_files[@]}"
sudo fbi -a -r 3 -t $DISPLAYTIME --blend $BLENDTIME -vt $unused_tty --noverbose -1 "${image_files[@]}"
sleep $((IMAGE_FILES_COUNT * DISPLAYTIME))
sudo pkill -x "fbi"
cvlc "$video_files"
done
elif [ -n "$image_files" ]; then
sudo fbi -a -r 5 -t $DISPLAYTIME --blend $BLENDTIME -T 1 --noverbose "${image_files[@]}"
sudo fbi -a -r 5 -t $DISPLAYTIME --blend $BLENDTIME -vt $unused_tty --noverbose "${image_files[@]}"
elif [ -n "$video_files" ]; then
#clear
cvlc --loop "$video_files"
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ google-auth-oauthlib
google-auth-httplib2
google-api-python-client
Pillow
pyqt5
Pylint
Pylint
pyqt5
Loading