Giter Club home page Giter Club logo

Comments (8)

75lb avatar 75lb commented on August 22, 2024 1

small.. if the user has a 40x20 terminal window open, the large one won't fit..

from lws.

tiagostutz avatar tiagostutz commented on August 22, 2024 1

That's correct. I was making a wrong verification here.
Sorry about that.
Thanks!

from lws.

tiagostutz avatar tiagostutz commented on August 22, 2024

Small or Big?

Captura de Tela 2020-05-08 às 15 56 22

from lws.

tiagostutz avatar tiagostutz commented on August 22, 2024

Currently, the behavior is as follows:

  • If the user does not specify the --qr arg, we search for the most suitable private address to use to print the QRCode
  • if the user specifies the --qr arg, we use it to print the QRCode

So, it will always present the QRCode. Maybe we should consider some changes in the args because as the default behavior now is to always print the QRCode, the args should be to hide or configure it. I mean, the user could pass a --no-qr arg to hide it and/or change the used interface using --qr-address (or something like) to specify the network interface.

or

we could keep to --qr using a convention like --qr default automatically choose the privately addressed network interface and if the user does not pass the --qr param the QRCode won't be print.

What do you think?

from lws.

75lb avatar 75lb commented on August 22, 2024

Hi, it should only print the QR code if the user asked for it.

Regular behaviour (no QR):

$ ws

Regular behaviour plus print a QR code with the default network interface:

$ ws --qr

or with a specific interface:

$ ws --qr en1

Does that sound ok?

from lws.

tiagostutz avatar tiagostutz commented on August 22, 2024

I tried this at first, but as the —qr is a String param, if there is no arg for it, it will not come in the config object and hence the user won’t be able to pass only —qr. This way, he/she will have to know the network interface...

Maybe —qr auto to leave the system automatically choose the network interface with private IP address could be an option.

Or is there a way to use —qr as String and Boolean flag at the same time that I’m missing?

from lws.

75lb avatar 75lb commented on August 22, 2024

if --qr was specified, you should receive qr: null in the config object (you can can interpret null to mean "use the default interface").

If the qr property does not exist at all on the config object, then --qr was not set. Clear?

from lws.

75lb avatar 75lb commented on August 22, 2024

The documentation for the type property in the option definition specifies that null is returned, if the option was set but no value was passed.. if this is not the case let me know.

from lws.

Related Issues (7)

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.