Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package ueberzugpp for openSUSE:Factory 
checked in at 2024-02-05 22:01:13
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ueberzugpp (Old)
 and      /work/SRC/openSUSE:Factory/.ueberzugpp.new.1815 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ueberzugpp"

Mon Feb  5 22:01:13 2024 rev:8 rq:1144052 version:2.9.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/ueberzugpp/ueberzugpp.changes    2023-08-28 
17:16:01.274387424 +0200
+++ /work/SRC/openSUSE:Factory/.ueberzugpp.new.1815/ueberzugpp.changes  
2024-02-05 22:01:19.151270174 +0100
@@ -1,0 +2,7 @@
+Sun Jan 28 20:44:23 UTC 2024 - Andreas Stieger <andreas.stie...@gmx.de>
+
+- Update to version 2.9.2:
+  * support kitty 0.30
+  * improve code correctness
+
+-------------------------------------------------------------------

Old:
----
  ueberzugpp-2.9.1.tar.gz

New:
----
  ueberzugpp-2.9.2.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ueberzugpp.spec ++++++
--- /var/tmp/diff_new_pack.WIS8zw/_old  2024-02-05 22:01:19.791293328 +0100
+++ /var/tmp/diff_new_pack.WIS8zw/_new  2024-02-05 22:01:19.791293328 +0100
@@ -2,6 +2,7 @@
 # spec file for package ueberzugpp
 #
 # Copyright (c) 2023 SUSE LLC
+# Copyright (c) 2024 Andreas Stieger <andreas.stie...@gmx.de>
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,21 +19,22 @@
 
 %define short_name ueberzug
 Name:           ueberzugpp
-Version:        2.9.1
+Version:        2.9.2
 Release:        0
 Summary:        Utility to render images in terminals
-License:        GPL-3.0
+License:        GPL-3.0-or-later
 URL:            https://github.com/jstkdng/%{name}
 Source:         
https://github.com/jstkdng/%{name}/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
 BuildRequires:  automake
 BuildRequires:  cmake
-BuildRequires:  cmake(Microsoft.GSL)
-BuildRequires:  cmake(spdlog)
 BuildRequires:  extra-cmake-modules
 BuildRequires:  gcc-c++
 BuildRequires:  git-core
 BuildRequires:  make
 BuildRequires:  ninja
+BuildRequires:  pkgconfig
+BuildRequires:  cmake(Microsoft.GSL)
+BuildRequires:  cmake(spdlog)
 BuildRequires:  pkgconfig(CLI11)
 BuildRequires:  pkgconfig(botan-2)
 BuildRequires:  pkgconfig(chafa)
@@ -68,7 +70,7 @@
 %autosetup
 
 %build
-%cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_SKIP_RPATH=YES 
-DCMAKE_BUILD_TYPE=release -DENABLE_WLROOTS=ON
+%cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} -DCMAKE_SKIP_RPATH=YES 
-DCMAKE_BUILD_TYPE=release -DENABLE_WLROOTS=ON
 %cmake_build
 
 %install

++++++ _service ++++++
--- /var/tmp/diff_new_pack.WIS8zw/_old  2024-02-05 22:01:19.815294196 +0100
+++ /var/tmp/diff_new_pack.WIS8zw/_new  2024-02-05 22:01:19.819294340 +0100
@@ -2,9 +2,10 @@
   <service name="obs_scm" mode="disabled">
     <param name="url">https://github.com/jstkdng/ueberzugpp</param>
     <param name="scm">git</param>
-    <param name="versionformat">@PARENT_TAG@+git%cd.%h</param>
+    <param name="versionformat">@PARENT_TAG@</param>
     <param name="versionrewrite-pattern">v(.*)</param>
     <param name="changesgenerate">enable</param>
+    <param name="revision">v2.9.2</param>
   </service>
   <service name="set_version" mode="disabled"/>
   <service name="tar" mode="disabled"/>

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.WIS8zw/_old  2024-02-05 22:01:19.843295209 +0100
+++ /var/tmp/diff_new_pack.WIS8zw/_new  2024-02-05 22:01:19.847295353 +0100
@@ -1,6 +1,6 @@
 <servicedata>
 <service name="tar_scm">
                 <param name="url">https://github.com/jstkdng/ueberzugpp</param>
-              <param 
name="changesrevision">df4e40ff0509447a600ac82d2e9b165ee71a9e22</param></service></servicedata>
+              <param 
name="changesrevision">72b8ffee52ef3b5a9b33f627a630d8d9d9a36e7e</param></service></servicedata>
 (No newline at EOF)
 

++++++ ueberzugpp-2.9.1.tar.gz -> ueberzugpp-2.9.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ueberzugpp-2.9.1/CMakeLists.txt 
new/ueberzugpp-2.9.2/CMakeLists.txt
--- old/ueberzugpp-2.9.1/CMakeLists.txt 2023-08-19 06:41:57.000000000 +0200
+++ new/ueberzugpp-2.9.2/CMakeLists.txt 2023-09-19 14:23:16.000000000 +0200
@@ -30,7 +30,7 @@
 set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
 set(CMAKE_BUILD_TYPE Debug CACHE STRING "Build type.")
 
-project(ueberzugpp LANGUAGES CXX C VERSION 2.9.1)
+project(ueberzugpp LANGUAGES CXX C VERSION 2.9.2)
 add_executable(ueberzug)
 
 option(ENABLE_X11           "Enable X11 canvas." ON)
@@ -213,9 +213,15 @@
     endif()
 endif()
 
+set(PROJECT_WARNINGS_CXX
+    -Wall
+    -Wextra
+    -Wpedantic
+    -Werror)
+
 target_compile_options(ueberzug PRIVATE
     $<$<CONFIG:Debug>:
-        -Wall -Wextra -Wpedantic -Werror
+        $<$<COMPILE_LANGUAGE:CXX>:${PROJECT_WARNINGS_CXX}>
     >
 )
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ueberzugpp-2.9.1/README.md 
new/ueberzugpp-2.9.2/README.md
--- old/ueberzugpp-2.9.1/README.md      2023-08-19 06:41:57.000000000 +0200
+++ new/ueberzugpp-2.9.2/README.md      2023-09-19 14:23:16.000000000 +0200
@@ -45,6 +45,8 @@
 
 ### Debian/Ubuntu/Fedora
 
+Packages for x86_64, aarch64 and ppc64le are available in the following 
repository.
+
 
