Skip to content
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

DRAFT: lib/battery: rename plugin/battery #2085

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

gaelicWizard
Copy link
Contributor

Description

This plugin only provides utility functions, so it has zero cost to just being enabled. This allows us to eliminate assumptions from lib/theme and several themes.

Motivation and Context

The plugin changes not one thing by being enabled, except providing some utility functions used by a couple of themes. Those themes, and even the themes/base.theme.bash file, have multiple tests to check whether the plugin is loaded or not. Moving the utility functions under lib allows them to be used by the themes without special handling. If the user enables the theme to show the battery, then it should just work without alsö having to enable a plugin.

How Has This Been Tested?

Types of changes

  • Enhancement (non-breaking change which makes things better)

Checklist:

  • My code follows the code style of this project.
  • If my change requires a change to the documentation, I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • If I have added a new file, I also added it to clean_files.txt and formatted it using lint_clean_files.sh.
  • I have added tests to cover my changes, and all the new and existing tests pass.

This plugin *only* provides utility functions, so it has zero cost to just being enabled. This allows us to eliminate assumptions from `lib/theme` and several themes.
- Avoid an error for users who had the battery plugin enabled.
Copy link
Contributor

@seefood seefood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general this looks good. do we close the deal? needs a fresh merge from master first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants