Repository navigation
Integrate overlapping battery warnings, charger status, and power panel updates #21013
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
Closed
+999
−63
Closed
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
db5e690
Warn about a low battery at 20% as well as 10%
itxkarthik ba0a904
Send the 10% warning after the 20% one's hooks finish
itxkarthik a814b4b
Make low-battery warnings persistent and audible
kairosci f858ffc
Dismiss low-battery warning after recovery
kairosci 49ea389
Handle low-battery dismissal edge cases
kairosci 25ed413
Keep battery alerts transient across shell restarts
kairosci caaa2bb
Retry battery warning after an active send
kairosci 5267c4f
Pin upower locale and parse all time units in omarchy-battery-status
shuruheel 287ad92
Show the Surface Pro 11's battery cycle count from the Surface EC
turbineBMW cdb1c98
Announce when the charger is connected
emrgim 3655060
Keep the charger toast across a short reconnect
emrgim 417cccd
Wait for a battery event after a failed charge-limit write
Cynnamoroll 7730413
Wait for charge-limit events in the regression test
Cynnamoroll 51da86d
Report the charger's rating and the power drawn from it in battery st…
jvdp11 aeae6ca
Show the charger and how its power is shared in the power panel
jvdp11 713b17a
Take the charger split's direction from the battery state, and keep t…
jvdp11 44691f9
Refresh power-panel battery telemetry less often
Cynnamoroll 9ac8c7f
Keep one low-battery latch and let the usage tests compile beside it.
chessing234 55451e7
Serialize low battery warnings and recovery dismissal
chessing234 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| #!/bin/bash | ||
|
|
||
| # omarchy:summary=Dismiss the resolved low-battery warning | ||
| # omarchy:hidden=true | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| omarchy-notification-dismiss "$(omarchy-i18n battery.lowTitle)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| #!/bin/bash | ||
|
|
||
| # omarchy:summary=Announce that the charger was just connected. | ||
| # omarchy:hidden=true | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| # Nerd Font power plug. The icon theme is tried first; this is the fallback. | ||
| glyph=$'\U000f06a5' | ||
| status=$(omarchy-battery-status || true) | ||
|
|
||
| if [[ -n $status ]]; then | ||
| omarchy-notification-send -g "$glyph" -u normal "$(omarchy-i18n battery.chargerConnectedTitle)" "$status" -i ac-adapter --transient | ||
| else | ||
| omarchy-notification-send -g "$glyph" -u normal "$(omarchy-i18n battery.chargerConnectedTitle)" "$(omarchy-i18n battery.chargerConnectedBody)" -i ac-adapter --transient | ||
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...s/battery-low.d/play-warning-sound.sample → ...hy/hooks/battery-low.d/play-warning-sound
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| echo "Enable the default sound for low-battery warnings" | ||
|
|
||
| default_hook="$OMARCHY_PATH/config/omarchy/hooks/battery-low.d/play-warning-sound" | ||
| user_hook="$HOME/.config/omarchy/hooks/battery-low.d/play-warning-sound" | ||
|
|
||
| if [[ -e $user_hook || -L $user_hook ]]; then | ||
| exit 0 | ||
| fi | ||
|
|
||
| [[ -f $default_hook ]] || { | ||
| echo "Waiting for omarchy-settings to provide: $default_hook" >&2 | ||
| exit 75 | ||
| } | ||
|
|
||
| mkdir -p "$(dirname "$user_hook")" | ||
| cp -- "$default_hook" "$user_hook" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.