Giter Club home page Giter Club logo

Comments (5)

KenjiTakahashi avatar KenjiTakahashi commented on July 17, 2024

I meant to go through this some days ago, finally read it out today. My 2 cents on some points.

Ad. 2. Would it make sense to also have an interactive prompt on this? E.g. ask for a new filename after a failed rename. I don't know myself ATM, so it's just a wild thought.
Ad. 3. I'm not sure what this means in practice. @gokcehan could you elaborate a bit on what this is meant to bring us?
Ad. 7. Like I mentioned somewhere earlier, I still plan on implementing event based renews. This is fairly low on my list, though, so I cannot really say when that could happen.

Generally, this sounds very nice :-). Somewhat in line with "push notifications" I briefly mentioned in #13.

from lf.

gokcehan avatar gokcehan commented on July 17, 2024

@KenjiTakahashi In theory, you should be able to ask for a new filename by sending a push command if the name exists (e.g. echo "send $id push :rename<space>" | nc -U /tmp/lf.${USER}.sock). For the conditionals, I don't have a good example in mind but I thought it could be useful if/when we start passing more internals through environmental variables. I don't know, I'm still half regretful that I started this. Some nasty concurrency bugs are popping up that I can't get my head around. I hope we can come up with a working solution for #13 so I can feel better about this.

from lf.

gokcehan avatar gokcehan commented on July 17, 2024

@KenjiTakahashi Ok so here's a somewhat interesting use case for conditionals. Let's say you want to adjust the number of columns on startup based on the width of the attached terminal. You may achive this with something like:

${{
    w=$(tput cols)
    if [ $w -lt 80 ]; then
        echo "send $id set ratios 1:2" | nc -U /tmp/lf.${USER}.sock
    elif [ $w -lt 120 ]; then
        echo "send $id set ratios 1:2:3" | nc -U /tmp/lf.${USER}.sock
    else
        echo "send $id set ratios 1:2:3:4" | nc -U /tmp/lf.${USER}.sock
    fi
}}

At some point we can pass $w variable from lf and maybe values of other options too (e.g. $lf_scrolloff or $lf_previewer).

from lf.

KenjiTakahashi avatar KenjiTakahashi commented on July 17, 2024

Right, now I can see what you meant. Thanks for clarifications.

from lf.

gokcehan avatar gokcehan commented on July 17, 2024

Most things mentioned here are already implemented and others are discusses in their own issues. Closing this issue now.

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.