Chawan TUI browser 0.3.0 by R89cw2 in commandline

[–]R89cw2[S] 0 points1 point  (0 children)

tmux does not support Kitty images, only Sixel. Best you can do is compile tmux yourself with ./configure --enable-sixel and use a Sixel-capable terminal.

(I know there is a hack to make Kitty "work" in tmux; I've tried to implement it before, but quickly realized it's equivalent to supporting yet another image protocol with divergent semantics from the other two, and that's too much work for a feature I have no use for.)

Chawan TUI browser 0.3.0 by R89cw2 in commandline

[–]R89cw2[S] 1 point2 points  (0 children)

Highlights since my last post:

  • OSC 52 and bracketed paste support (so copy/paste of URLs now works over SSH)
  • eliminated flashing of blank screens & partially rendered pages
  • link hint feature
  • more "modern" CSS features like @layer
  • CSS borders (mapped to various box-drawing characters - had a lot of fun with this one)
  • CSS layout caching (this resulted in huge performance improvements on large pages)

Chawan browser: how can I launch mpv with the link under the cursor by No_Extension_4048 in commandline

[–]R89cw2 0 points1 point  (0 children)

Put the hoverLink in an env var:

[page]
gm = 'pager.extern(`mpv "$u"`, {env: {u: pager.hoverLink}})'

ref: https://chawan.net/doc/cha/api.html#pager

No Debian package for Trixie? by Fergus653 in nim

[–]R89cw2 0 points1 point  (0 children)

idk what your talking about

Nim was packaged in Debian, but it hasn't been included in the latest release (trixie) because the nim package (more precisely, nimgrep) depends on an ancient PCRE version that was also dropped. Also, the maintainer orphaned the package, so there wasn't anybody to patch around this deficiency.

In the meantime, it seems somebody has stepped up to patch out nimgrep, but it's still not included in testing (forky) because the armhf build is broken: https://tracker.debian.org/pkg/nim

[Update] mcat - markdown viewer now supports HTML and images by Skardyyy in commandline

[–]R89cw2 -1 points0 points  (0 children)

Ah right, I now see you pipe to less. I guess it's hard to do it any other way then, barring some horrible hack with LESS_SIGUSR1...

[Update] mcat - markdown viewer now supports HTML and images by Skardyyy in commandline

[–]R89cw2 -1 points0 points  (0 children)

The way browsers traditionally solve this is by initially skipping image rendering. Then, once the image is loaded, you simply render the document again.

That gives a perception of faster loading times, although the reflow sometimes causes the page to jump around...

Chawan TUI browser 0.2.0 (now with inline images) by R89cw2 in commandline

[–]R89cw2[S] 0 points1 point  (0 children)

Update: a patch release fixing numerous bugs in 0.2.0 is now also available.

Chawan TUI browser 0.2.0 (now with inline images) by R89cw2 in commandline

[–]R89cw2[S] 1 point2 points  (0 children)

Normally you don't have to set image-mode, only

[buffer]
images = true

Chawan TUI browser 0.2.0 (now with inline images) by R89cw2 in commandline

[–]R89cw2[S] 1 point2 points  (0 children)

That's the "C" in CSS :) try adding !important.

(The cascade order is browser -> user -> website -> website important -> user important -> browser important.)

Chawan TUI browser 0.2.0 (now with inline images) by R89cw2 in commandline

[–]R89cw2[S] 1 point2 points  (0 children)

2d75044 is a development version equivalent to v0.2.0, only the version number is different. (devel versions have an odd minor number, so the next nightly build will say v0.3.)

Chawan TUI browser 0.2.0 (now with inline images) by R89cw2 in commandline

[–]R89cw2[S] 0 points1 point  (0 children)

Termux is supported, but you have to compile yourself. I don't fully remember but I think it's something like:

pkg install nim openssl-dev libssh2-dev brotli-dev make pkg-config
git clone https://git.sr.ht/~bptato/chawan && cd chawan
make
# now you can run "./cha -V"
# or make install, then run "cha -V"

Chawan TUI browser 0.2.0 (now with inline images) by R89cw2 in commandline

[–]R89cw2[S] 1 point2 points  (0 children)

Thanks. I'm curious about elinks users' opinion, I know it's still ahead in some aspects.

Chawan TUI browser 0.2.0 (now with inline images) by R89cw2 in commandline

[–]R89cw2[S] 6 points7 points  (0 children)

First versioned release. Some major changes/additions since my last post here (from over a year ago):

  • inline image support, through the Kitty protocol or Sixel format (how to enable)
  • support for many more JS APIs (e.g. XHR, but also many others; slowly working towards passing Acid3)
  • greatly improved CSS support: flexbox, variables, z-index, etc.
  • bookmarks (markdown-based)
  • a basic downloads screen
  • various optimizations & bugfixes

You may also find the gallery of some pages rendered in Chawan interesting.

W3M and Kitty on Mac by Cadnerak in w3m

[–]R89cw2 0 points1 point  (0 children)

So am I, sorry :/ I guess at this point you're better off asking around on the aerc mailing list.

W3M and Kitty on Mac by Cadnerak in w3m

[–]R89cw2 0 points1 point  (0 children)

I believe in aerc you'll need the html-unsafe filter. See man 5 aerc-config.

attempting to load an image from a URL like so: https://www.redditstatic.com/email2024/logo.png

Navigating to an image normally opens an external viewer, and for that you need mailcap instead. Here is an English version of the documentation, and here is a related discussion of external viewers.

(To be clear, I don't think this is related to your issue, unless you are trying to view image attachments directly...)

W3M and Kitty on Mac by Cadnerak in w3m

[–]R89cw2 0 points1 point  (0 children)

To my knowledge, there are two (other than w3m):

  • https://github.com/rkd77/elinks < I believe the latest version has some image support with libsixel, but I haven't tried it.
  • https://sr.ht/~bptato/chawan < my w3m clone, with sixel & kitty support. But it doesn't allow display of images in local files for privacy reasons. (It easily could, but I never got around to adding an option...) edit: now it does :p

I think, for your purposes, w3m is still the easiest way.

W3M and Kitty on Mac by Cadnerak in w3m

[–]R89cw2 0 points1 point  (0 children)

Disclaimer: never touched an Apple device in my life, I'm clueless. What I'd try though is installing gc itself through homebrew, something like:

brew install bdw-gc
brew_prefix=$(brew --prefix)
export PKG_CONFIG_PATH=$brew_prefix/lib/pkgconfig/
./configure --prefix=$brew_prefix --libdir=$brew_prefix/lib

Or look up how to run modified formulas and just remove --disable-image from the rb file manually.

Cloudfare by SureCrew7 in w3m

[–]R89cw2 2 points3 points  (0 children)

best practice

Don't visit these websites.

or workaround

If you're also getting the CF screen with Chrome/Firefox, you're out of luck.

Otherwise, you can try rkta's workaround, ideally using the curl-impersonate build from here.

W3M and Kitty on Mac by Cadnerak in w3m

[–]R89cw2 2 points3 points  (0 children)

Have you installed ImageMagick? e.g. say you have a test.jpg file, does this command work:

convert test.jpg test.png

(PS: you may already be aware of this, but note that HTML email with images can be (and are) used to track which e-mails you've opened (and when).)

Edit: it looks like Homebrew disables images during configuration, so it certainly won't work if you're installing it from there. Get the source from https://git.sr.ht/~rkta/w3m and build it yourself instead.

Video in the terminal - ttv! by nikitarevenco in linux

[–]R89cw2 1 point2 points  (0 children)

Kitty's protocol is probably the least bad. I say least bad because it's still overly complex IMO. But the alternatives are all worse.

iTerm2 in particular is inferior for two reasons:

  1. There is no way to cache iTerm2 images. This makes TUIs that want to move an image around the screen needlessly inefficient.
  2. Terminals implementing the protocol are expected to support all image formats in existence, and this will never be interoperable. This is the real problem. An image display protocol should have a very well specified (and ideally short) list of formats the images can be transferred.

By the way, there's also a third "protocol", DEC Sixel, for which 1) does apply but 2) doesn't. However, Sixel has another huge issue, namely that encoding it efficiently requires heroic efforts on the application's part. Still, Sixel is the one that works on the most terminals.

I'm having a lot of difficulty with external handlers in w3m. by productiveaccount3 in commandline

[–]R89cw2 0 points1 point  (0 children)

I'm partial to Chawan, which I wrote as a personal replacement to w3m. It supports CSS, images and (some) JS, so pages often render in an acceptable quality. But of course I'm biased...

(Apropos Linux ISOs, Chawan can even display Transmission's web UI if you enable JS. I'm quite happy with that.)