https://software.opensuse.org/download.html?project=home%3Ajustkidding&package=ueberzugpp
 
 # Usage
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ueberzugpp-2.9.1/include/dimensions.hpp 
new/ueberzugpp-2.9.2/include/dimensions.hpp
--- old/ueberzugpp-2.9.1/include/dimensions.hpp 2023-08-19 06:41:57.000000000 
+0200
+++ new/ueberzugpp-2.9.2/include/dimensions.hpp 2023-09-19 14:23:16.000000000 
+0200
@@ -25,7 +25,7 @@
 class Dimensions
 {
 public:
-    Dimensions(const Terminal& terminal, uint16_t xcoord, uint16_t ycoord,
+    Dimensions(const Terminal* terminal, uint16_t xcoord, uint16_t ycoord,
             int max_w, int max_h, std::string scaler);
 
     [[nodiscard]] auto xpixels() const -> int;
@@ -40,7 +40,7 @@
     uint16_t padding_horizontal;
     uint16_t padding_vertical;
     std::string scaler;
-    const Terminal& terminal;
+    const Terminal* terminal;
 
 private:
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ueberzugpp-2.9.1/include/flags.hpp 
new/ueberzugpp-2.9.2/include/flags.hpp
--- old/ueberzugpp-2.9.1/include/flags.hpp      2023-08-19 06:41:57.000000000 
+0200
+++ new/ueberzugpp-2.9.2/include/flags.hpp      2023-09-19 14:23:16.000000000 
+0200
@@ -45,6 +45,7 @@
     bool use_opengl = false;
     std::string output;
     std::string pid_file;
+    bool origin_center = false;
 
     std::string cmd_id;
     std::string cmd_action;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ueberzugpp-2.9.1/include/image.hpp 
new/ueberzugpp-2.9.2/include/image.hpp
--- old/ueberzugpp-2.9.1/include/image.hpp      2023-08-19 06:41:57.000000000 
+0200
+++ new/ueberzugpp-2.9.2/include/image.hpp      2023-09-19 14:23:16.000000000 
+0200
@@ -28,10 +28,10 @@
 class Image
 {
 public:
-    static auto load(const nlohmann::json& command, const Terminal& terminal) 
-> std::unique_ptr<Image>;
+    static auto load(const nlohmann::json& command, const Terminal* terminal) 
-> std::unique_ptr<Image>;
     static auto check_cache(const Dimensions& dimensions,
             const std::filesystem::path& orig_path) -> std::string;
-    static auto get_dimensions(const nlohmann::json& json, const Terminal& 
terminal) -> std::shared_ptr<Dimensions>;
+    static auto get_dimensions(const nlohmann::json& json, const Terminal* 
terminal) -> std::shared_ptr<Dimensions>;
 
     virtual ~Image() = default;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ueberzugpp-2.9.1/include/util/egl.hpp 
new/ueberzugpp-2.9.2/include/util/egl.hpp
--- old/ueberzugpp-2.9.1/include/util/egl.hpp   2023-08-19 06:41:57.000000000 
+0200
+++ new/ueberzugpp-2.9.2/include/util/egl.hpp   2023-09-19 14:23:16.000000000 
+0200
@@ -35,14 +35,12 @@
     EGLUtil(EGLenum platform, T* native_display, const EGLAttrib* attrib = 
nullptr);
     ~EGLUtil();
 
-    void get_texture_from_image(const Image& image, GLuint texture);
-
-    auto create_surface(V* native_window) -> EGLSurface;
-    auto create_context(EGLSurface surface) -> EGLContext;
-
-    void run_contained(EGLSurface surface, EGLContext context, const 
std::function<void()>& func);
-    void make_current(EGLSurface surface, EGLContext context);
-    void restore();
+    void get_texture_from_image(const Image& image, GLuint texture) const;
+    void run_contained(EGLSurface surface, EGLContext context, const 
std::function<void()>& func) const;
+    void make_current(EGLSurface surface, EGLContext context) const;
+    void restore() const;
+    [[nodiscard]] auto create_surface(V* native_window) const -> EGLSurface;
+    [[nodiscard]] auto create_context(EGLSurface surface) const -> EGLContext;
 
     EGLDisplay display;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ueberzugpp-2.9.1/scripts/fifo/fzf-fifo 
new/ueberzugpp-2.9.2/scripts/fifo/fzf-fifo
--- old/ueberzugpp-2.9.1/scripts/fifo/fzf-fifo  2023-08-19 06:41:57.000000000 
+0200
+++ new/ueberzugpp-2.9.2/scripts/fifo/fzf-fifo  2023-09-19 14:23:16.000000000 
+0200
@@ -23,7 +23,7 @@
 cleanup() {
     exec 3>&-
 }
-trap cleanup HUP INT QUIT TERM PWR EXIT
+trap cleanup HUP INT QUIT TERM EXIT
 
 preview_image() {
     echo '{"path": "'"$1"'", "action": "add", "identifier": "fzfpreview", "x": 
"'"$x"'", "y": "'"$y"'", "width": "'"$width"'", "height": "'"$height"'"}' 
>"$FIFO"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ueberzugpp-2.9.1/scripts/fifo/img-fifo 
new/ueberzugpp-2.9.2/scripts/fifo/img-fifo
--- old/ueberzugpp-2.9.1/scripts/fifo/img-fifo  2023-08-19 06:41:57.000000000 
+0200
+++ new/ueberzugpp-2.9.2/scripts/fifo/img-fifo  2023-09-19 14:23:16.000000000 
+0200
@@ -20,7 +20,7 @@
 cleanup() {
     rm -f "$FIFO"
 }
-trap cleanup HUP INT QUIT TERM PWR EXIT
+trap cleanup HUP INT QUIT TERM EXIT
 
 preview_image() {
     echo '{"path": "'"$5"'", "action": "add", "identifier": "img-fifo", "x": 
"'"$1"'", "y": "'"$2"'", "width": "'"$3"'", "height": "'"$4"'"}' >"$FIFO"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ueberzugpp-2.9.1/scripts/fzfub 
new/ueberzugpp-2.9.2/scripts/fzfub
--- old/ueberzugpp-2.9.1/scripts/fzfub  2023-08-19 06:41:57.000000000 +0200
+++ new/ueberzugpp-2.9.2/scripts/fzfub  2023-09-19 14:23:16.000000000 +0200
@@ -1,13 +1,27 @@
-#!/bin/bash
+#!/bin/sh
 
-UB_PID_FILE="/tmp/.$(uuidgen)"
-ueberzugpp layer --no-stdin --silent --use-escape-codes --pid-file $UB_PID_FILE
-UB_PID=$(cat $UB_PID_FILE)
+case "$(uname -a)" in
+    *Darwin*) UEBERZUG_TMP_DIR="$TMPDIR" ;;
+    *) UEBERZUG_TMP_DIR="/tmp" ;;
+esac
 
-export SOCKET=/tmp/ueberzugpp-$UB_PID.socket
+cleanup() {
+    ueberzugpp cmd -s "$UB_SOCKET" -a exit
+}
+trap cleanup HUP INT QUIT TERM EXIT
+
+UB_PID_FILE="$UEBERZUG_TMP_DIR/.$(uuidgen)"
+ueberzugpp layer --no-stdin --silent --use-escape-codes --pid-file 
"$UB_PID_FILE"
+UB_PID=$(cat "$UB_PID_FILE")
+
+export SOCKET="$UEBERZUG_TMP_DIR"/ueberzugpp-"$UB_PID".socket
 export X=$(($(tput cols) / 2 + 1))
+# --max-width $FZF_PREVIEW_COLUMNS --max-height $FZF_PREVIEW_LINES
+# if FZF_PREVIEW_COLUMNS exists, use it, otherwise use tput cols
+[ -z "$FZF_PREVIEW_COLUMNS" ] && max_width=$(($(tput cols) - 2)) || 
max_width=$FZF_PREVIEW_COLUMNS
+[ -z "$FZF_PREVIEW_LINES" ] && max_height=$(($(tput lines) - 2)) || 
max_height=$FZF_PREVIEW_LINES
 
 # run fzf with preview
-fzf --preview='ueberzugpp cmd -s $SOCKET -i fzfpreview -a add -x $X -y 1 
--max-width $FZF_PREVIEW_COLUMNS --max-height $FZF_PREVIEW_LINES -f {}' 
--reverse "$@"
+fzf --reverse --preview="ueberzugpp cmd -s $SOCKET -i fzfpreview -a add -x $X 
-y 1 --max-width $max_width --max-height $max_height -f {}"
 
-ueberzugpp cmd -s $SOCKET -a exit
+ueberzugpp cmd -s "$SOCKET" -a exit
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ueberzugpp-2.9.1/scripts/img 
new/ueberzugpp-2.9.2/scripts/img
--- old/ueberzugpp-2.9.1/scripts/img    2023-08-19 06:41:57.000000000 +0200
+++ new/ueberzugpp-2.9.2/scripts/img    2023-09-19 14:23:16.000000000 +0200
@@ -12,15 +12,19 @@
 UB_PID=0
 UB_SOCKET=""
 
+case "$(uname -a)" in
+    *Darwin*) UEBERZUG_TMP_DIR="$TMPDIR" ;;
+    *) UEBERZUG_TMP_DIR="/tmp" ;;
+esac
+
 cleanup() {
-    tput clear
     ueberzugpp cmd -s "$UB_SOCKET" -a exit
 }
