Also added 2 new settings (auto_select_fill and auto_select_text) to the theme, in order to select the fill and
text colors of an auto selected widget.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/LGUG2Z/komorebi/pull/1353
**Author:** [@CtByte](https://github.com/CtByte)
**Created:** 3/16/2025
**Status:** ✅ Merged
**Merged:** 4/3/2025
**Merged by:** [@LGUG2Z](https://github.com/LGUG2Z)
**Base:** `master` ← **Head:** `widget_auto_select`
---
### 📝 Commits (1)
- [`9037fcb`](https://github.com/LGUG2Z/komorebi/commit/9037fcb95e3adbed71955ec91ca3452dc65009b3) feat(bar): auto select/hide widget based on value
### 📊 Changes
**11 files changed** (+914 additions, -241 deletions)
<details>
<summary>View changed files</summary>
📝 `komorebi-bar/src/bar.rs` (+91 -56)
📝 `komorebi-bar/src/config.rs` (+12 -0)
📝 `komorebi-bar/src/main.rs` (+4 -0)
📝 `komorebi-bar/src/render.rs` (+15 -0)
📝 `komorebi-bar/src/selected_frame.rs` (+27 -4)
📝 `komorebi-bar/src/widgets/battery.rs` (+39 -18)
📝 `komorebi-bar/src/widgets/cpu.rs` (+29 -10)
📝 `komorebi-bar/src/widgets/memory.rs` (+31 -11)
📝 `komorebi-bar/src/widgets/network.rs` (+252 -88)
📝 `komorebi-bar/src/widgets/storage.rs` (+49 -15)
📝 `schema.bar.json` (+365 -39)
</details>
### 📄 Description
This commit adds new settings to some widgets that allows to auto select/hide them based on their current values.
The cpu/memory/network/storage widgets get a setting that auto selects the widget if the current value/percentage is over a value.
The battery widget gets a setting that auto selects the widget if the current percentage is under a value.
The storage widget gets a setting that auto hides the disk widget if the percentage is under a value.
```json
{
"Memory": {
"enable": true,
"data_refresh_interval": 5,
"label_prefix": "Icon",
"auto_select_over": 40
}
},
{
"Battery": {
"enable": true,
"hide_on_full_charge": true,
"auto_select_under": 15
}
},
{
"Storage": {
"enable": true,
"auto_select_over": 95,
"auto_hide_under": 90
}
},
```
https://github.com/user-attachments/assets/546fdd10-dbc8-464c-8fcb-813dc46c1dc7
Also added 2 new settings (auto_select_fill and auto_select_text) to the theme, in order to select the fill and
text colors of an auto selected widget.
---

```json
"theme": {
"palette": "Base16",
"name": "AyuMirage",
"accent": "Base09",
"auto_select_fill": "Base03",
"auto_select_text": "Base09"
},
```
---

```json
"theme": {
"palette": "Base16",
"name": "Ashes",
"accent": "Base0D",
"auto_select_fill": "Base05",
"auto_select_text": "Base02"
},
```
---

```json
"theme": {
"palette": "Catppuccin",
"name": "Latte",
"accent": "Blue",
"auto_select_fill": "Blue",
"auto_select_text": "Crust"
},
```
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/LGUG2Z/komorebi/pull/1353
Author: @CtByte
Created: 3/16/2025
Status: ✅ Merged
Merged: 4/3/2025
Merged by: @LGUG2Z
Base:
master← Head:widget_auto_select📝 Commits (1)
9037fcbfeat(bar): auto select/hide widget based on value📊 Changes
11 files changed (+914 additions, -241 deletions)
View changed files
📝
komorebi-bar/src/bar.rs(+91 -56)📝
komorebi-bar/src/config.rs(+12 -0)📝
komorebi-bar/src/main.rs(+4 -0)📝
komorebi-bar/src/render.rs(+15 -0)📝
komorebi-bar/src/selected_frame.rs(+27 -4)📝
komorebi-bar/src/widgets/battery.rs(+39 -18)📝
komorebi-bar/src/widgets/cpu.rs(+29 -10)📝
komorebi-bar/src/widgets/memory.rs(+31 -11)📝
komorebi-bar/src/widgets/network.rs(+252 -88)📝
komorebi-bar/src/widgets/storage.rs(+49 -15)📝
schema.bar.json(+365 -39)📄 Description
This commit adds new settings to some widgets that allows to auto select/hide them based on their current values.
The cpu/memory/network/storage widgets get a setting that auto selects the widget if the current value/percentage is over a value.
The battery widget gets a setting that auto selects the widget if the current percentage is under a value.
The storage widget gets a setting that auto hides the disk widget if the percentage is under a value.
https://github.com/user-attachments/assets/546fdd10-dbc8-464c-8fcb-813dc46c1dc7
Also added 2 new settings (auto_select_fill and auto_select_text) to the theme, in order to select the fill and
text colors of an auto selected widget.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.