Skip to content

Commit

Permalink
Merge pull request #416 from Deleranax/main
Browse files Browse the repository at this point in the history
Adding support for battery with key 'BATT'
  • Loading branch information
corecoding authored Mar 29, 2024
2 parents 6fddfe8 + f896657 commit e8b8685
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions prefs.ui
Original file line number Diff line number Diff line change
Expand Up @@ -1222,6 +1222,7 @@
<item translatable="yes">BAT0</item>
<item translatable="yes">BAT1</item>
<item translatable="yes">BAT2</item>
<item translatable="yes">BATT</item>
<item translatable="yes">CMB0</item>
<item translatable="yes">macsmc-battery</item>
</items>
Expand Down
4 changes: 3 additions & 1 deletion sensors.js
Original file line number Diff line number Diff line change
Expand Up @@ -378,9 +378,11 @@ export const Sensors = GObject.registerClass({
// addresses issue #161
let battery_key = 'BAT'; // BAT0, BAT1 and BAT2
if (battery_slot == 3) {
battery_slot = 'T';
} else if (battery_slot == 4) {
battery_key = 'CMB'; // CMB0
battery_slot = 0;
} else if (battery_slot == 4) {
} else if (battery_slot == 5) {
battery_key = 'macsmc-battery'; // supports Asahi linux
battery_slot = '';
}
Expand Down

0 comments on commit e8b8685

Please sign in to comment.