Move slideshow setup info from notes to docs

This commit is contained in:
KemoNine 2020-07-31 23:56:17 +00:00
parent 5813c9667a
commit d28134d920
3 changed files with 47 additions and 33 deletions

View File

@ -10,3 +10,4 @@ This folder contains a bunch of general information on how to get the base of a
* [CPU Governor](cpu_governor.md)
* [AUR Package Manager (REQUIRED)](aur_package_manager.md)
* [Slideshow Prep (REQUIRED)](slideshow_prep.md)
* [Slideshow Setup (REQUIRED)](slideshow.md)

46
docs/slideshow.md Normal file
View File

@ -0,0 +1,46 @@
# Slideshow
The below commands will setup ```feh``` as a slideshow on your display.
## Important Notes
* ```feh``` will crash if there are no photos for it to use as a slideshow
* You will likely want to tweak the ```feh``` command invocation below. These are great settings as a starting point but you'll probably want to make adjustments for your use case.
* This setup uses ```incron``` to restart ```feh``` when photos are deleted from the pictures folder. Without this piece ```feh``` will crash if a picture is removed from the pictures directory prior to ```feh``` rescaning the pictures directory.
* We default to ```DejaVuSansMono``` as the font for display of EXIF data and filename. This is an open font and looks great on most displays. Any ```fontconfig``` font can be used in its place. Adjust according to your preferences.
## Setup
``` sh
pacman -S feh imagemagick ttf-dejavu
# reload 86400 is to refresh the list of images daily -- tune for preferred number of seconds
# slideshow-delay is number of seconds (as a float) between images ; tune accordingly
useradd -s /usr/bin/nologin -m feh
chmod a+rx /tank/pictures
pacman -S acl
setfacl -m "u:feh:rX" /tank/pictures
setfacl -dm "u:feh:rX" /tank/pictures
pacman -S incron
cat > /etc/incron.d/feh <<EOF
/tank/pictures IN_DELETE systemctl restart greetd
EOF
systemctl enable --now incrond
cat > /usr/local/bin/feh-slideshow.sh <<EOF
#!/bin/bash
/usr/bin/feh --auto-zoom --borderless --fullscreen --hide-pointer --image-bg black --randomize --recursive \
--slideshow-delay 300 --reload 86400 \
--draw-tinted --draw-exif --draw-filename \
--fontpath /usr/share/fonts/TTF/ --font DejaVuSansMono/10 \
--verbose \
/tank/pictures
EOF
chmod a+x /usr/local/bin/feh-slideshow.sh
cat >> /etc/greetd/config.toml <<EOF
[initial_session]
command = "/usr/bin/cage /usr/local/bin/feh-slideshow.sh"
user = "feh"
EOF
systemctl restart greetd
```

View File

@ -1,36 +1,3 @@
########################################
# setup slide show app
########################################
pacman -S feh imagemagick ttf-dejavu
# reload 86400 is to refresh the list of images daily -- tune for preferred number of seconds
# slideshow-delay is number of seconds (as a float) between images ; tune accordingly
useradd -s /usr/bin/nologin -m feh
chmod a+rx /tank/pictures
pacman -S acl
setfacl -m "u:feh:rX" /tank/pictures
setfacl -dm "u:feh:rX" /tank/pictures
pacman -S incron
cat > /etc/incron.d/feh <<EOF
/tank/pictures IN_DELETE systemctl restart greetd
EOF
systemctl enable --now incrond
cat > /usr/local/bin/feh-slideshow.sh <<EOF
#!/bin/bash
/usr/bin/feh --auto-zoom --borderless --fullscreen --hide-pointer --image-bg black --randomize --recursive \
--slideshow-delay 300 --reload 86400 \
--draw-tinted --draw-exif --draw-filename \
--fontpath /usr/share/fonts/TTF/ --font DejaVuSansMono/10 \
--verbose \
/tank/pictures
EOF
chmod a+x /usr/local/bin/feh-slideshow.sh
cat >> /etc/greetd/config.toml <<EOF
[initial_session]
command = "/usr/bin/cage /usr/local/bin/feh-slideshow.sh"
user = "feh"
EOF
systemctl restart greetd
########################################
# email notifications via msmtp