client for 'slideshow-api'
Find a file
2023-11-30 16:08:54 +01:00
.vscode updated launch config and systemd service 2023-11-30 16:08:54 +01:00
internal complete rewrite of the project; now server-client based 2023-11-30 16:04:26 +01:00
.gitignore fixed .gitignore 2023-11-16 15:29:55 +01:00
go.mod updated dependencies 2023-11-30 16:06:04 +01:00
go.sum complete rewrite of the project; now server-client based 2023-11-30 16:04:26 +01:00
LICENSE.md initial commit 2023-11-16 15:26:24 +01:00
main.go complete rewrite of the project; now server-client based 2023-11-30 16:04:26 +01:00
README.md complete rewrite of the project; now server-client based 2023-11-30 16:04:26 +01:00
slideshow.service updated launch config and systemd service 2023-11-30 16:08:54 +01:00

slideshow

slideshow-api's client to set (scaled) images as background via 'feh' and retrieve color palettes.

requirements

configuration

configuration is entirely done via environment variables.

variable default description
SLIDESHOW_API the address of the slideshow-api server
SLIDESHOW_INTERVAL 60 the interval of the slideshow in seconds
SLIDESHOW_RESOLUTION the resolution to which images are scaled (i.e. 1920x1080)
SLIDESHOW_PALETTE path to a file where the color palette will be stored
SLIDESHOW_PALETTE_ALGORITHM "wsm" the algorithm used to generate the color palette
SLIDESHOW_PALETTE_COLORS 16 the amount of colors generated
SLIDESHOW_SCRIPT path to a script to execute after each loop
SLIDESHOW_SCRIPT_ASYNC false run the script asynchronously (in a goroutine)
SLIDESHOW_SCRIPT_STAGE the stage at which the script is executed
SLIDESHOW_LOGLEVEL "info" the log level

note:

  • if SLIDESHOW_RESOLUTION is unset images will be requested in their original resolution.
  • if SLIDESHOW_PALETTE is unset no color palettes will be requested.
  • if SLIDESHOW_SCRIPT_STAGE is unset the script (if specified) will be executed after the background image has been set and the color palette file has been generated.

stages:

  • pre_image: executes the script before the background image will be set.
  • post_image: executes the script after the background image has been set.
  • pre_palette: executes the script before the color palette file will be generated.
  • post_palette: executes the script after the color palette has been generated.

log levels:

  • debug
  • info
  • warning
  • error
  • fatal

color palette

available algorithms:

  • wsm
  • wu

for more information regarding the color palette see color-thief.