-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom terminal title for Bottom #4
Custom terminal title for Bottom #4
Conversation
For bottom to know that there are no batteries on the system, I added the battery::Manager to the options.rs file because here is the first moment bottom verifies battery configuration by reading the config file, which may or may not contain the battery field, but for a better UX, it doesn't matter what bottom finds in the config file now, if it doesn't retrieve battery data, it just ignores the battery widget all together. If needed, it can be adjusted so that if the config file contains the battery field, it will still show the widget.
I guarded the options.rs in two places for battery module that can be missing in the feature list.
Dynamic battery widget
Revert "Dynamic battery widget"
I added a new option in terminal and in the config file to be able to change the terminal title with any custom one. The user can now add `--title` and the custom title after it or add the `title_to_hostname` field in the config file to set the terminal's name to hostname. If there is no option found, then the name of the terminal will be set to "Bottom".
It builds on macOS, but does not seem to change the title. Might be a macOS problem. Tried on a different terminal app, it works. |
I will test it on macOS as well. Is the rebase needed for the Cargo.toml that has conflicts with master? If so, I added a new crate, |
Yes, due to Cargo.toml. |
Done, there are no more conflicts. |
Send the pull request and post a link to it. |
the name of the terminal, it will be set as before to its path. This behaviour will happen when an error happens inside the `get_use_terminal_name` function as well.
I removed the custom title option for terminal and made it use the hostname when `--title` is used. The title always contains `btm` now. If `--title` or `title_has_hostname = true` (in config file) is not present, then the terminal has the previous behaviour.
Description
A description of the change, what it does, and why it was made. If relevant (such as any change that modifies the UI), please provide screenshots of the changes:
Added an option to change the terminal name. The user can use
--title
, followed by the desired name for the terminal, or usetitle_to_hostname
field (true/false) in the config file to force the name of the terminal to be the name of the host machine. Otherwise, if no option is used, the default name of the terminal will be now "Bottom". It also works while using SSH.Issue
If applicable, what issue does this address?
#ClementTsang#277
Testing
If relevant, please state how this was tested. All changes must be tested to work:
Tested it on multiple platforms. I also used SSH on all of them.
If this is a code change, please also indicate which platforms were tested:
Checklist
If relevant, ensure the following have been met:
cargo fmt
)README.md
, help menu, doc pages, etc.)