Skip to content

Commit

Permalink
chore: tidyup code
Browse files Browse the repository at this point in the history
Log:
  • Loading branch information
Decodetalkers committed Feb 8, 2024
1 parent 0eff301 commit 5907868
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions system/power1/manager_tlp.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,13 @@ const lowBatteryThreshold = 20.0

func modifyLMTConfig(lines []string, dict map[string]string) ([]string, bool) {
var changed bool
for idx := range lines {
line := lines[idx]
for _, line := range lines {
for key, value := range dict {
if strings.HasPrefix(line, key) {
newLine := key + "=" + value
if line != newLine {
changed = true
lines[idx] = newLine
line = newLine
}
delete(dict, key)
}
Expand Down Expand Up @@ -51,7 +50,6 @@ func (m *Manager) writePowerSavingModeEnabledCb(write *dbusutil.PropertyWrite) *
m.setPropPowerSavingModeAutoWhenBatteryLow(false)
m.PropsMu.Unlock()


// TODO: add tlp part


Expand Down

0 comments on commit 5907868

Please sign in to comment.