feat(phone): 新增自动输入验证码功能
本次提交为 "电话" 应用模块添加了自动输入短信验证码的功能,并提供了相应的用户设置开关。
主要变更:
1. **功能实现 (
* 新增
* 在
* 在
2. **UI 设置 (
* 在 "电话" 功能设置页面中,新增了一个
* 此开关与
3. **文案更新 (
* 新增字符串资源
4. **功能列表更新 (
* 在应用的功能列表中,添加了“自动输入验证码”条目,使其在主界面可见。
现在,用户可以选择是否让应用在收到短信验证码时尝试自动填充到相应的输入框中。
本次提交为 "电话" 应用模块添加了自动输入短信验证码的功能,并提供了相应的用户设置开关。
主要变更:
1. **功能实现 (
SMSCode.kt, CodeWorker.kt):*** 新增
inputCode 布尔变量,用于控制是否启用自动输入验证码功能,默认值为 true。* 在
SMSCode.onInit() 方法中,从 SharedPreferences 加载 inputCode 的用户设置。* 在
CodeWorker.doWork() 方法中,根据 inputCode 的值决定是否执行 AutoInputAction 来自动填充验证码。2. **UI 设置 (
main.kt):*** 在 "电话" 功能设置页面中,新增了一个
FunSwich 开关,允许用户启用或禁用“自动输入验证码”功能。* 此开关与
phone SharedPreferences 中的 inputCode 键绑定。3. **文案更新 (
strings.xml):*** 新增字符串资源
auto_input_verification_code,其值为“自动输入验证码”。4. **功能列表更新 (
Main_Module.kt):*** 在应用的功能列表中,添加了“自动输入验证码”条目,使其在主界面可见。
现在,用户可以选择是否让应用在收到短信验证码时尝试自动填充到相应的输入框中。
🚀 OShin New CI Build!
Refactor(hook): Optimize SystemUI Clock Hook and Improve Readability
This commit refactors the hook for with several improvements focused on code structure, performance, and readability.
Key Changes:
- Configuration Loading:
- Preference values are now read using initialization. This defers reading from until the value is first accessed, potentially improving startup performance if the clock hook is not immediately used.
- Hooking Logic:
- Replaced direct calls (, ) with for a more structured and type-safe approach to reflection.
- Consolidated hook logic:
- now checks upfront and returns early if disabled.
- Separated hook setup into and .
- Introduced to centralize property settings (padding, single line, gravity, font size, line spacing).
- High-frequency update logic is now in a dedicated method.
- Date/Time Formatting:
- Introduced a cache () to reuse formatter instances, reducing object creation overhead for common patterns.
- , , , , and methods now accept the object () as a parameter instead of relying on a class-level variable. This makes the functions more self-contained and predictable.
- Simplified :
- Uses for year format consistently.
- Corrected space handling for non-Chinese locales when is enabled.
- Returns an empty string if no date components are enabled, preventing unnecessary formatter creation.
- Simplified :
- Directly uses the parameter for formatting.
- Simplified and :
- Directly use the parameter.
- Use range expressions () for hour checks in .
- Readability and Structure:
- Divided the class into 配置读取区 (Configuration Reading Area) and 工具变量区 (Utility Variables Area) using comments.
- Renamed some variables for clarity (e.g., to , to ).
- More consistent use of for immutable properties.
- Removed unused variable.
- Renamed field to to avoid confusion with local variables.
- Minor Fixes:
- Ensured is made accessible before invoking in .
- Corrected the year format in for Chinese locales from to for consistency.
These changes aim to make the clock hook more robust, performant, and easier to maintain.
🔗 查看本次提交
Refactor(hook): Optimize SystemUI Clock Hook and Improve Readability
This commit refactors the hook for with several improvements focused on code structure, performance, and readability.
Key Changes:
- Configuration Loading:
- Preference values are now read using initialization. This defers reading from until the value is first accessed, potentially improving startup performance if the clock hook is not immediately used.
- Hooking Logic:
- Replaced direct calls (, ) with for a more structured and type-safe approach to reflection.
- Consolidated hook logic:
- now checks upfront and returns early if disabled.
- Separated hook setup into and .
- Introduced to centralize property settings (padding, single line, gravity, font size, line spacing).
- High-frequency update logic is now in a dedicated method.
- Date/Time Formatting:
- Introduced a cache () to reuse formatter instances, reducing object creation overhead for common patterns.
- , , , , and methods now accept the object () as a parameter instead of relying on a class-level variable. This makes the functions more self-contained and predictable.
- Simplified :
- Uses for year format consistently.
- Corrected space handling for non-Chinese locales when is enabled.
- Returns an empty string if no date components are enabled, preventing unnecessary formatter creation.
- Simplified :
- Directly uses the parameter for formatting.
- Simplified and :
- Directly use the parameter.
- Use range expressions () for hour checks in .
- Readability and Structure:
- Divided the class into 配置读取区 (Configuration Reading Area) and 工具变量区 (Utility Variables Area) using comments.
- Renamed some variables for clarity (e.g., to , to ).
- More consistent use of for immutable properties.
- Removed unused variable.
- Renamed field to to avoid confusion with local variables.
- Minor Fixes:
- Ensured is made accessible before invoking in .
- Corrected the year format in for Chinese locales from to for consistency.
These changes aim to make the clock hook more robust, performant, and easier to maintain.
🔗 查看本次提交
GitHub
Refactor(hook): Optimize SystemUI Clock Hook and Improve Readability · suqi8/OShin@cf5c6bc
This commit refactors the `Clock.kt` hook for `com.android.systemui.statusbar.policy.Clock` with several improvements focused on code structure, performance, and readability.
**Key Changes:**
- *...
**Key Changes:**
- *...
🚀 OShin New CI Build!
Refactor(hook): Update YukiHookAPI usage and minor logic changes in
This commit updates the hook file to use the newer KavaRef API from YukiHookAPI and makes some minor adjustments to the hooking logic.
Key Changes:
- API Migration:
- Replaced direct calls to with for method hooking. This aligns with the recommended KavaRef API for reflection and method finding.
- Updated to in method finders.
- Hook Logic (Minor):
- The code related to modifying 's cloud control record () has been commented out. This was likely an experimental feature or a feature that is no longer needed.
These changes primarily focus on adopting the latest YukiHookAPI patterns for better maintainability and compatibility.
🔗 查看本次提交
Refactor(hook): Update YukiHookAPI usage and minor logic changes in
This commit updates the hook file to use the newer KavaRef API from YukiHookAPI and makes some minor adjustments to the hooking logic.
Key Changes:
- API Migration:
- Replaced direct calls to with for method hooking. This aligns with the recommended KavaRef API for reflection and method finding.
- Updated to in method finders.
- Hook Logic (Minor):
- The code related to modifying 's cloud control record () has been commented out. This was likely an experimental feature or a feature that is no longer needed.
These changes primarily focus on adopting the latest YukiHookAPI patterns for better maintainability and compatibility.
🔗 查看本次提交
GitHub
Refactor(hook): Update YukiHookAPI usage and minor logic changes in `… · suqi8/OShin@1d51498
…games.kt`
This commit updates the `games.kt` hook file to use the newer KavaRef API from YukiHookAPI and makes some minor adjustments to the hooking logic.
**Key Changes:**
- **API Migration:**...
This commit updates the `games.kt` hook file to use the newer KavaRef API from YukiHookAPI and makes some minor adjustments to the hooking logic.
**Key Changes:**
- **API Migration:**...
🚀 OShin New CI Build!
feat(verify): Introduce developer verification dialog
This commit adds a verification dialog displayed on app launch if the current version hasn't been verified. The dialog aims to ensure users obtain the app from the official GitHub source.
Key Changes:
- (New Logic):
- Verification Modes:
- Molecule Mode: Users are presented with a 2D representation of a glucose molecule and must select all chiral carbon atoms.
- , , data classes define the structure.
- provides the glucose data.
- displays the molecule and handles click interactions on carbon atoms. Selected carbons are highlighted.
- defines the set of correct answers.
- Text Mode: Users must input the module's GitHub repository URL.
- is used for input.
- Verification checks if the input contains github.com/suqi8/OShin.
- Dialog Behavior:
- The dialog is shown if and the device language is Chinese.
- is used to switch between Molecule and Text verification modes with vertical slide and fade animations.
- A Switch Mode button allows users to toggle between the two verification methods.
- Upon successful verification in either mode:
- A Verification successful! toast is shown.
- The current is saved to under verifyVersion to prevent the dialog from showing again for this version.
- The dialog is dismissed.
- If verification fails, an appropriate error toast is shown.
- UI Elements:
- is used as the base for the verification dialog.
- and are used for actions and mode switching.
- is used in to draw atoms and bonds.
- Helper functions and assist in rendering the molecule.
- :
- The composable is now called within , triggering the verification flow when the main content is composed.
This feature is intended to guide users to the official distribution channel and acknowledge the developer's work.
🔗 查看本次提交
feat(verify): Introduce developer verification dialog
This commit adds a verification dialog displayed on app launch if the current version hasn't been verified. The dialog aims to ensure users obtain the app from the official GitHub source.
Key Changes:
- (New Logic):
- Verification Modes:
- Molecule Mode: Users are presented with a 2D representation of a glucose molecule and must select all chiral carbon atoms.
- , , data classes define the structure.
- provides the glucose data.
- displays the molecule and handles click interactions on carbon atoms. Selected carbons are highlighted.
- defines the set of correct answers.
- Text Mode: Users must input the module's GitHub repository URL.
- is used for input.
- Verification checks if the input contains github.com/suqi8/OShin.
- Dialog Behavior:
- The dialog is shown if and the device language is Chinese.
- is used to switch between Molecule and Text verification modes with vertical slide and fade animations.
- A Switch Mode button allows users to toggle between the two verification methods.
- Upon successful verification in either mode:
- A Verification successful! toast is shown.
- The current is saved to under verifyVersion to prevent the dialog from showing again for this version.
- The dialog is dismissed.
- If verification fails, an appropriate error toast is shown.
- UI Elements:
- is used as the base for the verification dialog.
- and are used for actions and mode switching.
- is used in to draw atoms and bonds.
- Helper functions and assist in rendering the molecule.
- :
- The composable is now called within , triggering the verification flow when the main content is composed.
This feature is intended to guide users to the official distribution channel and acknowledge the developer's work.
🔗 查看本次提交
GitHub
GitHub - suqi8/OShin: 一个专为ColorOS系统设计的辅助模块
一个专为ColorOS系统设计的辅助模块. Contribute to suqi8/OShin development by creating an account on GitHub.
🚀 OShin New CI Build!
refactor(version): Update version name format
This commit updates the version naming scheme in .
The main version number has been incremented from to .
The fallback version name for non-Git environments has been simplified from to .
The version name format remains (e.g., ).
🔗 查看本次提交
refactor(version): Update version name format
This commit updates the version naming scheme in .
The main version number has been incremented from to .
The fallback version name for non-Git environments has been simplified from to .
The version name format remains (e.g., ).
🔗 查看本次提交
GitHub
refactor(version): Update version name format · suqi8/OShin@2f83e3f
This commit updates the version naming scheme in `app/build.gradle.kts`.
The main version number has been incremented from `15.5` to `15.6`.
The fallback version name for non-Git environments has ...
The main version number has been incremented from `15.5` to `15.6`.
The fallback version name for non-Git environments has ...
🚀 OShin New CI Build!
feat(about): Add new referenced projects
This commit updates the Referenced Projects section in the About page.
New Projects Added:
- Oxygen-Customizer: by DHD2280 (GPL-3.0)
- Capsule: by Kyant0 (Apache-2.0)
🔗 查看本次提交
feat(about): Add new referenced projects
This commit updates the Referenced Projects section in the About page.
New Projects Added:
- Oxygen-Customizer: by DHD2280 (GPL-3.0)
- Capsule: by Kyant0 (Apache-2.0)
🔗 查看本次提交
GitHub
feat(about): Add new referenced projects · suqi8/OShin@07ac326
This commit updates the "Referenced Projects" section in the "About" page.
**New Projects Added:**
- **Oxygen-Customizer:** by DHD2280 (GPL-3.0)
- **Capsule:** ...
**New Projects Added:**
- **Oxygen-Customizer:** by DHD2280 (GPL-3.0)
- **Capsule:** ...
🚀 OShin New CI Build!
Refactor(UI): Update Miuix KMP dependency and replace SmoothRoundedCornerShape
This commit updates the Miuix KMP library to version and replaces all usages of with from the Miuix KMP library. Additionally, the Umeng Common SDK is updated to version .
Key Changes:
- Dependency Updates ():
- version changed from to .
- version changed from to .
- Shape Replacement:
- :
- replaced with for button and card shadows.
- :
- replaced with for the dropdown popup shape.
- :
- replaced with for the switch track clip shape.
- :
- Replaced with for card background and clipping.
- The in now uses with specifically for touch feedback compatibility.
- Updated press feedback logic in to use the new modifier from Miuix KMP utils, along with and . Removed manual pointer input handling for press and long-press, opting for .
- Minor Code Adjustments:
- : Added to the composable.
- :
- Reordered modifiers in : now comes before .
- Imports for and Miuix KMP utils related to old press feedback (, ) were removed, and new ones (, , , , ) were added.
These changes are primarily aimed at leveraging the updated Miuix KMP library components and improving UI consistency and touch feedback handling.
🔗 查看本次提交
Refactor(UI): Update Miuix KMP dependency and replace SmoothRoundedCornerShape
This commit updates the Miuix KMP library to version and replaces all usages of with from the Miuix KMP library. Additionally, the Umeng Common SDK is updated to version .
Key Changes:
- Dependency Updates ():
- version changed from to .
- version changed from to .
- Shape Replacement:
- :
- replaced with for button and card shadows.
- :
- replaced with for the dropdown popup shape.
- :
- replaced with for the switch track clip shape.
- :
- Replaced with for card background and clipping.
- The in now uses with specifically for touch feedback compatibility.
- Updated press feedback logic in to use the new modifier from Miuix KMP utils, along with and . Removed manual pointer input handling for press and long-press, opting for .
- Minor Code Adjustments:
- : Added to the composable.
- :
- Reordered modifiers in : now comes before .
- Imports for and Miuix KMP utils related to old press feedback (, ) were removed, and new ones (, , , , ) were added.
These changes are primarily aimed at leveraging the updated Miuix KMP library components and improving UI consistency and touch feedback handling.
🔗 查看本次提交
GitHub
Refactor(UI): Update Miuix KMP dependency and replace SmoothRoundedCo… · suqi8/OShin@b5a365b
…rnerShape
This commit updates the Miuix KMP library to version `0.5.1` and replaces all usages of `SmoothRoundedCornerShape` with `G2RoundedCornerShape` from the Miuix KMP library. Additionally, ...
This commit updates the Miuix KMP library to version `0.5.1` and replaces all usages of `SmoothRoundedCornerShape` with `G2RoundedCornerShape` from the Miuix KMP library. Additionally, ...
🍌2
🚀 OShin New CI Build!
Refactor(HardwareIndicator): Major overhaul for stability, performance, and UI consistency
This commit introduces a significant refactor of the Hardware Indicator feature for SystemUI. The changes focus on improving resource management, performance, code structure, and the user interface for configuring the indicators.
Key Changes in (Hook Logic):
- Resource Management & Lifecycle:
- Hooks and of the view.
- Resources (TextViews, Runnables, Listeners) for each indicator are now managed in a data class and stored in a map, keyed by the instance.
- function added to explicitly release all resources (remove callbacks, unregister listeners/receivers) when the is detached, preventing memory leaks.
- Performance & Threading:
- Introduced a (single-threaded ) to perform file I/O (reading battery/CPU temperature) off the main thread.
- UI updates are posted back to the main thread using a .
- Preference values are read using initialization for .
- Code Structure & Readability:
- Renamed to .
- Consolidated logic for creating consumption and temperature indicators into and .
- Unified indicator update logic:
- now handles styling updates (font size, bold, alignment) by re-reading prefs.
- handles fetching data in the background and updating the text on the UI thread.
- centralizes the formatting of all hardware data.
- now returns a for better control over starting/stopping updates.
- now manages both the (for color/visibility sync) and a (for configuration changes like dark mode) for all active indicators associated with a .
- More robust error handling for file reading and receiver unregistration.
- Functionality & Bug Fixes:
- Indicators (power, temperature) are now correctly added and removed from the 's parent .
- The insertion position of indicators is calculated more reliably.
- Color and visibility of indicators now consistently sync with the main view.
- Initial color of indicators is set when created.
- Padding and margin adjustments for better visual spacing.
- Uses for method hooking, replacing direct calls.
- Configuration Keys Renamed (Internal):
- Many preference keys used for storing indicator settings have been renamed for clarity and consistency (e.g., to , to ).
Key Changes in (Settings UI):
- State Management:
- Uses with and to manage UI state, directly reflecting preference values.
- object is remembered to avoid repeated calls to .
- UI Structure & Options:
- The list of available content for display () now includes CPU and Battery Temperature, making it consistent for both power and temperature indicators.
- Hide Unit settings are now grouped under a common section for all unit types (Power, Current, Voltage, Battery Temp, CPU Temp).
- Preference keys in , , updated to match the renamed keys in the hook.
- Clarity and Consistency:
- Variable names updated for better readability (e.g., state variable to ).
- More consistent use of to show/hide sections based on whether an indicator is enabled.
Overall Impact:
This refactor makes the Hardware Indicator feature more robust, less prone to resource leaks, and improves its performance by moving I/O operations to a background thread. The settings UI is now more aligned with the underlying preference keys and provides a more consistent user experience.
🔗 查看本次提交
Refactor(HardwareIndicator): Major overhaul for stability, performance, and UI consistency
This commit introduces a significant refactor of the Hardware Indicator feature for SystemUI. The changes focus on improving resource management, performance, code structure, and the user interface for configuring the indicators.
Key Changes in (Hook Logic):
- Resource Management & Lifecycle:
- Hooks and of the view.
- Resources (TextViews, Runnables, Listeners) for each indicator are now managed in a data class and stored in a map, keyed by the instance.
- function added to explicitly release all resources (remove callbacks, unregister listeners/receivers) when the is detached, preventing memory leaks.
- Performance & Threading:
- Introduced a (single-threaded ) to perform file I/O (reading battery/CPU temperature) off the main thread.
- UI updates are posted back to the main thread using a .
- Preference values are read using initialization for .
- Code Structure & Readability:
- Renamed to .
- Consolidated logic for creating consumption and temperature indicators into and .
- Unified indicator update logic:
- now handles styling updates (font size, bold, alignment) by re-reading prefs.
- handles fetching data in the background and updating the text on the UI thread.
- centralizes the formatting of all hardware data.
- now returns a for better control over starting/stopping updates.
- now manages both the (for color/visibility sync) and a (for configuration changes like dark mode) for all active indicators associated with a .
- More robust error handling for file reading and receiver unregistration.
- Functionality & Bug Fixes:
- Indicators (power, temperature) are now correctly added and removed from the 's parent .
- The insertion position of indicators is calculated more reliably.
- Color and visibility of indicators now consistently sync with the main view.
- Initial color of indicators is set when created.
- Padding and margin adjustments for better visual spacing.
- Uses for method hooking, replacing direct calls.
- Configuration Keys Renamed (Internal):
- Many preference keys used for storing indicator settings have been renamed for clarity and consistency (e.g., to , to ).
Key Changes in (Settings UI):
- State Management:
- Uses with and to manage UI state, directly reflecting preference values.
- object is remembered to avoid repeated calls to .
- UI Structure & Options:
- The list of available content for display () now includes CPU and Battery Temperature, making it consistent for both power and temperature indicators.
- Hide Unit settings are now grouped under a common section for all unit types (Power, Current, Voltage, Battery Temp, CPU Temp).
- Preference keys in , , updated to match the renamed keys in the hook.
- Clarity and Consistency:
- Variable names updated for better readability (e.g., state variable to ).
- More consistent use of to show/hide sections based on whether an indicator is enabled.
Overall Impact:
This refactor makes the Hardware Indicator feature more robust, less prone to resource leaks, and improves its performance by moving I/O operations to a background thread. The settings UI is now more aligned with the underlying preference keys and provides a more consistent user experience.
🔗 查看本次提交
GitHub
Refactor(HardwareIndicator): Major overhaul for stability, performanc… · suqi8/OShin@cf88684
…e, and UI consistency
This commit introduces a significant refactor of the Hardware Indicator feature for SystemUI. The changes focus on improving resource management, performance, code structure...
This commit introduces a significant refactor of the Hardware Indicator feature for SystemUI. The changes focus on improving resource management, performance, code structure...
🚀 OShin New CI Build!
Refactor(SystemUI): Reorganize Hardware Indicator Settings and Add Global Options
This commit refactors the Hardware Indicator settings page for SystemUI () to improve structure and introduce global settings for data sources and unit display.
Key Changes:
- :
- Added new string resources for section titles:
- (外观与更新)
- (数据源设置)
- (单位隐藏)
- :
- Introduced Composable:
- A new reusable composable function has been created to encapsulate the common settings for both Power and Temperature indicators. This includes options for:
- Dual row display
- First and second line content
- Bold text
- Alignment
- Update interval
- Font size
- This refactoring significantly reduces code duplication for indicator-specific settings.
- State management for these settings (dual row, line content, alignment) is now handled within using and /, initialized from .
- Reorganized Settings Structure:
- The settings page is now divided into more logical sections:
- Power Indicator: Toggle and its specific settings (now using ).
- Temperature Indicator: Toggle and its specific settings (now using ).
- Global Data Source Settings:
- Moved Dual Cell and Absolute Value (for power) options to this global section.
- Moved Show CPU Temp Data and Change CPU Temp Source options to this global section.
- Global Unit Display Settings:
- Settings to hide units for Power, Current, Voltage, Battery Temperature, and CPU Temperature are now grouped under this global section.
- Removed Redundant State Variables:
- Local and variables for alignment, dual row, and line content specific to power and temperature indicators in the main composable were removed, as this is now handled by the composable.
- UI Flow:
- The blocks for power and temperature indicators now conditionally render the composable.
- New components are used to label the Data Source Settings and Unit Display Settings sections.
This reorganization makes the settings page more modular, easier to understand, and simplifies the management of individual indicator configurations.
🔗 查看本次提交
Refactor(SystemUI): Reorganize Hardware Indicator Settings and Add Global Options
This commit refactors the Hardware Indicator settings page for SystemUI () to improve structure and introduce global settings for data sources and unit display.
Key Changes:
- :
- Added new string resources for section titles:
- (外观与更新)
- (数据源设置)
- (单位隐藏)
- :
- Introduced Composable:
- A new reusable composable function has been created to encapsulate the common settings for both Power and Temperature indicators. This includes options for:
- Dual row display
- First and second line content
- Bold text
- Alignment
- Update interval
- Font size
- This refactoring significantly reduces code duplication for indicator-specific settings.
- State management for these settings (dual row, line content, alignment) is now handled within using and /, initialized from .
- Reorganized Settings Structure:
- The settings page is now divided into more logical sections:
- Power Indicator: Toggle and its specific settings (now using ).
- Temperature Indicator: Toggle and its specific settings (now using ).
- Global Data Source Settings:
- Moved Dual Cell and Absolute Value (for power) options to this global section.
- Moved Show CPU Temp Data and Change CPU Temp Source options to this global section.
- Global Unit Display Settings:
- Settings to hide units for Power, Current, Voltage, Battery Temperature, and CPU Temperature are now grouped under this global section.
- Removed Redundant State Variables:
- Local and variables for alignment, dual row, and line content specific to power and temperature indicators in the main composable were removed, as this is now handled by the composable.
- UI Flow:
- The blocks for power and temperature indicators now conditionally render the composable.
- New components are used to label the Data Source Settings and Unit Display Settings sections.
This reorganization makes the settings page more modular, easier to understand, and simplifies the management of individual indicator configurations.
🔗 查看本次提交
GitHub
Refactor(SystemUI): Reorganize Hardware Indicator Settings and Add Gl… · suqi8/OShin@3cd8e33
…obal Options
This commit refactors the Hardware Indicator settings page for SystemUI (`hardware_indicator.kt`) to improve structure and introduce global settings for data sources and unit display...
This commit refactors the Hardware Indicator settings page for SystemUI (`hardware_indicator.kt`) to improve structure and introduce global settings for data sources and unit display...
🚀 OShin New CI Build!
feat(hardware): Add CPU freq, CPU usage, RAM usage indicators
This commit enhances the hardware indicator feature by adding new data points: CPU frequency, CPU usage, and RAM usage. It also introduces settings to customize their display and data sources.
Key Changes:
- (Hook Logic):
- New Data Fetching:
- : Reads current CPU frequency for a specified core from .
- : Calculates RAM usage percentage based on and from .
- : Calculates CPU usage percentage by comparing total and idle CPU times from between updates. Stores last total and idle times in .
- : Refactored from existing logic to read CPU temperature from .
- Data Formatting & Display:
- updated to include formatted strings for CPU frequency (MHz), CPU usage (%), and RAM usage (%).
- now fetches and passes these new data points to .
- Preferences for hiding units of new indicators (, , ) are respected.
- Resource Passing:
- and now accept to access and for CPU usage calculation.
- (Settings UI):
- New Data Source Settings:
- Change CPU frequency data source ( for ): Allows users to specify which CPU core's frequency to display.
- Show CPU frequency data (): Opens a dialog displaying current frequencies for all available CPU cores.
- composable: Implements the dialog using and to list core names and their frequencies obtained via .
- : Reads frequency data from for all cores.
- data class added.
- New Unit Display Settings:
- Switches () added under Unit Display Settings to toggle visibility of units for:
- CPU Frequency ()
- CPU Usage ()
- RAM Usage ()
- UI Adjustments:
- Updated list to include titles for the new indicators.
- Minor padding adjustments for elements.
- :
- Added new string resources for:
- CPU Frequency, CPU Usage, RAM Usage labels.
- Settings titles and summaries for changing CPU frequency source and showing CPU frequency data.
This update provides users with more comprehensive hardware monitoring capabilities directly in the status bar.
🔗 查看本次提交
feat(hardware): Add CPU freq, CPU usage, RAM usage indicators
This commit enhances the hardware indicator feature by adding new data points: CPU frequency, CPU usage, and RAM usage. It also introduces settings to customize their display and data sources.
Key Changes:
- (Hook Logic):
- New Data Fetching:
- : Reads current CPU frequency for a specified core from .
- : Calculates RAM usage percentage based on and from .
- : Calculates CPU usage percentage by comparing total and idle CPU times from between updates. Stores last total and idle times in .
- : Refactored from existing logic to read CPU temperature from .
- Data Formatting & Display:
- updated to include formatted strings for CPU frequency (MHz), CPU usage (%), and RAM usage (%).
- now fetches and passes these new data points to .
- Preferences for hiding units of new indicators (, , ) are respected.
- Resource Passing:
- and now accept to access and for CPU usage calculation.
- (Settings UI):
- New Data Source Settings:
- Change CPU frequency data source ( for ): Allows users to specify which CPU core's frequency to display.
- Show CPU frequency data (): Opens a dialog displaying current frequencies for all available CPU cores.
- composable: Implements the dialog using and to list core names and their frequencies obtained via .
- : Reads frequency data from for all cores.
- data class added.
- New Unit Display Settings:
- Switches () added under Unit Display Settings to toggle visibility of units for:
- CPU Frequency ()
- CPU Usage ()
- RAM Usage ()
- UI Adjustments:
- Updated list to include titles for the new indicators.
- Minor padding adjustments for elements.
- :
- Added new string resources for:
- CPU Frequency, CPU Usage, RAM Usage labels.
- Settings titles and summaries for changing CPU frequency source and showing CPU frequency data.
This update provides users with more comprehensive hardware monitoring capabilities directly in the status bar.
🔗 查看本次提交
GitHub
feat(hardware): Add CPU freq, CPU usage, RAM usage indicators · suqi8/OShin@fc53efb
This commit enhances the hardware indicator feature by adding new data points: CPU frequency, CPU usage, and RAM usage. It also introduces settings to customize their display and data sources.
**K...
**K...