-trap cleanup HUP INT QUIT TERM PWR EXIT
+trap cleanup HUP INT QUIT TERM EXIT
 
-UB_PID_FILE="/tmp/.$(uuidgen)"
+UB_PID_FILE="$UEBERZUG_TMP_DIR/.$(uuidgen)"
 ueberzugpp layer --no-stdin --silent --use-escape-codes --pid-file 
"$UB_PID_FILE"
 UB_PID="$(cat "$UB_PID_FILE")"
-export UB_SOCKET=/tmp/ueberzugpp-"$UB_PID".socket
+export UB_SOCKET="$UEBERZUG_TMP_DIR"/ueberzugpp-"$UB_PID".socket
 ueberzugpp cmd -s "$UB_SOCKET" -a add -i PREVIEW -x "$1" -y "$2" --max-width 
"$3" --max-height "$4" -f "$5"
 sleep 2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ueberzugpp-2.9.1/scripts/lf/lfub 
new/ueberzugpp-2.9.2/scripts/lf/lfub
--- old/ueberzugpp-2.9.1/scripts/lf/lfub        2023-08-19 06:41:57.000000000 
+0200
+++ new/ueberzugpp-2.9.2/scripts/lf/lfub        2023-09-19 14:23:16.000000000 
+0200
@@ -9,21 +9,26 @@
 UB_PID=0
 UB_SOCKET=""
 
+case "$(uname -a)" in
+    *Darwin*) UEBERZUG_TMP_DIR="$TMPDIR" ;;
+    *) UEBERZUG_TMP_DIR="/tmp" ;;
+esac
+
 cleanup() {
     exec 3>&-
-    ueberzugpp cmd -s $UB_SOCKET -a exit
+    ueberzugpp cmd -s "$UB_SOCKET" -a exit
 }
 
 if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then
-       lf "$@"
+    lf "$@"
 else
-    [ ! -d "$HOME/.cache/lf" ] && mkdir --parents "$HOME/.cache/lf"
-    UB_PID_FILE="/tmp/.$(uuidgen)"
-    ueberzugpp layer --silent --no-stdin --use-escape-codes --pid-file 
$UB_PID_FILE
-    UB_PID=$(cat $UB_PID_FILE)
-    rm $UB_PID_FILE
-    UB_SOCKET="/tmp/ueberzugpp-${UB_PID}.socket"
+    [ ! -d "$HOME/.cache/lf" ] && mkdir -p "$HOME/.cache/lf"
+    UB_PID_FILE="$UEBERZUG_TMP_DIR/.$(uuidgen)"
+    ueberzugpp layer --silent --no-stdin --use-escape-codes --pid-file 
"$UB_PID_FILE"
+    UB_PID=$(cat "$UB_PID_FILE")
+    rm "$UB_PID_FILE"
+    UB_SOCKET="$UEBERZUG_TMP_DIR/ueberzugpp-${UB_PID}.socket"
     export UB_PID UB_SOCKET
-    trap cleanup HUP INT QUIT TERM PWR EXIT
+    trap cleanup HUP INT QUIT TERM EXIT
     lf "$@" 3>&-
 fi
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ueberzugpp-2.9.1/scripts/lf/preview 
new/ueberzugpp-2.9.2/scripts/lf/preview
--- old/ueberzugpp-2.9.1/scripts/lf/preview     2023-08-19 06:41:57.000000000 
+0200
+++ new/ueberzugpp-2.9.2/scripts/lf/preview     2023-09-19 14:23:16.000000000 
+0200
@@ -4,66 +4,62 @@
     FILE_PATH="$1"
     X=$4
     Y=$5
-    MW=$(($2-1))
+    MW=$(($2 - 1))
     MH=$3
-    ueberzugpp cmd -s $UB_SOCKET -a add -i PREVIEW -x $X -y $Y --max-width $MW 
--max-height $MH -f "$FILE_PATH"
+    ueberzugpp cmd -s "$UB_SOCKET" -a add -i PREVIEW -x "$X" -y "$Y" 
--max-width "$MW" --max-height "$MH" -f "$FILE_PATH"
     exit 1
 }
 
 batorcat() {
-       file="$1"
-       shift
-       if command -v bat > /dev/null 2>&1
-       then
-               bat --color=always --style=plain --pager=never "$file" "$@"
-       else
-               cat "$file"
-       fi
+    file="$1"
+    shift
+    if command -v bat >/dev/null 2>&1; then
+        bat --color=always --style=plain --pager=never "$file" "$@"
+    else
+        cat "$file"
+    fi
 }
 
 CACHE="$HOME/.cache/lf/thumbnail.$(stat --printf '%n\0%i\0%F\0%s\0%W\0%Y' -- 
"$(readlink -f "$1")" | sha256sum | awk '{print $1}'))"
 
