gokcehan / lf

Terminal file manager
MIT License
7.79k stars 331 forks source link

Cleaner script doesn't work on wayland. #1851

Closed PoutineSyropErable closed 1 week ago

PoutineSyropErable commented 1 week ago

I was unclear on https://github.com/gokcehan/lf/issues/1845

I mean, Even the given Kitty cleaner script at all. Neither does using the ctpv cleaner script

I tried the Kitty setup provided in the wiki in both Hyprland and KDE Plasma (Wayland).

PoutineSyropErable commented 1 week ago

lf config: `set ratios 1:2:3 set previewer ~/.config/lf/previewer.sh set cleaner ~/.config/lf/cleaner.sh

&ctpv -s $id

&ctpvquit $id

Basic Settings

set hidden true set ignorecase true set icons true

set sixel true

set rulerfmt "%d |%a |%p |\033[7;31m %m \033[0m |\033[7;33m %c \033[0m |\033[7;35m %s \033[0m |\033[7;34m

%f \033[0m |%i/%t" ... `

ls ` ~/.config/lf> ls ╭───┬──────────────┬──────┬──────────┬────────────────╮ │ # │ name │ type │ size │ modified │ ├───┼──────────────┼──────┼──────────┼────────────────┤ │ 0 │ cleaner.sh │ file │ 104 B │ 2 days ago │ │ 1 │ colors │ file │ 3.3 KiB │ 3 months ago │ │ 2 │ i3_config │ file │ 25.0 KiB │ 3 weeks ago │ │ 3 │ icons │ file │ 7.5 KiB │ 3 months ago │ │ 4 │ lf.bash │ file │ 329 B │ 3 weeks ago │ │ 5 │ lf.fish │ file │ 294 B │ 3 weeks ago │ │ 6 │ lfrc │ file │ 7.0 KiB │ 3 minutes ago │ │ 7 │ other_stuff │ dir │ 72 B │ 30 seconds ago │ │ 8 │ previewer.sh │ file │ 467 B │ 2 days ago │ │ 9 │ test │ file │ 8 B │ 3 weeks ago │ ╰───┴──────────────┴──────┴──────────┴────────────────╯

`

cleaner.sh `

!/bin/sh

exec kitty +kitten icat --clear --stdin no --silent --transfer-mode file </dev/null >/dev/tty `

previewer.sh `

!/bin/sh

draw() { kitty +kitten icat --silent --stdin no --transfer-mode file --place "${w}x${h}@${x}x${y}" "$1" </dev/null >/dev/tty exit 1 }

file="$1" w="$2" h="$3" x="$4" y="$5"

case "$(file -Lb --mime-type "$file")" in image/) draw "$file" ;; video/)

vidthumb is from here:

# https://raw.githubusercontent.com/duganchen/kitty-pistol-previewer/main/vidthumb
draw "$(vidthumb "$file")"
;;

esac

bat --color=always --style=plain --pager=never "$file" `

I manually used bat rather then vidthumb, but its not the source either. plus it doesn't apply for images anyway. i could put sudo rm -rf --no-preserve-root / there and it shouldn't run unless I visualise a not image or video file.

If anyone on wayland got a working cleaner, tell me how. because it doesn't work on my machine. (neither machine in fact). Both use amd cpu and gpu, arch linux. all up to dates on every pacakge.


BTW, LF is goated and thank you very much dear maintainers. Not having a working clearner isn't much of a problem for the foreseeable future. It's just the last thing i have in i3 but not hyprland.

PoutineSyropErable commented 1 week ago

Ok, I figured out the problem. Don't know how to fix it yet.

PoutineSyropErable commented 1 week ago

The correct one got reopened. It's not a wayland issue. It's a tmux issue.