Code Monkey home page Code Monkey logo

Comments (3)

mantacid avatar mantacid commented on June 13, 2024

After looking a bit more, I realize that this feature has already been suggested, but only in the context of providing options for window creation. The implementation I describe would allow entire configs to be passed when invoking eww open without writing a config to the disk.

from eww.

Swexti avatar Swexti commented on June 13, 2024

I don't really understand the use case here that you can't already do with literals. I feel like a literal is pretty much the same thing, even. A literal is just going to display whatever the command/script returns as if it was yuck, and as long as you're listening to that script it'll update whenever the script changes.

I mean, what would you be able to do with this that you can't with a literal?

Plus, I'm not so sure if I agree with literals being hard to style. You define what classes a given widget is going to have when you make a literal script. And if you're still having difficulties you can always launch the inspector and play around.

from eww.

mantacid avatar mantacid commented on June 13, 2024

I suppose you're right. However, If I wanted to generate any possible window configuration controlled by some other backend, I couldn't just use a literal that pulls from window arguments, as the documentation made it abundantly clear that those are constant and unchanging.

In order for me to pass dynamic content to these "meta-windows" I'd need to pass the NAME of a listener that pulled JSON data from somewhere and have the yuck use it as a call to a variable.

Last I checked that only half worked. Either you'd be able to pass the name but unable to get its value, or you'd pass the value and be unable to get the corresponding NAME to use in eww commands that set its value. But none of this matters if you can't generate and include temporary configurations that store those variables.

Plus, without any way to define variables within a window in terms of scope, and without any real means of introspection, it's not as if I could use the ID of the window as a prefix for a local variable.

In addition to all this, literals have a not insignificant performance impact. Previously I got around this with a bash script that could write configs and JSON to temp files, but that solution was not very pretty and was bound to cause wear on the disk.

from eww.

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.