Comments (6)
Ah, okay. Thought you meant something like, if you run say btm -a
with no config file it would generate a config file with the average_cpu
flag set to true.
Looks good then!
from bottom.
If you accept contributions I would like to tackle this issue, seems like a good first issue
from bottom.
Sure! I thought about doing this originally but wasn't sure what a good way to tackle this was.
from bottom.
The approach I have been using in my projects that use config files is the following:
- the program starts
- looks for a config file
- if it exists, load the config
- if it does not exist, create it with a ready config that has comments around each field (similar to alacritty) and load it
- overwrite the config with commandline flags
- use defaults for missing fields
What do you think?
EDIT: meant override, not overwrite
from bottom.
overwrite the config with commandline flags
While I like the idea behind this part, it's kinda 50/50 for me. I'm just not 100% on setting values for the user without them explicitly knowing that they're set, especially since if an option is set to true on the config file, then there's no way to actually turn the thing off from the command line - only on.
So either notifying the user what values are set, or just (imo the easier solution I guess) leaving it default entirely if we create one is probably what I would rather do.
The rest of it I like though.
from bottom.
What I meant by overwrite the config with commandline flags is what is already currently implemented. If my config file says the temperature should be Kelvin, but I run bottom with btm -c
it will prioritize the Celsius flag and show the temperature in Celsius
from bottom.
Related Issues (20)
- Lock Processes pane selection in place HOT 1
- Add parameter to sort processes by memory HOT 2
- Left/Right in a process tree should collapse/expand the tree branches HOT 5
- QEMU/KVM CPU usage only shown in process list, not in overall CPU usage HOT 1
- Provide an openSUSE installer. HOT 1
- Vivaldi process fails to group due to CLI flags HOT 2
- Please upgrade dependency on toml_edit to branch v0.21 HOT 2
- Incorrect --help text about gruvbox HOT 2
- Arrow keys dont work instantly when --default_widget_type is set to CPU HOT 7
- Add option to save the previously selected widget for next launch
- Support reading lm-sensors configuration HOT 1
- Allow for selecting the average CPU by default when starting bottom HOT 1
- Nightly builds aren't being generated nightly HOT 2
- Use thinner indicators in bar graphs. HOT 6
- Show applied filters in the title bar of the processes widget HOT 1
- Prefer showing more disks than more mount points HOT 4
- Temperature Over Time HOT 5
- json schema support HOT 2
- Output metrics for later plotting and analysis HOT 1
- Make ctrl+c behave like Esc (just like vim) HOT 1
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 bottom.