47 lines
1.9 KiB
Markdown
47 lines
1.9 KiB
Markdown
# 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
|
|
|
|
```
|