Comments (3)
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.
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.
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)
- [BUG] 68GB logfile HOT 1
- Having issues compiling eww HOT 4
- [FEATURE] Manually trigger defpoll variable update
- [BUG] How can i know the window i want to open HOT 2
- [BUG] Draggable dont work on X11 HOT 6
- Eww gets stuck when :onclick runs a command that closes an eww window. On hypland 0.34.0 [BUG] HOT 11
- [BUG] Error parsing input for jq filter
- [BUG] Extra item in scroll widget
- [BUG] Scrolling up on scale increases it by 2% instead of 1% HOT 1
- [BUG] A JSON number doesn't work in css as a number HOT 5
- [Help] How to add thumb to the Scale widget HOT 3
- [RFC] A better include/import system +modules/namespaces?
- Widget got deallocated HOT 3
- [BUG] First scroll event is swallowed (intentionally?)
- [FEATURE] Auto-focus for input widget HOT 2
- [BUG] The coordinates of the panel cannot exclude the location of bar in x11 HOT 4
- [FEATURE] Keyboard Navigation HOT 1
- [FEATURE] Can't format command strings
- [BUG] The revealer widget doesn't reposition the widget i.e. buttons while they're revealed
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eww.