slideshow/README.md

55 lines
2.6 KiB
Markdown
Raw Normal View History

2023-11-16 15:26:24 +01:00
# slideshow
2023-11-30 16:10:32 +01:00
client for the [slideshow-api](https://git.velvettear.de/velvettear/slideshow-api).
sets (scaled) images as background via 'feh', retrieves color palettes (and executes a script).
2023-11-16 15:26:24 +01:00
## requirements
- [feh](https://feh.finalrewind.org/)
## 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 |
2023-11-16 15:26:24 +01:00
2023-11-16 15:28:55 +01:00
**note:**
2023-11-16 15:26:24 +01:00
- 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:
2023-11-16 15:26:24 +01:00
- `debug`
- `info`
- `warning`
- `error`
- `fatal`
## color palette
**available algorithms:**
- `wsm`
- `wu`
for more information regarding the color palette see [color-thief](https://github.com/kennykarnama/color-thief).