Custom Lutris Game Banner Images
For those using the "Thunar" file manager in Linux — I've written a small script which adds a custom action to Thunar. It uses ffmpeg to convert large screen grab images to the size required for Lutris game banners images.

For games that don't have a banner, you can screenshot your own to your Pictures/ folder when the game is open, then convert the saved images for use as game banners with this script.
How to,
- Open your text editor of choice and copy and paste the following,
1#!/bin/bash
2# Creates a folder name declared in DEST.
3# Converts images to Lutris banner size using ffmpeg. (184:69)
4
5DEST="./Lutris_converted"
6mkdir $DEST
7
8# Pass files through ffmpeg and scale to new size, then save to DEST output folder.
9for file
10 do
11 if [ ! -e $file ]
12 then
13 continue
14 fi
15 to_name="$DEST/"${file%.*}".jpg"
16 ffmpeg -i "${file}" -vf scale=184:69 "${to_name}"
17done
- Save the file as
lutris_banner_images.sh
to$HOME/.scripts/
folder. If that folder doesn't exist, then simply create it. - In Thunar, press "Ctrl H" to show hidden files, then locate the
lutris_banner_images.sh
file. - Right-click on the file and select Properties > Permissions > (tick) "Allow this file to run as a program", then press close.
- In Thunar, go to Edit > Configure custom actions, then press the + icon on the right of the window.**
- In the "Basic" tab, give your new action a name, "to Lutris banner size", then enter a description.
- In the "Command" field, enter the location to the
lutris_banner_images.sh
file followed by%N

Example:
~/.scripts/lutris_banner_images.sh %N
- Choose an icon for the action if you wish.
- Click on the "Appearance" tab, set "File pattern" as
*
and tick the "Image Files" button. Press "OK" and "Close".

Now, when you right-click on images you'd like to create to a Lutris banner, you will see your new custom action in the menu.
Convert and use as you wish. Your converted images will appear in the Lutris_converted
folder.
I hope this helps. :smiley: