jstkdng / ueberzugpp

Drop in replacement for ueberzug written in C++
GNU General Public License v3.0
762 stars 26 forks source link

Feature parity with OG ueberzug #86

Open jstkdng opened 1 year ago

jstkdng commented 1 year ago

This is an issue to keep track of features that are availabe on ueberzug but aren't in ueberzugpp. If there's something else missing feel free to comment.

Aditional comments

Tokariew commented 1 year ago

https://github.com/munguua/ncmpcpp-ueberzug this project use bash parser and not json, but i ugly fixed in my fork

jstkdng commented 1 year ago

https://github.com/munguua/ncmpcpp-ueberzug

not only is the project dead, it has issues disabled. I think it'd be better for you to improve your fork tbh.

justchokingaround commented 1 year ago

thought id share this, as it seems to fit the discussion (the link to my dotfiles page contains a guide on how to setup ncmpcpp with image preview using zellij and uz++):

image

https://github.com/justchokingaround/dotfiles/tree/main/media/music/ncmpcpp

edit: i forgot this actually doesn't use uz++ 💀, that was for an older implementation i had, it works fine with img2sixel tho

jstkdng commented 1 year ago

i forgot this actually doesn't use uz++

bruh

justchokingaround commented 1 year ago

this was the uz++ implemention i think. tho iirc it was a bit slow:

#!/bin/sh
set -e

max_width=45
max_height=45
preview_method="sixel"

cleanup() {
    ueberzugpp cmd -s "$UB_SOCKET" -a exit
}
trap cleanup HUP INT QUIT TERM PWR EXIT

UB_PID_FILE="/tmp/.$(uuidgen)"
ueberzugpp layer --no-cache -o "$preview_method" --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
while :; do
    title=$(playerctl metadata xesam:url 2>/dev/null | sed -nE "s@.*/(.*)\.(mp3|flac|opus|mkv|m4a)@\1@p")
    if [ -n "$title" ]; then
        path="$HOME/.cache/ncmpcpp/images/""$title.jpg"
        if [ "$old_path" != "$path" ]; then
            tput clear
            ueberzugpp cmd -s "$UB_SOCKET" -a add -i PREVIEW -x 0 -y 0 --max-width "$max_width" --max-height "$max_width" -f "$path"
        fi
        old_path="$path"
        sleep 2
    fi
done