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.
Introduction
hhtop
is a script to automatehtop
'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-madehtoprc
files (storage format:htoprc.*.bkp
files).To Do and Notes
hhtop
,install
anduninstall
scripts.hhtop
script optionshtoprc
.--orig
: Get back to thehtoprc
before hhtop touchedhtoprc
, if it existed, otherwise this just behaves as if no option was passed to the script.install
script should make thehhtop
script available directly on the command line and backup the originalhtoprc
file ashtoprc.orig.bkp
if it exists./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.uninstall
script and then theinstall
script, but this has the disadvantage of overwriging thehtoprc.orig.bkp
if it existed, which is undesirable.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.hhtop
script to make it available to the user everywhere.uninstall
script should remove all traces of hhtop and restore the originalhtoprc
file (thehtoprc.orig.bkp
file) if it existed.Directory Structure