HarshKapadia2 / HarshKapadia2/dotfiles
Add `hhtop`
- Dominant language
- Shell
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
# Introduction
`hhtop` is a script to automate `htop`'s config file (`htoprc`) depending on the size of the terminal (no. of cols) and no. of CPUs in the system, by swapping with multiple pre-made `htoprc` files (storage format: `htoprc.*.bkp` files).
# To Do and Notes
- [x] Add `hhtop`, `install` and `uninstall` scripts.
- `hhtop` script options
- No option: Auto-chooses the correct `htoprc`.
- `--orig`: Get back to the `htoprc` before hhtop touched `htoprc`, if it existed, otherwise this just behaves as if no option was passed to the script.
- The `install` script should make the `hhtop` script available directly on the command line and backup the original `htoprc` file as `htoprc.orig.bkp` if it exists.
- TODO: Where should the script be placed?
- Symlinking to `/usr/local/bin` will make it available for use only to the current user even though it will be visible in the directory for all users on the system, so maybe symlinking to that directory doesn't make sense.
- The script can be pasted there, but that has two issues
- If there is an update, the file will have to be replaced by running the `uninstall` script and then the `install` script, but this has the disadvantage of overwriging the `htoprc.orig.bkp` if it existed, which is undesirable.
- If other users want to use the script, the issue will be that the actual `htoprc.*.bkp` files will be located in only one particular user's home directory and that user might not have permissions to user another user's home directory.
- TODO: Is this script meant only for one user on the system or multiple? The answer to this will help decide where to put the `hhtop` script to make it available to the user everywhere.
- The `uninstall` script should remove all traces of hhtop and restore the original `htoprc` file (the `htoprc.orig.bkp` file) if it existed.
- [ ] Document the behaviour
- [x] in the README
- [ ] in the setup script's tool help
# Directory Structure
```
dotfiles
├── hhtop
│ ├── hhtop
│ ├── htoprc.1.bkp
│ ├── htoprc.2.bkp
│ ├── htoprc.3.bkp
│ ├── install
│ └── uninstall
│
│
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.