waveterm
waveterm copied to clipboard
Environment variable widget
Discussed in https://github.com/wavetermdev/waveterm/discussions/1760
Originally posted by svoop January 17, 2025 Here's an idea for a new type of widget: environment variables.
Given you have an environment variable like RUBYOPT which (among many other things) can be used to set the level of verbosity of Ruby. You'd like to manage three states from the widget:
- suppress all warnings:
RUBYOPT="-W0" - show some warnings:
RUBYOPT="-W:no-deprecated -W:no-experimental" - show all warnings:
RUBYOPT=""
The widget configuration would define two or more states and you cycle through them every time you click on the widget. Each state can have a different icon and/or icon color to visualize the current state. And with each state, one (or more) environment variable settings are associated.
This certainly takes some more thinking such as: What happens if the environment variable is already set, overwrite? Merge?