Re: [dev] [announce] ff2sixel: view farbfeld images in terminal
On 3/25/17, Amer wrote: >> It is a bug in st and xterm. tmux and screen handle it by >> reflowing lines, wrapping them if necessary. > > ... And this tmux wrapping is thoroughly broken. > E.g. https://github.com/tmux/tmux/issues/516 > >> dvtm makes end of lines invisible [1] but keeps them in memory. > > But this idea seems reasonable, as standalone from scrollback. > No cropping ever. Ah, how it sounds... > > And what $COLUMNS will you report to term apps? > Some of them (like ps) crop their output themselves. > Some (like cat /proc/self/maps) align data columns on term width. > So, desired effect still won't be achieved. > But if you change $COLUMNS it will break much more of other apps. > > So, no silver bullet. > > indeed. linux terminals will never stop sucking, the concept is too broken. but you can always use a real terminal like the one from plan9port and try to avoid shitty programs that want to know terminal size.
Re: [dev] [announce] ff2sixel: view farbfeld images in terminal
On Sat, Mar 25, 2017 at 09:55:14PM +0200, Amer wrote: > > It is a bug in st and xterm. tmux and screen handle it by > > reflowing lines, wrapping them if necessary. > > ... And this tmux wrapping is thoroughly broken. > E.g. https://github.com/tmux/tmux/issues/516 > > > dvtm makes end of lines invisible [1] but keeps them in memory. > > But this idea seems reasonable, as standalone from scrollback. > No cropping ever. Ah, how it sounds... Ok, I sent patch to ML, you can test it now. > And what $COLUMNS will you report to term apps? > Some of them (like ps) crop their output themselves. > Some (like cat /proc/self/maps) align data columns on term width. > So, desired effect still won't be achieved. > But if you change $COLUMNS it will break much more of other apps. No doubt COLUMNS should report current size.
Re: [dev] [announce] ff2sixel: view farbfeld images in terminal
It is a bug in st and xterm. tmux and screen handle it by reflowing lines, wrapping them if necessary. ... And this tmux wrapping is thoroughly broken. E.g. https://github.com/tmux/tmux/issues/516 dvtm makes end of lines invisible [1] but keeps them in memory. But this idea seems reasonable, as standalone from scrollback. No cropping ever. Ah, how it sounds... And what $COLUMNS will you report to term apps? Some of them (like ps) crop their output themselves. Some (like cat /proc/self/maps) align data columns on term width. So, desired effect still won't be achieved. But if you change $COLUMNS it will break much more of other apps. So, no silver bullet.
Re: [dev] [announce] ff2sixel: view farbfeld images in terminal
On Wed, Mar 22, 2017 at 11:55:33AM +0100, hiro wrote: > example: make the terminal smaller, make it bigger again: lines have > been cut off... It is a bug in st and xterm. tmux and screen handle it by reflowing lines, wrapping them if necessary. dvtm makes end of lines invisible [1] but keeps them in memory. I have already created a patch to fix it in st, will submit it to dev@suckless.org after some cleanup. I implemented dvtm approach. It is simpler, because number of lines always stays the same. Therefore, no lines are removed. And we don't have an option to move them to scrollback, because st has no scrollback. Just a thought: adding scrollback to st can make code simpler and faster. Goal of st is not to have unlimited scrollback buffer [2], but using ring buffer should be ok. Just allocate 1024 lines at the start and use part of them. No need to shuffle lines around in tresize etc. Scrollback patch [3] can be reimplemented along these lines without adding separate history variable. [1] https://github.com/martanne/dvtm/blob/master/vt.c#L129 [2] http://st.suckless.org/goals [3] http://st.suckless.org/patches/scrollback
Re: [dev] [announce] ff2sixel: view farbfeld images in terminal
hiro wrote: > always found linux terminal scrollback buffers unusable, > so I try not to rely on it at all. Makes sense when you can simply tee(1) a dynamic output or less(1) a static one. Especially convenient when searching for compiling errors/warnings. Matter of taste though. -- Cág
Re: [dev] [announce] ff2sixel: view farbfeld images in terminal
what leander says finally makes more sense. sadly scrollback, command history, etc. is way too crude. always found linux terminal scrollback buffers unusable, so I try not to rely on it at all. example: make the terminal smaller, make it bigger again: lines have been cut off... On 3/21/17, Leander S. Harding wrote: > This conversation comes around periodically, and the thing no-one ever > seems to mention is: now these images are in your scrollback and as > you scroll through what you're doing, you seem them instead of just > the reference beginning 'feh ...'. This is really useful if you use > scrollback Matlab-style as a sort of externalized medium-term memory > like I do. > > That doesn't mean I think st should become Terminology, mind, but > there *is* a use-case here. > > Now, while we're dreaming, what'd *really* be useful is a Matlab-style > 'ans' function that pipes out the result of the nth-last command's > stdout/err. ! and friends aren't suitable because the output might be > different on re-run - I'm talking about grabbing what got written to > the terminal since the last shell prompt. > > Should be pretty easy to implement with something like dvtm's select pipe. > > -Leander > > On Mon, Mar 20, 2017 at 2:10 AM, hiro <23h...@gmail.com> wrote: >> why would one want to view images in st, can't your shell start other >> graphical programs for that? is st becoming a new kind of web browser >> now? and why don't you open remote images using a remote file system >> instead of fucking around with remote shells and then trying to >> display them in a local terminal?! >> >> i mean even loonix can do this already. sshfs, qiv (or other proper >> graphical application of your choice). you even have a window manager >> in your same old project here, why not open some windows already? >> >> On 3/20/17, Laslo Hunhold wrote: >>> On Mon, 20 Mar 2017 02:57:20 +0300 >>> Alexander Krotov wrote: >>> >>> Hey Alexander, >>> I have crafted a program to convert farbfeld images to sixels: https://github.com/ilabdsf/ff2sixel >>> >>> this is very cool! Sixels are definitely an interesting concept to view >>> images over an SSH-connection. >>> Too bad st does not have a patch to display sixels, so I am going to use mlterm when I need to browse images. One simple way to implement it in st is to cut out sixel images, convert them back to farbfeld (with separate process) and pass result to lel. Not going to do it now, just an idea. >>> >>> There were discussions on sixel support in st, and I think even some >>> code written for it. Can anybody give a status update on that one? >>> >>> With best regards >>> >>> Laslo >>> >>> -- >>> Laslo Hunhold >>> >>> >> > >
Re: [dev] [announce] ff2sixel: view farbfeld images in terminal
This conversation comes around periodically, and the thing no-one ever seems to mention is: now these images are in your scrollback and as you scroll through what you're doing, you seem them instead of just the reference beginning 'feh ...'. This is really useful if you use scrollback Matlab-style as a sort of externalized medium-term memory like I do. That doesn't mean I think st should become Terminology, mind, but there *is* a use-case here. Now, while we're dreaming, what'd *really* be useful is a Matlab-style 'ans' function that pipes out the result of the nth-last command's stdout/err. ! and friends aren't suitable because the output might be different on re-run - I'm talking about grabbing what got written to the terminal since the last shell prompt. Should be pretty easy to implement with something like dvtm's select pipe. -Leander On Mon, Mar 20, 2017 at 2:10 AM, hiro <23h...@gmail.com> wrote: > why would one want to view images in st, can't your shell start other > graphical programs for that? is st becoming a new kind of web browser > now? and why don't you open remote images using a remote file system > instead of fucking around with remote shells and then trying to > display them in a local terminal?! > > i mean even loonix can do this already. sshfs, qiv (or other proper > graphical application of your choice). you even have a window manager > in your same old project here, why not open some windows already? > > On 3/20/17, Laslo Hunhold wrote: >> On Mon, 20 Mar 2017 02:57:20 +0300 >> Alexander Krotov wrote: >> >> Hey Alexander, >> >>> I have crafted a program to convert farbfeld images to sixels: >>> https://github.com/ilabdsf/ff2sixel >> >> this is very cool! Sixels are definitely an interesting concept to view >> images over an SSH-connection. >> >>> Too bad st does not have a patch to display sixels, so I am going >>> to use mlterm when I need to browse images. One simple way to >>> implement it in st is to cut out sixel images, convert them back >>> to farbfeld (with separate process) and pass result to lel. Not >>> going to do it now, just an idea. >> >> There were discussions on sixel support in st, and I think even some >> code written for it. Can anybody give a status update on that one? >> >> With best regards >> >> Laslo >> >> -- >> Laslo Hunhold >> >> >
Re: [dev] [announce] ff2sixel: view farbfeld images in terminal
On Tue, Mar 21, 2017 at 02:01:16AM +0100, hiro wrote: > I'm not at all saying that sixel is a hack, I'm just saying it's > useless. it doesn't solve any important problem in a generic enough > way. > drawterm is not just a "graphical terminal", it's more more comparable > to remote X11, remote framebuffer, VNC, all of which are rather > generic solutions to display anything, not just terminals or images. Depends on how you define a "graphical terminal". There is such a thing as X terminal [1] and I would classify modern RFB-based "thin clients" as graphical terminals as well. Even drawterm authors called it draw*term*. > it's not impossible to sync the wd on both sides, even though I > wouldn't personally want such a system. you might be able to figure > out a better way to explore your remote system. the possibilities are > endless. Besides cwd one might also want to pass environment variables and things like that to graphical programs. In Plan 9 processes pass the whole namespace to child and it just naturally includes draw device. In unix the closest thing you can probably get is X11 forwarding over SSH, but due to its ad-hoc design it is insecure. [1] https://en.wikipedia.org/wiki/X_terminal
Re: [dev] [announce] ff2sixel: view farbfeld images in terminal
Hi Alexander, > On Mar 20, 2017, at 5:01 PM, Alexander Krotov wrote: > > In my case I have a remote system with lots of data that I want to > explore interactively without copying it to my local machine. While > I can display numerical figures in my terminal, I can't display > plots. It is a limitation of terminal that I worked around with > sixels. Just a suggestion. Have you considered generating HTML index pages and using thttpd and dillo? You could use ssh to create a tunnel for a local socket, to give it the same type of security layer. That way you don't have to have an additional port open to the public. I have done this exact thing for remote data with plots. Maybe it could work for you. Cheers, Ben
Re: [dev] [announce] ff2sixel: view farbfeld images in terminal
I'm not at all saying that sixel is a hack, I'm just saying it's useless. it doesn't solve any important problem in a generic enough way. drawterm is not just a "graphical terminal", it's more more comparable to remote X11, remote framebuffer, VNC, all of which are rather generic solutions to display anything, not just terminals or images. it's not impossible to sync the wd on both sides, even though I wouldn't personally want such a system. you might be able to figure out a better way to explore your remote system. the possibilities are endless.
Re: [dev] [announce] ff2sixel: view farbfeld images in terminal
On Mon, Mar 20, 2017 at 10:10:07AM +0100, hiro wrote: > why would one want to view images in st, can't your shell start other > graphical programs for that? is st becoming a new kind of web browser > now? and why don't you open remote images using a remote file system > instead of fucking around with remote shells and then trying to > display them in a local terminal?! > > i mean even loonix can do this already. sshfs, qiv (or other proper > graphical application of your choice). you even have a window manager > in your same old project here, why not open some windows already? Being able to display graphics does not make terminal a web browser, it makes it a graphical terminal, just like drawterm. SSHFS is different. If I use remote file system I still have to switch to local image viewer and point it to image. It then pulls an image over separate connection, decodes it and displays in another window. And each time I switch working directory in remote shell I have to do the same in local shell or image viewer. In my case I have a remote system with lots of data that I want to explore interactively without copying it to my local machine. While I can display numerical figures in my terminal, I can't display plots. It is a limitation of terminal that I worked around with sixels. I agree that sixels is just a hack not to be included into st. It is not supported by any graphical programs anyway and does not make two-way interaction possible. If I wanted full-blown solution I would probably use remote framebuffer, but I don't want to setup a VNC server on each machine just to display some plots.
Re: [dev] [announce] ff2sixel: view farbfeld images in terminal
You can abuse the Unicode "Braille Patterns" [1] to display binary images on the terminal. I made a demo a while ago [2]. [1] https://en.wikipedia.org/wiki/Braille_Patterns [2] http://imgur.com/VSZ5Pxy 2017-03-20 15:26 GMT-03:00 hiro <23h...@gmail.com>: >> We're here to learn and share > Yes! > >>, so offer constructive feedback. > No! >
Re: [dev] [announce] ff2sixel: view farbfeld images in terminal
> We're here to learn and share Yes! >, so offer constructive feedback. No!
Re: [dev] [announce] ff2sixel: view farbfeld images in terminal
Ah that patch does what I need. Thanks! On 03/20/2017 10:22 PM, Cág wrote: > Aditya Goturu wrote: > >> I personally like it because it won't disturb any window >> layout I had open already. > One could've used the swallow patch[0]. > > There's already Terminology[1], the Eclipse of terminal > emulators. > > [0]: http://dwm.suckless.org/patches/swallow > [1]: https://www.enlightenment.org/about-terminology > > -- > Cág
Re: [dev] [announce] ff2sixel: view farbfeld images in terminal
Aditya Goturu wrote: > I personally like it because it won't disturb any window > layout I had open already. One could've used the swallow patch[0]. There's already Terminology[1], the Eclipse of terminal emulators. [0]: http://dwm.suckless.org/patches/swallow [1]: https://www.enlightenment.org/about-terminology -- Cág
Re: [dev] [announce] ff2sixel: view farbfeld images in terminal
On Mon, Mar 20, 2017, at 10:00, robin wrote: > If only the same honesty could be applied throughout life without bad outcome. No matter how outrageous the contribution of another party, just don't be a dick about it. We're all human. We all think something completely idiotic is a good idea at least fifty or sixty times in our life. We're here to learn and share, so offer constructive feedback.
Re: [dev] [announce] ff2sixel: view farbfeld images in terminal
After I thoroughly reconsidered by window manager configuration, yep I agree On 03/20/2017 07:30 PM, robin wrote: > On Mon, Mar 20, 2017 at 11:16:58AM +0100, hiro wrote: >> there's nothing convenient in your pityful setup. >> >> "won't disturb any window layout I had open already" >> fix your window manager, seems it's not able to manage shit. >> >> that escape you're talking about is called execve and it works just fine. > Man, I love the spirit of suckless (subset of suckless). > If only the same honesty could be applied throughout life without bad outcome.
Re: [dev] [announce] ff2sixel: view farbfeld images in terminal
On Mon, Mar 20, 2017 at 11:16:58AM +0100, hiro wrote: > there's nothing convenient in your pityful setup. > > "won't disturb any window layout I had open already" > fix your window manager, seems it's not able to manage shit. > > that escape you're talking about is called execve and it works just fine. Man, I love the spirit of suckless (subset of suckless). If only the same honesty could be applied throughout life without bad outcome.
Re: [dev] [announce] ff2sixel: view farbfeld images in terminal
there's nothing convenient in your pityful setup. "won't disturb any window layout I had open already" fix your window manager, seems it's not able to manage shit. that escape you're talking about is called execve and it works just fine. On 3/20/17, Aditya Goturu wrote: > One could argue its a little more convenient. I personally like it > because it won't disturb any window layout I had open already. Here's a > thought: Rather than adding all the code to the terminal, a simple patch > could be made which detects a certain escape and will pipe everything > after that for X bytes into some image viewer. That could be another > separate program. And we don't need to use sixel, we just push the raw > farbfeld. > > On 03/20/2017 02:40 PM, hiro wrote: >> why would one want to view images in st, can't your shell start other >> graphical programs for that? is st becoming a new kind of web browser >> now? and why don't you open remote images using a remote file system >> instead of fucking around with remote shells and then trying to >> display them in a local terminal?! >> >> i mean even loonix can do this already. sshfs, qiv (or other proper >> graphical application of your choice). you even have a window manager >> in your same old project here, why not open some windows already? >> >> On 3/20/17, Laslo Hunhold wrote: >>> On Mon, 20 Mar 2017 02:57:20 +0300 >>> Alexander Krotov wrote: >>> >>> Hey Alexander, >>> I have crafted a program to convert farbfeld images to sixels: https://github.com/ilabdsf/ff2sixel >>> this is very cool! Sixels are definitely an interesting concept to view >>> images over an SSH-connection. >>> Too bad st does not have a patch to display sixels, so I am going to use mlterm when I need to browse images. One simple way to implement it in st is to cut out sixel images, convert them back to farbfeld (with separate process) and pass result to lel. Not going to do it now, just an idea. >>> There were discussions on sixel support in st, and I think even some >>> code written for it. Can anybody give a status update on that one? >>> >>> With best regards >>> >>> Laslo >>> >>> -- >>> Laslo Hunhold >>> >>> > > >
Re: [dev] [announce] ff2sixel: view farbfeld images in terminal
One could argue its a little more convenient. I personally like it because it won't disturb any window layout I had open already. Here's a thought: Rather than adding all the code to the terminal, a simple patch could be made which detects a certain escape and will pipe everything after that for X bytes into some image viewer. That could be another separate program. And we don't need to use sixel, we just push the raw farbfeld. On 03/20/2017 02:40 PM, hiro wrote: > why would one want to view images in st, can't your shell start other > graphical programs for that? is st becoming a new kind of web browser > now? and why don't you open remote images using a remote file system > instead of fucking around with remote shells and then trying to > display them in a local terminal?! > > i mean even loonix can do this already. sshfs, qiv (or other proper > graphical application of your choice). you even have a window manager > in your same old project here, why not open some windows already? > > On 3/20/17, Laslo Hunhold wrote: >> On Mon, 20 Mar 2017 02:57:20 +0300 >> Alexander Krotov wrote: >> >> Hey Alexander, >> >>> I have crafted a program to convert farbfeld images to sixels: >>> https://github.com/ilabdsf/ff2sixel >> this is very cool! Sixels are definitely an interesting concept to view >> images over an SSH-connection. >> >>> Too bad st does not have a patch to display sixels, so I am going >>> to use mlterm when I need to browse images. One simple way to >>> implement it in st is to cut out sixel images, convert them back >>> to farbfeld (with separate process) and pass result to lel. Not >>> going to do it now, just an idea. >> There were discussions on sixel support in st, and I think even some >> code written for it. Can anybody give a status update on that one? >> >> With best regards >> >> Laslo >> >> -- >> Laslo Hunhold >> >>
Re: [dev] [announce] ff2sixel: view farbfeld images in terminal
why would one want to view images in st, can't your shell start other graphical programs for that? is st becoming a new kind of web browser now? and why don't you open remote images using a remote file system instead of fucking around with remote shells and then trying to display them in a local terminal?! i mean even loonix can do this already. sshfs, qiv (or other proper graphical application of your choice). you even have a window manager in your same old project here, why not open some windows already? On 3/20/17, Laslo Hunhold wrote: > On Mon, 20 Mar 2017 02:57:20 +0300 > Alexander Krotov wrote: > > Hey Alexander, > >> I have crafted a program to convert farbfeld images to sixels: >> https://github.com/ilabdsf/ff2sixel > > this is very cool! Sixels are definitely an interesting concept to view > images over an SSH-connection. > >> Too bad st does not have a patch to display sixels, so I am going >> to use mlterm when I need to browse images. One simple way to >> implement it in st is to cut out sixel images, convert them back >> to farbfeld (with separate process) and pass result to lel. Not >> going to do it now, just an idea. > > There were discussions on sixel support in st, and I think even some > code written for it. Can anybody give a status update on that one? > > With best regards > > Laslo > > -- > Laslo Hunhold > >
Re: [dev] [announce] ff2sixel: view farbfeld images in terminal
On Mon, 20 Mar 2017 02:57:20 +0300 Alexander Krotov wrote: Hey Alexander, > I have crafted a program to convert farbfeld images to sixels: > https://github.com/ilabdsf/ff2sixel this is very cool! Sixels are definitely an interesting concept to view images over an SSH-connection. > Too bad st does not have a patch to display sixels, so I am going > to use mlterm when I need to browse images. One simple way to > implement it in st is to cut out sixel images, convert them back > to farbfeld (with separate process) and pass result to lel. Not > going to do it now, just an idea. There were discussions on sixel support in st, and I think even some code written for it. Can anybody give a status update on that one? With best regards Laslo -- Laslo Hunhold