-case "$(printf "%s\n" "$(readlink -f "$1")" | awk '{print tolower($0)}')" in
-       *.tgz|*.tar.gz) tar tzf "$1" ;;
-       *.tar.bz2|*.tbz2) tar tjf "$1" ;;
-       *.tar.txz|*.txz) xz --list "$1" ;;
-       *.tar) tar tf "$1" ;;
-       *.zip|*.jar|*.war|*.ear|*.oxt) unzip -l "$1" ;;
-       *.rar) unrar l "$1" ;;
-       *.7z) 7z l "$1" ;;
-       *.[1-8]) man "$1" | col -b ;;
-       *.o) nm "$1";;
-       *.torrent) transmission-show "$1" ;;
-       *.iso) iso-info --no-header -l "$1" ;;
-       *.odt|*.ods|*.odp|*.sxw) odt2txt "$1" ;;
-       *.doc) catdoc "$1" ;;
-       *.docx) docx2txt "$1" - ;;
-       *.xls|*.xlsx)
-               ssconvert --export-type=Gnumeric_stf:stf_csv "$1" "fd://1" | 
batorcat --language=csv
-               ;;
-       
*.wav|*.mp3|*.flac|*.m4a|*.wma|*.ape|*.ac3|*.og[agx]|*.spx|*.opus|*.as[fx]|*.mka)
-               exiftool "$1"
-               ;;
-       *.pdf)
-               [ ! -f "${CACHE}.jpg" ] && \
-                       pdftoppm -jpeg -f 1 -singlefile "$1" "$CACHE"
-               image "${CACHE}.jpg" "$2" "$3" "$4" "$5"
-               ;;
-       
*.avi|*.mp4|*.wmv|*.dat|*.3gp|*.ogv|*.mkv|*.mpg|*.mpeg|*.vob|*.fl[icv]|*.m2v|*.mov|*.webm|*.ts|*.mts|*.m4v|*.r[am]|*.qt|*.divx)
-               [ ! -f "${CACHE}.jpg" ] && \
-                       ffmpegthumbnailer -i "$1" -o "${CACHE}.jpg" -s 0 -q 5
-               image "${CACHE}.jpg" "$2" "$3" "$4" "$5"
-               ;;
-       *.bmp|*.jpg|*.jpeg|*.png|*.xpm|*.webp|*.gif|*.jfif)
-               image "$1" "$2" "$3" "$4" "$5"
-               ;;
-       *.svg)
-               [ ! -f "${CACHE}.jpg" ] && \
-               convert "$1" "${CACHE}.jpg"
-               image "${CACHE}.jpg" "$2" "$3" "$4" "$5"
-               ;;
-       *)
-               batorcat "$1"
-               ;;
+case "$(printf "%s\n" "$(readlink -f "$1")" | tr '[:upper:]' '[:lower:]')" in
+    *.tgz | *.tar.gz) tar tzf "$1" ;;
+    *.tar.bz2 | *.tbz2) tar tjf "$1" ;;
+    *.tar.txz | *.txz) xz --list "$1" ;;
+    *.tar) tar tf "$1" ;;
+    *.zip | *.jar | *.war | *.ear | *.oxt) unzip -l "$1" ;;
+    *.rar) unrar l "$1" ;;
+    *.7z) 7z l "$1" ;;
+    *.[1-8]) man "$1" | col -b ;;
+    *.o) nm "$1" ;;
+    *.torrent) transmission-show "$1" ;;
+    *.iso) iso-info --no-header -l "$1" ;;
+    *.odt | *.ods | *.odp | *.sxw) odt2txt "$1" ;;
+    *.doc) catdoc "$1" ;;
+    *.docx) docx2txt "$1" - ;;
+    *.xls | *.xlsx)
+        ssconvert --export-type=Gnumeric_stf:stf_csv "$1" "fd://1" | batorcat 
--language=csv
+        ;;
+    *.wav | *.mp3 | *.flac | *.m4a | *.wma | *.ape | *.ac3 | *.og[agx] | *.spx 
| *.opus | *.as[fx] | *.mka)
+        exiftool "$1"
+        ;;
+    *.pdf)
+        [ ! -f "${CACHE}.jpg" ] && pdftoppm -jpeg -f 1 -singlefile "$1" 
"$CACHE"
+        image "${CACHE}.jpg" "$2" "$3" "$4" "$5"
+        ;;
+    *.avi | *.mp4 | *.wmv | *.dat | *.3gp | *.ogv | *.mkv | *.mpg | *.mpeg | 
*.vob | *.fl[icv] | *.m2v | *.mov | *.webm | *.ts | *.mts | *.m4v | *.r[am] | 
*.qt | *.divx)
+        [ ! -f "${CACHE}.jpg" ] && ffmpegthumbnailer -i "$1" -o "${CACHE}.jpg" 
-s 0 -q 5
+        image "${CACHE}.jpg" "$2" "$3" "$4" "$5"
+        ;;
+    *.bmp | *.jpg | *.jpeg | *.png | *.xpm | *.webp | *.gif | *.jfif)
+        image "$1" "$2" "$3" "$4" "$5"
+        ;;
+    *.svg)
+        [ ! -f "${CACHE}.jpg" ] && convert "$1" "${CACHE}.jpg"
+        image "${CACHE}.jpg" "$2" "$3" "$4" "$5"
+        ;;
+    *)
+        batorcat "$1"
+        ;;
 esac
 exit 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ueberzugpp-2.9.1/src/application.cpp 
new/ueberzugpp-2.9.2/src/application.cpp
--- old/ueberzugpp-2.9.1/src/application.cpp    2023-08-19 06:41:57.000000000 
+0200
+++ new/ueberzugpp-2.9.2/src/application.cpp    2023-09-19 14:23:16.000000000 
+0200
@@ -110,7 +110,7 @@
             logger->error("Path received is not valid");
             return;
         }
