Code Monkey home page Code Monkey logo

Comments (6)

PRESFIL avatar PRESFIL commented on June 3, 2024

You can execute Ex command after vifm starts:

vifmrun --choose-file=picked_file -c ':view'

from vifmimg.

tcftbl avatar tcftbl commented on June 3, 2024

I don't think that fixes my problem or maybe I misunderstood your reply. I'm not sure I worded the issue as well as I could have, so here are some pictures. To simplify the issue I'll drop the argument --choose-file= as the behaviour is present without it.

When running the vifmrun everything works as expected:
1

However when launching urxvt -e vifmrun (from the left terminal window) the preview pops up in the wrong terminal window:
2

When using a graphical browser the preview doesn't appear at all as there is no parent terminal open.

from vifmimg.

PRESFIL avatar PRESFIL commented on June 3, 2024

Everything works for me correctly, the preview appears in the child
window, even if I run urxvt -e vifmrun from another urxvt.

Perhaps you have an old version of vifmimg or ueberzug?

from vifmimg.

tcftbl avatar tcftbl commented on June 3, 2024

As I checked the versions I realized I was using tmux in the terminal. I checked the issue with urxvt without tmux and vifmimg works correctly in the child window. I used the latest version of vifmimg and ueberzug 18.1.9-2 from the arch linux repos.

However the problem for my usecase persists. As with tmux the previews aren't shown when using a browser (in my case qutebrowser). Using the browser the preview area displays the error (I should have mentioned this in my initial post):

/usr/bin/vifmimg: line 9: No such file or directory

This error refers to the line:

printf '{"action": "add", "identifier": "vifm-preview", "x": "%s", "y": "%s", "width": "%s", "height": "%s", "scaler": "contain", "path": "%s"}\n' "$2" "$3" "$4" "$5" "$6" > "$FIFO_UEBERZUG"

Where the arguments are (to my understanding) passed from vifmrc:

...
fileviewer *.pdf
    \ vifmimg pdf %px %py %pw %ph %c
    \ %pc
    \ vifmimg clear
...

So it would seem that for some reason vifm doesn't pass the filename to vifmimg. I'm not sure if this is the same issue as with tmux.

from vifmimg.

PRESFIL avatar PRESFIL commented on June 3, 2024

How do you use vifm and qutebrowser together? Launches one from another?

You need to play it all and see environment variable the FIFO_UEBERZUG value
for vifmrun and others child processes (with htop, for example). Then stat the
resulting path to check it presence. Perhaps you do not have any of the intermediate
directories.

from vifmimg.

tcftbl avatar tcftbl commented on June 3, 2024

Thank you for swift responses @PRESFIL. Yeah qutebrowser launches the urxvt -e vifmrun --choose-files=picked_file command. However fidgeting with ueberzug, vifm and vifmimg seems to have solved the issue, but I have no idea what did it. A bit of a letdown. Sorry.

However the issue with tmux remains when running urxvt -e vifmrun as the pictures in the previous post show. Although interesting on it's own my original issue is now solved.

from vifmimg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.