officially rename package to batmon
This commit is contained in:
parent
de13066a62
commit
c42fccb20a
6 changed files with 35 additions and 15 deletions
|
@ -5,9 +5,9 @@ import (
|
|||
"strings"
|
||||
"time"
|
||||
|
||||
"gomon/internal/exec"
|
||||
"gomon/internal/logger"
|
||||
"gomon/internal/model"
|
||||
"batmon/internal/exec"
|
||||
"batmon/internal/logger"
|
||||
"batmon/internal/model"
|
||||
)
|
||||
|
||||
// battery monitor service
|
||||
|
@ -53,7 +53,7 @@ func Monitor(bat model.Battery, profiles ...string) error {
|
|||
}
|
||||
|
||||
// execute the extra command
|
||||
// if any
|
||||
// if any
|
||||
if bat.ExtraCommand != "" {
|
||||
extraCommandArgs := strings.Split(bat.ExtraCommand, " ")
|
||||
err = exec.ExecCommand(extraCommandArgs[0], extraCommandArgs[1:]...)
|
||||
|
|
|
@ -4,8 +4,8 @@ import (
|
|||
"encoding/json"
|
||||
"os"
|
||||
|
||||
"gomon/internal/logger"
|
||||
"gomon/internal/model"
|
||||
"batmon/internal/logger"
|
||||
"batmon/internal/model"
|
||||
)
|
||||
|
||||
// Load loads the battery configuration from a file.
|
||||
|
|
|
@ -3,7 +3,7 @@ package exec
|
|||
import (
|
||||
"os/exec"
|
||||
|
||||
"gomon/internal/logger"
|
||||
"batmon/internal/logger"
|
||||
)
|
||||
|
||||
// execute a command with args and returns its output
|
||||
|
|
Reference in a new issue