-        auto image = Image::load(json, *terminal);
+        auto image = Image::load(json, terminal.get());
         if (!image) {
             logger->error("Unable to load image file");
             return;
@@ -249,17 +249,19 @@
 {
     const auto log_tmp = util::get_log_filename();
     const auto log_path = fs::temp_directory_path() / log_tmp;
-    std::ofstream ofs(log_path, std::ios::out | std::ios::app);
-    ofs << " _    _      _                                           \n"
-        << "| |  | |    | |                                _     _   \n"
-        << "| |  | | ___| |__   ___ _ __ _____   _  __ _ _| |_ _| |_ \n"
-        << "| |  | |/ _ \\ '_ \\ / _ \\ '__|_  / | | |/ _` |_   _|_   _|\n"
-        << "| |__| |  __/ |_) |  __/ |   / /| |_| | (_| | |_|   |_|  \n"
-        << " \\____/ \\___|_.__/ \\___|_|  /___|\\__,_|\\__, |            \n"
-        << "                                        __/ |            \n"
-        << "                                       |___/     "
-        << "v" << ueberzugpp_VERSION_MAJOR << "." << ueberzugpp_VERSION_MINOR
-        << "." << ueberzugpp_VERSION_PATCH << std::endl;
+    const auto art = fmt::format(R"(
+ _   _      _
+| | | |    | |                                _     _
+| | | | ___| |__   ___ _ __ _____   _  __ _ _| |_ _| |_
+| | | |/ _ \ '_ \ / _ \ '__|_  / | | |/ _` |_   _|_   _|
+| |_| |  __/ |_) |  __/ |   / /| |_| | (_| | |_|   |_|
+ \___/ \___|_.__/ \___|_|  /___|\__,_|\__, |
+                                       __/ |
+                                      |___/     v{}.{}.{})",
+        ueberzugpp_VERSION_MAJOR, ueberzugpp_VERSION_MINOR, 
ueberzugpp_VERSION_PATCH
+    );
+    std::ofstream ofs (log_path, std::ios::out | std::ios::app);
+    ofs << art << std::endl;
 }
 
 void Application::set_silent()
@@ -272,13 +274,14 @@
 
 void Application::print_version()
 {
-    std::cout << "ueberzugpp " << ueberzugpp_VERSION_MAJOR << "." << 
ueberzugpp_VERSION_MINOR
-        << "." << ueberzugpp_VERSION_PATCH << std::endl;
+    const auto ver_str = fmt::format("ueberzugpp {}.{}.{}",
+            ueberzugpp_VERSION_MAJOR, ueberzugpp_VERSION_MINOR, 
ueberzugpp_VERSION_PATCH);
+    std::cout << ver_str << std::endl;
 }
 
 void Application::daemonize(const std::string_view pid_file)
 {
     os::daemonize();
     std::ofstream ofs (pid_file.data());
-    ofs << os::get_pid();
+    ofs << os::get_pid() << std::flush;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ueberzugpp-2.9.1/src/canvas/chafa.cpp 
new/ueberzugpp-2.9.2/src/canvas/chafa.cpp
--- old/ueberzugpp-2.9.1/src/canvas/chafa.cpp   2023-08-19 06:41:57.000000000 
+0200
+++ new/ueberzugpp-2.9.2/src/canvas/chafa.cpp   2023-09-19 14:23:16.000000000 
+0200
@@ -54,8 +54,8 @@
     const auto dims = image->dimensions();
     x = dims.x + 1;
     y = dims.y + 1;
-    horizontal_cells = std::ceil(static_cast<double>(image->width()) / 
dims.terminal.font_width);
-    vertical_cells = std::ceil(static_cast<double>(image->height()) / 
dims.terminal.font_height);
+    horizontal_cells = std::ceil(static_cast<double>(image->width()) / 
dims.terminal->font_width);
+    vertical_cells = std::ceil(static_cast<double>(image->height()) / 
dims.terminal->font_height);
 
     chafa_symbol_map_add_by_tags(symbol_map, CHAFA_SYMBOL_TAG_BLOCK);
     chafa_symbol_map_add_by_tags(symbol_map, CHAFA_SYMBOL_TAG_BORDER);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ueberzugpp-2.9.1/src/canvas/iterm2/iterm2.cpp 
new/ueberzugpp-2.9.2/src/canvas/iterm2/iterm2.cpp
--- old/ueberzugpp-2.9.1/src/canvas/iterm2/iterm2.cpp   2023-08-19 
06:41:57.000000000 +0200
+++ new/ueberzugpp-2.9.2/src/canvas/iterm2/iterm2.cpp   2023-09-19 
14:23:16.000000000 +0200
@@ -48,8 +48,8 @@
     const auto dims = image->dimensions();
     x = dims.x + 1;
     y = dims.y + 1;
-    horizontal_cells = std::ceil(static_cast<double>(image->width()) / 
dims.terminal.font_width);
-    vertical_cells = std::ceil(static_cast<double>(image->height()) / 
dims.terminal.font_height);
+    horizontal_cells = std::ceil(static_cast<double>(image->width()) / 
dims.terminal->font_width);
+    vertical_cells = std::ceil(static_cast<double>(image->height()) / 
dims.terminal->font_height);
 }
 
 Iterm2::~Iterm2()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ueberzugpp-2.9.1/src/canvas/kitty/kitty.cpp 
new/ueberzugpp-2.9.2/src/canvas/kitty/kitty.cpp
--- old/ueberzugpp-2.9.1/src/canvas/kitty/kitty.cpp     2023-08-19 
06:41:57.000000000 +0200
+++ new/ueberzugpp-2.9.2/src/canvas/kitty/kitty.cpp     2023-09-19 
14:23:16.000000000 +0200
@@ -79,7 +79,7 @@
 
 auto Kitty::process_chunks() -> std::vector<KittyChunk>
 {
-    const uint64_t chunk_size = 4096;
+    const uint64_t chunk_size = 3068;
     uint64_t num_chunks = image->size() / chunk_size;
     uint64_t last_chunk_size = image->size() % chunk_size;
     if (last_chunk_size == 0) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ueberzugpp-2.9.1/src/canvas/sixel.cpp 
new/ueberzugpp-2.9.2/src/canvas/sixel.cpp
--- old/ueberzugpp-2.9.1/src/canvas/sixel.cpp   2023-08-19 06:41:57.000000000 
+0200
+++ new/ueberzugpp-2.9.2/src/canvas/sixel.cpp   2023-09-19 14:23:16.000000000 
+0200
@@ -32,8 +32,8 @@
     const auto dims = image->dimensions();
     x = dims.x + 1;
     y = dims.y + 1;
-    horizontal_cells = std::ceil(static_cast<double>(image->width()) / 
dims.terminal.font_width);
-    vertical_cells = std::ceil(static_cast<double>(image->height()) / 
dims.terminal.font_height);
+    horizontal_cells = std::ceil(static_cast<double>(image->width()) / 
dims.terminal->font_width);
+    vertical_cells = std::ceil(static_cast<double>(image->height()) / 
dims.terminal->font_height);
 
     const auto draw_callback = [] (char *data, int size, void* priv) -> int {
         auto *str = static_cast<std::string*>(priv);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ueberzugpp-2.9.1/src/canvas/wayland/config/sway.hpp 
new/ueberzugpp-2.9.2/src/canvas/wayland/config/sway.hpp
--- old/ueberzugpp-2.9.1/src/canvas/wayland/config/sway.hpp     2023-08-19 
06:41:57.000000000 +0200
+++ new/ueberzugpp-2.9.2/src/canvas/wayland/config/sway.hpp     2023-09-19 
14:23:16.000000000 +0200
@@ -51,7 +51,7 @@
     [[nodiscard]] auto get_nodes() const -> std::vector<nlohmann::json>;
     [[nodiscard]] auto ipc_message(ipc_message_type type, std::string_view 
payload = "") const -> nlohmann::json;
 
-    const UnixSocket socket;
+    UnixSocket socket;
     std::shared_ptr<spdlog::logger> logger;
 };
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ueberzugpp-2.9.1/src/canvas/wayland/config/wayfire.hpp 
new/ueberzugpp-2.9.2/src/canvas/wayland/config/wayfire.hpp
--- old/ueberzugpp-2.9.1/src/canvas/wayland/config/wayfire.hpp  2023-08-19 
06:41:57.000000000 +0200
+++ new/ueberzugpp-2.9.2/src/canvas/wayland/config/wayfire.hpp  2023-09-19 
14:23:16.000000000 +0200
@@ -36,7 +36,7 @@
 private:
     [[nodiscard]] auto request(std::string_view method, const nlohmann::json& 
data = {}) const -> nlohmann::json;
 
-    const UnixSocket socket;
+    UnixSocket socket;
     std::shared_ptr<spdlog::logger> logger;
 };
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ueberzugpp-2.9.1/src/canvas/wayland/wayland.cpp 
new/ueberzugpp-2.9.2/src/canvas/wayland/wayland.cpp
--- old/ueberzugpp-2.9.1/src/canvas/wayland/wayland.cpp 2023-08-19 
06:41:57.000000000 +0200
+++ new/ueberzugpp-2.9.2/src/canvas/wayland/wayland.cpp 2023-09-19 
14:23:16.000000000 +0200
@@ -147,15 +147,15 @@
 #ifdef ENABLE_OPENGL
     if (egl_available) {
         try {
-            window = std::make_shared<WaylandEglWindow>(compositor, xdg_base, 
*egl, std::move(new_image), config, xdg_agg);
+            window = std::make_shared<WaylandEglWindow>(compositor, xdg_base, 
egl.get(), std::move(new_image), config, &xdg_agg);
         } catch (const std::runtime_error& err) {
             return;
         }
     } else {
-        window = std::make_shared<WaylandShmWindow>(compositor, wl_shm, 
xdg_base, std::move(new_image), config, xdg_agg);
+        window = std::make_shared<WaylandShmWindow>(compositor, wl_shm, 
xdg_base, std::move(new_image), config, &xdg_agg);
     }
 #else
-    window = std::make_shared<WaylandShmWindow>(compositor, wl_shm, xdg_base, 
std::move(new_image), config, xdg_agg);
+    window = std::make_shared<WaylandShmWindow>(compositor, wl_shm, xdg_base, 
std::move(new_image), config, &xdg_agg);
 #endif
     window->finish_init();
     windows.insert_or_assign(identifier, std::move(window));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ueberzugpp-2.9.1/src/canvas/wayland/window/waylandegl.cpp 
new/ueberzugpp-2.9.2/src/canvas/wayland/window/waylandegl.cpp
--- old/ueberzugpp-2.9.1/src/canvas/wayland/window/waylandegl.cpp       
2023-08-19 06:41:57.000000000 +0200
+++ new/ueberzugpp-2.9.2/src/canvas/wayland/window/waylandegl.cpp       
2023-09-19 14:23:16.000000000 +0200
@@ -34,8 +34,8 @@
 };
 
 WaylandEglWindow::WaylandEglWindow(struct wl_compositor *compositor, struct 
xdg_wm_base *xdg_base,
-        EGLUtil<struct wl_display, struct wl_egl_window>& egl, 
std::unique_ptr<Image> new_image,
-        std::shared_ptr<WaylandConfig> new_config, struct XdgStructAgg& 
xdg_agg):
+        const EGLUtil<struct wl_display, struct wl_egl_window>* egl, 
std::unique_ptr<Image> new_image,
+        std::shared_ptr<WaylandConfig> new_config, struct XdgStructAgg* 
xdg_agg):
 compositor(compositor),
 xdg_base(xdg_base),
 surface(wl_compositor_create_surface(compositor)),
@@ -62,12 +62,12 @@
 
 void WaylandEglWindow::opengl_cleanup()
 {
-    egl.run_contained(egl_context, egl_surface, [this] {
+    egl->run_contained(egl_context, egl_surface, [this] {
         glDeleteTextures(1, &texture);
         glDeleteFramebuffers(1, &fbo);
     });
-    eglDestroySurface(egl.display, egl_surface);
-    eglDestroyContext(egl.display, egl_context);
+    eglDestroySurface(egl->display, egl_surface);
+    eglDestroyContext(egl->display, egl_context);
 }
 
 void WaylandEglWindow::finish_init()
@@ -75,25 +75,25 @@
     auto xdg = std::make_unique<XdgStruct>();
     xdg->ptr = weak_from_this();
     this_ptr = xdg.get();
-    xdg_agg.ptrs.push_back(std::move(xdg));
+    xdg_agg->ptrs.push_back(std::move(xdg));
     setup_listeners();
     visible = true;
 }
 
 void WaylandEglWindow::opengl_setup()
 {
-    egl_surface = egl.create_surface(egl_window);
+    egl_surface = egl->create_surface(egl_window);
     if (egl_surface == EGL_NO_SURFACE) {
         throw std::runtime_error("");
     }
 
-    egl_context = egl.create_context(egl_surface);
+    egl_context = egl->create_context(egl_surface);
     if (egl_context == EGL_NO_CONTEXT) {
         throw std::runtime_error("");
     }
 
-    egl.run_contained(egl_surface, egl_context, [this] {
-        eglSwapInterval(egl.display, 0);
+    egl->run_contained(egl_surface, egl_context, [this] {
+        eglSwapInterval(egl->display, 0);
         glGenFramebuffers(1, &fbo);
         glGenTextures(1, &texture);
     });
@@ -151,15 +151,15 @@
 void WaylandEglWindow::load_framebuffer()
 {
     std::scoped_lock lock {egl_mutex};
-    egl.run_contained(egl_surface, egl_context, [this] {
-        egl.get_texture_from_image(*image, texture);
+    egl->run_contained(egl_surface, egl_context, [this] {
+        egl->get_texture_from_image(*image, texture);
         glBindFramebuffer(GL_READ_FRAMEBUFFER, fbo);
         glFramebufferTexture2D(GL_READ_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
                 GL_TEXTURE_2D, texture, 0);
         glBlitFramebuffer(0, 0, image->width(), image->height(), 0, 0, 
image->width(), image->height(),
                       GL_COLOR_BUFFER_BIT, GL_NEAREST);
 
-        eglSwapBuffers(egl.display, egl_surface);
+        eglSwapBuffers(egl->display, egl_surface);
     });
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ueberzugpp-2.9.1/src/canvas/wayland/window/waylandegl.hpp 
new/ueberzugpp-2.9.2/src/canvas/wayland/window/waylandegl.hpp
--- old/ueberzugpp-2.9.1/src/canvas/wayland/window/waylandegl.hpp       
2023-08-19 06:41:57.000000000 +0200
+++ new/ueberzugpp-2.9.2/src/canvas/wayland/window/waylandegl.hpp       
2023-09-19 14:23:16.000000000 +0200
@@ -35,8 +35,8 @@
 {
 public:
     WaylandEglWindow(struct wl_compositor *compositor, struct xdg_wm_base 
*xdg_base,
-            EGLUtil<struct wl_display, struct wl_egl_window>& egl, 
std::unique_ptr<Image> new_image,
-            std::shared_ptr<WaylandConfig> new_config, struct XdgStructAgg& 
xdg_agg);
+            const EGLUtil<struct wl_display, struct wl_egl_window>* egl, 
std::unique_ptr<Image> new_image,
+            std::shared_ptr<WaylandConfig> new_config, struct XdgStructAgg* 
xdg_agg);
     ~WaylandEglWindow() override;
     static void xdg_surface_configure(void *data, struct xdg_surface 
*xdg_surface, uint32_t serial);
     static void wl_surface_frame_done(void *data, struct wl_callback 
*callback, uint32_t time);
@@ -64,7 +64,7 @@
     EGLContext egl_context;
 
     struct wl_egl_window *egl_window = nullptr;
-    EGLUtil<struct wl_display, struct wl_egl_window>& egl;
+    const EGLUtil<struct wl_display, struct wl_egl_window>* egl;
 
     GLuint texture;
     GLuint fbo;
@@ -74,7 +74,7 @@
 
     std::string appid;
     void* this_ptr;
-    struct XdgStructAgg& xdg_agg;
+    struct XdgStructAgg* xdg_agg;
     bool visible = false;
 
     void move_window();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ueberzugpp-2.9.1/src/canvas/wayland/window/waylandshm.cpp 
new/ueberzugpp-2.9.2/src/canvas/wayland/window/waylandshm.cpp
--- old/ueberzugpp-2.9.1/src/canvas/wayland/window/waylandshm.cpp       
2023-08-19 06:41:57.000000000 +0200
+++ new/ueberzugpp-2.9.2/src/canvas/wayland/window/waylandshm.cpp       
2023-09-19 14:23:16.000000000 +0200
@@ -36,7 +36,7 @@
 
 WaylandShmWindow::WaylandShmWindow(struct wl_compositor *compositor,
         struct wl_shm *wl_shm, struct xdg_wm_base *xdg_base, 
std::unique_ptr<Image> new_image,
-        std::shared_ptr<WaylandConfig> new_config, struct XdgStructAgg& 
xdg_agg):
+        std::shared_ptr<WaylandConfig> new_config, struct XdgStructAgg* 
xdg_agg):
 compositor(compositor),
 xdg_base(xdg_base),
 surface(wl_compositor_create_surface(compositor)),
@@ -57,7 +57,7 @@
     auto xdg = std::make_unique<XdgStruct>();
     xdg->ptr = weak_from_this();
     this_ptr = xdg.get();
-    xdg_agg.ptrs.push_back(std::move(xdg));
+    xdg_agg->ptrs.push_back(std::move(xdg));
     setup_listeners();
     visible = true;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/ueberzugpp-2.9.1/src/canvas/wayland/window/waylandshm.hpp 
new/ueberzugpp-2.9.2/src/canvas/wayland/window/waylandshm.hpp
--- old/ueberzugpp-2.9.1/src/canvas/wayland/window/waylandshm.hpp       
2023-08-19 06:41:57.000000000 +0200
+++ new/ueberzugpp-2.9.2/src/canvas/wayland/window/waylandshm.hpp       
2023-09-19 14:23:16.000000000 +0200
@@ -36,7 +36,7 @@
 public:
     WaylandShmWindow(struct wl_compositor *compositor, struct wl_shm *wl_shm,
             struct xdg_wm_base *xdg_base, std::unique_ptr<Image> new_image,
-            std::shared_ptr<WaylandConfig> new_config, struct XdgStructAgg& 
xdg_agg);
+            std::shared_ptr<WaylandConfig> new_config, struct XdgStructAgg* 
xdg_agg);
     ~WaylandShmWindow() override;
     static void xdg_surface_configure(void *data, struct xdg_surface 
*xdg_surface, uint32_t serial);
     static void wl_surface_frame_done(void *data, struct wl_callback 
*callback, uint32_t time);
@@ -64,7 +64,7 @@
     std::string appid;
     std::shared_ptr<WaylandConfig> config;
 
-    XdgStructAgg& xdg_agg;
+    struct XdgStructAgg* xdg_agg;
     void* this_ptr;
 
     void move_window();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ueberzugpp-2.9.1/src/canvas/x11/window/x11egl.cpp 
new/ueberzugpp-2.9.2/src/canvas/x11/window/x11egl.cpp
--- old/ueberzugpp-2.9.1/src/canvas/x11/window/x11egl.cpp       2023-08-19 
06:41:57.000000000 +0200
+++ new/ueberzugpp-2.9.2/src/canvas/x11/window/x11egl.cpp       2023-09-19 
14:23:16.000000000 +0200
@@ -25,7 +25,7 @@
 #include <gsl/gsl>
 
 X11EGLWindow::X11EGLWindow(xcb_connection_t* connection, xcb_screen_t* screen,
-            xcb_window_t windowid, xcb_window_t parentid, 
EGLUtil<xcb_connection_t, xcb_window_t>& egl,
+            xcb_window_t windowid, xcb_window_t parentid, const 
EGLUtil<xcb_connection_t, xcb_window_t>* egl,
             std::shared_ptr<Image> new_image):
 connection(connection),
 screen(screen),
@@ -41,12 +41,12 @@
 
 X11EGLWindow::~X11EGLWindow()
 {
-    egl.run_contained(egl_surface, egl_context, [this] {
+    egl->run_contained(egl_surface, egl_context, [this] {
         glDeleteTextures(1, &texture);
         glDeleteFramebuffers(1, &fbo);
     });
-    eglDestroySurface(egl.display, egl_surface);
-    eglDestroyContext(egl.display, egl_context);
+    eglDestroySurface(egl->display, egl_surface);
+    eglDestroyContext(egl->display, egl_context);
 
     xcb_destroy_window(connection, windowid);
     xcb_flush(connection);
@@ -79,17 +79,17 @@
 
 void X11EGLWindow::opengl_setup()
 {
-    egl_surface = egl.create_surface(&windowid);
+    egl_surface = egl->create_surface(&windowid);
     if (egl_surface == EGL_NO_SURFACE) {
         throw std::runtime_error("");
     }
 
-    egl_context = egl.create_context(egl_surface);
+    egl_context = egl->create_context(egl_surface);
     if (egl_context == EGL_NO_CONTEXT) {
         throw std::runtime_error("");
     }
 
-    egl.run_contained(egl_surface, egl_context, [this] {
+    egl->run_contained(egl_surface, egl_context, [this] {
         glGenFramebuffers(1, &fbo);
         glGenTextures(1, &texture);
     });
@@ -98,18 +98,18 @@
 void X11EGLWindow::draw()
 {
     const std::scoped_lock lock {egl_mutex};
-    egl.run_contained(egl_surface, egl_context, [this] {
+    egl->run_contained(egl_surface, egl_context, [this] {
         glBlitFramebuffer(0, 0, image->width(), image->height(), 0, 0, 
image->width(), image->height(),
                       GL_COLOR_BUFFER_BIT, GL_NEAREST);
-        eglSwapBuffers(egl.display, egl_surface);
+        eglSwapBuffers(egl->display, egl_surface);
     });
 }
 
 void X11EGLWindow::generate_frame()
 {
     const std::scoped_lock lock {egl_mutex};
-    egl.run_contained(egl_surface, egl_context, [this] {
-        egl.get_texture_from_image(*image, texture);
+    egl->run_contained(egl_surface, egl_context, [this] {
+        egl->get_texture_from_image(*image, texture);
         glBindFramebuffer(GL_READ_FRAMEBUFFER, fbo);
         glFramebufferTexture2D(GL_READ_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
                 GL_TEXTURE_2D, texture, 0);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ueberzugpp-2.9.1/src/canvas/x11/window/x11egl.hpp 
new/ueberzugpp-2.9.2/src/canvas/x11/window/x11egl.hpp
--- old/ueberzugpp-2.9.1/src/canvas/x11/window/x11egl.hpp       2023-08-19 
06:41:57.000000000 +0200
+++ new/ueberzugpp-2.9.2/src/canvas/x11/window/x11egl.hpp       2023-09-19 
14:23:16.000000000 +0200
@@ -32,7 +32,7 @@
 {
 public:
     X11EGLWindow(xcb_connection_t* connection, xcb_screen_t* screen,
-            xcb_window_t windowid, xcb_window_t parentid, 
EGLUtil<xcb_connection_t, xcb_window_t>& egl,
+            xcb_window_t windowid, xcb_window_t parentid, const 
EGLUtil<xcb_connection_t, xcb_window_t>* egl,
             std::shared_ptr<Image> new_image);
     ~X11EGLWindow() override;
 
@@ -47,7 +47,7 @@
     xcb_window_t windowid;
     xcb_window_t parentid;
     std::shared_ptr<Image> image;
-    EGLUtil<xcb_connection_t, xcb_window_t>& egl;
+    const EGLUtil<xcb_connection_t, xcb_window_t>* egl;
 
     GLuint texture;
     GLuint fbo;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ueberzugpp-2.9.1/src/canvas/x11/x11.cpp 
new/ueberzugpp-2.9.2/src/canvas/x11/x11.cpp
--- old/ueberzugpp-2.9.1/src/canvas/x11/x11.cpp 2023-08-19 06:41:57.000000000 
+0200
+++ new/ueberzugpp-2.9.2/src/canvas/x11/x11.cpp 2023-09-19 14:23:16.000000000 
+0200
@@ -180,7 +180,7 @@
 
     const auto image = images.at(identifier);
     const auto dims = image->dimensions();
-    std::unordered_set<xcb_window_t> parent_ids {dims.terminal.x11_wid};
+    std::unordered_set<xcb_window_t> parent_ids {dims.terminal->x11_wid};
     get_tmux_window_ids(parent_ids);
 
     std::ranges::for_each(std::as_const(parent_ids), [this, &identifier, 
&image] (xcb_window_t parent) {
@@ -189,7 +189,7 @@
 #ifdef ENABLE_OPENGL
         if (egl_available) {
             try {
-                window = std::make_shared<X11EGLWindow>(connection, screen, 
window_id, parent, *egl, image);
+                window = std::make_shared<X11EGLWindow>(connection, screen, 
window_id, parent, egl.get(), image);
             } catch (const std::runtime_error& err) {
                 return;
             }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ueberzugpp-2.9.1/src/dimensions.cpp 
new/ueberzugpp-2.9.2/src/dimensions.cpp
--- old/ueberzugpp-2.9.1/src/dimensions.cpp     2023-08-19 06:41:57.000000000 
+0200
+++ new/ueberzugpp-2.9.2/src/dimensions.cpp     2023-09-19 14:23:16.000000000 
+0200
@@ -20,12 +20,12 @@
 
 #include <utility>
 
-Dimensions::Dimensions(const Terminal& terminal, uint16_t xcoord,
+Dimensions::Dimensions(const Terminal* terminal, uint16_t xcoord,
         uint16_t ycoord, int max_w, int max_h, std::string scaler):
 max_w(max_w),
 max_h(max_h),
-padding_horizontal(terminal.padding_horizontal),
-padding_vertical(terminal.padding_vertical),
+padding_horizontal(terminal->padding_horizontal),
+padding_vertical(terminal->padding_vertical),
 scaler(std::move(scaler)),
 terminal(terminal),
 orig_x(xcoord),
@@ -43,20 +43,20 @@
 
 auto Dimensions::xpixels() const -> int
 {
-    return x * terminal.font_width;
+    return x * terminal->font_width;
 }
 
 auto Dimensions::ypixels() const -> int
 {
-    return y * terminal.font_height;
+    return y * terminal->font_height;
 }
 
 auto Dimensions::max_wpixels() const -> int
 {
-    return max_w * terminal.font_width;
+    return max_w * terminal->font_width;
 }
 
 auto Dimensions::max_hpixels() const -> int
 {
-    return max_h * terminal.font_height;
+    return max_h * terminal->font_height;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ueberzugpp-2.9.1/src/image/libvips.cpp 
new/ueberzugpp-2.9.2/src/image/libvips.cpp
--- old/ueberzugpp-2.9.1/src/image/libvips.cpp  2023-08-19 06:41:57.000000000 
+0200
+++ new/ueberzugpp-2.9.2/src/image/libvips.cpp  2023-09-19 14:23:16.000000000 
+0200
@@ -18,6 +18,7 @@
 #include "util.hpp"
 #include "dimensions.hpp"
 #include "flags.hpp"
+#include "terminal.hpp"
 
 #include <unordered_set>
 #include <algorithm>
@@ -169,6 +170,12 @@
 auto LibvipsImage::process_image() -> void
 {
     resize_image();
+    if (flags->origin_center) {
+        const double img_width = static_cast<double>(width()) / 
dims->terminal->font_width;
+        const double img_height = static_cast<double>(height()) / 
dims->terminal->font_height;
+        dims->x -= std::floor(img_width / 2);
+        dims->y -= std::floor(img_height / 2);
+    }
 
     const std::unordered_set<std::string_view> bgra_trifecta = {
         "x11", "chafa", "wayland"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ueberzugpp-2.9.1/src/image/opencv.cpp 
new/ueberzugpp-2.9.2/src/image/opencv.cpp
--- old/ueberzugpp-2.9.1/src/image/opencv.cpp   2023-08-19 06:41:57.000000000 
+0200
+++ new/ueberzugpp-2.9.2/src/image/opencv.cpp   2023-09-19 14:23:16.000000000 
+0200
@@ -18,6 +18,7 @@
 #include "util.hpp"
 #include "dimensions.hpp"
 #include "flags.hpp"
+#include "terminal.hpp"
 
 #include <unordered_set>
 #include <iostream>
@@ -126,6 +127,12 @@
 void OpencvImage::process_image()
 {
     resize_image();
+    if (flags->origin_center) {
+        const double img_width = static_cast<double>(width()) / 
dims->terminal->font_width;
+        const double img_height = static_cast<double>(height()) / 
dims->terminal->font_height;
+        dims->x -= std::floor(img_width / 2);
+        dims->y -= std::floor(img_height / 2);
+    }
 
     const std::unordered_set<std::string_view> bgra_trifecta = {
         "x11", "chafa", "wayland"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ueberzugpp-2.9.1/src/image.cpp 
new/ueberzugpp-2.9.2/src/image.cpp
--- old/ueberzugpp-2.9.1/src/image.cpp  2023-08-19 06:41:57.000000000 +0200
+++ new/ueberzugpp-2.9.2/src/image.cpp  2023-09-19 14:23:16.000000000 +0200
@@ -35,7 +35,7 @@
 namespace fs = std::filesystem;
 using njson = nlohmann::json;
 
-auto Image::load(const njson& command, const Terminal& terminal) -> 
std::unique_ptr<Image>
+auto Image::load(const njson& command, const Terminal* terminal) -> 
std::unique_ptr<Image>
 {
     const std::string& filename = command.at("path");
     if (!fs::exists(filename)) {
@@ -141,7 +141,7 @@
     return std::make_pair(new_width, new_height);
 }
 
-auto Image::get_dimensions(const njson& json, const Terminal& terminal) -> 
std::shared_ptr<Dimensions>
+auto Image::get_dimensions(const njson& json, const Terminal* terminal) -> 
std::shared_ptr<Dimensions>
 {
     using std::string;
     int xcoord = 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ueberzugpp-2.9.1/src/main.cpp 
new/ueberzugpp-2.9.2/src/main.cpp
--- old/ueberzugpp-2.9.1/src/main.cpp   2023-08-19 06:41:57.000000000 +0200
+++ new/ueberzugpp-2.9.2/src/main.cpp   2023-09-19 14:23:16.000000000 +0200
@@ -76,6 +76,7 @@
     layer_command->add_flag("--no-opencv", flags->no_opencv, "Do not use 
OpenCV, use Libvips instead.");
     layer_command->add_option("-o,--output", flags->output, "Image output 
method")
         ->check(CLI::IsMember({"x11", "wayland", "sixel", "kitty", "iterm2", 
"chafa"}));
+    layer_command->add_flag("--origin-center", flags->origin_center, "Location 
of the origin wrt the image");
     layer_command->add_option("-p,--parser", nullptr, "**UNUSED**, only 
present for backwards compatibility.");
     layer_command->add_option("-l,--loader", nullptr, "**UNUSED**, only 
present for backwards compatibility.");
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ueberzugpp-2.9.1/src/util/egl.cpp 
new/ueberzugpp-2.9.2/src/util/egl.cpp
--- old/ueberzugpp-2.9.1/src/util/egl.cpp       2023-08-19 06:41:57.000000000 
+0200
+++ new/ueberzugpp-2.9.2/src/util/egl.cpp       2023-09-19 14:23:16.000000000 
+0200
@@ -140,7 +140,7 @@
 }
 
 template <class T, class V>
-auto EGLUtil<T, V>::create_context(EGLSurface surface) -> EGLContext
+auto EGLUtil<T, V>::create_context(EGLSurface surface) const -> EGLContext
 {
     EGLContext context = eglCreateContext(display, config, EGL_NO_CONTEXT, 
context_attrs.data());
     if (context == EGL_NO_CONTEXT) {
@@ -160,7 +160,7 @@
 }
 
 template <class T, class V>
-auto EGLUtil<T, V>::create_surface(V* native_window) -> EGLSurface
+auto EGLUtil<T, V>::create_surface(V* native_window) const -> EGLSurface
 {
     EGLSurface surface = eglCreatePlatformWindowSurface(display, config, 
native_window, nullptr);
     if (surface == EGL_NO_SURFACE) {
@@ -171,19 +171,19 @@
 }
 
 template <class T, class V>
-void EGLUtil<T, V>::make_current(EGLSurface surface, EGLContext context)
+void EGLUtil<T, V>::make_current(EGLSurface surface, EGLContext context) const
 {
     eglMakeCurrent(display, surface, surface, context);
 }
 
 template <class T, class V>
-void EGLUtil<T, V>::restore()
+void EGLUtil<T, V>::restore() const
 {
     eglMakeCurrent(display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
 }
 
 template <class T, class V>
-void EGLUtil<T, V>::run_contained(EGLSurface surface, EGLContext context, 
const std::function<void()>& func)
+void EGLUtil<T, V>::run_contained(EGLSurface surface, EGLContext context, 
const std::function<void()>& func) const
 {
     make_current(surface, context);
     func();
@@ -191,7 +191,7 @@
 }
 
 template <class T, class V>
-void EGLUtil<T, V>::get_texture_from_image(const Image& image, GLuint texture)
+void EGLUtil<T, V>::get_texture_from_image(const Image& image, GLuint texture) 
const
 {
     glBindTexture(GL_TEXTURE_2D, texture);
 

++++++ ueberzugpp.obsinfo ++++++
--- /var/tmp/diff_new_pack.WIS8zw/_old  2024-02-05 22:01:19.951299116 +0100
+++ /var/tmp/diff_new_pack.WIS8zw/_new  2024-02-05 22:01:19.955299261 +0100
@@ -1,5 +1,5 @@
 name: ueberzugpp
-version: 2.8.3+git20230515.df4e40f
-mtime: 1684189360
-commit: df4e40ff0509447a600ac82d2e9b165ee71a9e22
+version: 2.9.2
+mtime: 1695126196
+commit: 72b8ffee52ef3b5a9b33f627a630d8d9d9a36e7e
 

Reply via email to