Giter Club home page Giter Club logo

Comments (10)

KenjiTakahashi avatar KenjiTakahashi commented on July 17, 2024 1

I don't have a strong opinion on this, never liked ranger behaviour much on this, having a square like right now is fine. Having an option to display a printable char instead might be useful when using remotely on machine that doesn't have proper terminfo (so no colors).

from lf.

gokcehan avatar gokcehan commented on July 17, 2024

@tspivey I don't know how termbox handles hidden cursors internally. I will check that and get back to you. I hope this will be possible. Is there a screenreader I can try on linux for this purpose?

from lf.

tspivey avatar tspivey commented on July 17, 2024

Not easily. However, if you run screen, then do control-a :info it will show you the cursor position, with lines and columns starting at 1.

from lf.

gokcehan avatar gokcehan commented on July 17, 2024

@tspivey Ok so it seems that termbox does not set the cursor position when it is set to hidden. I found a workaround for this by setting the cursor position in the original first flush and setting the cursor to hidden in a second one. I'm not pushing this yet as I suspect there is a cheaper way to do this by sending cursor position set codes directly to the terminal. I think it was part of the ansi escape codes standard. I will take a look at it.

from lf.

gokcehan avatar gokcehan commented on July 17, 2024

For future reference, an easy way to display cursor positions in tmux:

set-option -g status-interval 1
set-option -g status-right '#{cursor_x} #{cursor_y}'

from lf.

gokcehan avatar gokcehan commented on July 17, 2024

@tspivey I have pushed a commit now for doing this with ansi escape codes. If you're still up for this, can you give it a try and let me know if it works ok?

from lf.

tspivey avatar tspivey commented on July 17, 2024

I tested briefly, and it seems to work. What goes in the two spaces before the filenames, assuming single column mode (set ratios 1, set nopreview)? Or is that just a border? If so, it might be better to put the cursor on the first character of the filename.

from lf.

KenjiTakahashi avatar KenjiTakahashi commented on July 17, 2024

Counting left from the start of the filename, first space is padding (it just looks better this way, I guess), second one is selection indicator (it will be different color when file is selected with the space key).

from lf.

gokcehan avatar gokcehan commented on July 17, 2024

@KenjiTakahashi @tspivey There used to be a o character to denote marked items in the left most column. When this was the case a space was needed to separate that with the filename. Then at some point I have started to use a colored space instead of a character. We can always alter the design as long as it is functional. ranger changes the color of the filename to yellow when it is marked but then the type of the file is not distinguishable (dir, file, executable etc.). I was thinking maybe we can add a character again along with the color to the marks column so that it would also work in non-colored terminals and screenreaders. We can use | or o or maybe m for this purpose or just make it an option (e.g. markchar) so people can set it back to space char if they want.

from lf.

gokcehan avatar gokcehan commented on July 17, 2024

I have removed the previous implementation as part of #381. It's not a very good idea to directly print escape sequences when termbox is running. Maybe moving to tcell can make this possible. We should also get more feedback about this to make it useful.

from lf.

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.