-
-
Notifications
You must be signed in to change notification settings - Fork 484
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Description of the requested feature
It is currently not possible to initialize basic variables using the output of a shell command. Basic variables can only be initialized using a literal value assignment:
(defvar current-volume 100)
My current workaround is to first spawn a window containing a widget which references the variable, and then updating the variable externally:
eww open my-bar && eww update current-volume=$(pamixer --get-volume)
It would be a nice addition to be able to initialize basic variables from shell output directly in eww.yuck
.
Proposed configuration syntax
This could be accomplished by adding a simple boolean parameter, called for example execute
, to the defvar
-directive:
(defvar current-volume :execute true `pamixer --get-volume`)
If the parameter is true
, the specified string gets executed in a spawned shell, and the shell's output gets assigned to the variable.
Additional context
No response
Edit: fix example code snippet.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request