Use systemd temp folder

This commit is contained in:
HonusBot 2021-05-15 23:43:21 +02:00
parent 02ad99f4fa
commit 86ffff4315

View File

@ -3,6 +3,10 @@
command="$1"
shift
args="$@"
temp_path="/tmp"
if [ -n "${XDG_RUNTIME_DIR}" ]; then
temp_path="${XDG_RUNTIME_DIR}"
fi
picture_download_command="cat"
picture_save_to_temp_command="cat"
display_command_pipe="display -title \"HonusBot CLI\" -quiet"
@ -11,9 +15,9 @@ download_url_to_stdin=true
if [ -x "$(command -v viu)" ]; then
echo "Found viu"
picture_save_to_temp_command="tee /tmp/temp-honus.bin"
picture_save_to_temp_command="tee ${temp_path}/temp-honus.bin"
display_command_pipe="cat > /dev/null"
display_command_after="viu /tmp/temp-honus.bin"
display_command_after="viu ${temp_path}/temp-honus.bin"
download_url_to_stdin=true
elif [ -x "$(command -v feh)" ]; then
echo "Found feh"