Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
batteryd
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SystemCshee
batteryd
Commits
bc9481f9
Commit
bc9481f9
authored
Feb 8, 2023
by
Zámolyi Csaba Ferenc
Browse files
Options
Downloads
Patches
Plain Diff
Added example config file
parent
485d3545
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+1
-38
1 addition, 38 deletions
README.md
batteryd.conf.example
+36
-0
36 additions, 0 deletions
batteryd.conf.example
with
37 additions
and
38 deletions
README.md
+
1
−
38
View file @
bc9481f9
...
@@ -25,45 +25,8 @@ Also, this is for learning in a fun, but somewhat productive way.
...
@@ -25,45 +25,8 @@ Also, this is for learning in a fun, but somewhat productive way.
### Configuration
### Configuration
`batteryd`
can be configured with a
`batteryd.conf`
file located at
`/etc/syscshee/batteryd.conf`
`batteryd`
can be configured with a
`batteryd.conf`
file located at
`/etc/syscshee/batteryd.conf`
##### Example configuration
An example can be found in
[
batteryd.conf.example
](
batteryd.conf.example
)
An example of a
`batteryd.conf`
file:
```
# Example batteryd.conf file
# TODO: License
#
# There are three available battery levels: HALF, LOW, CRITICAL and their percentage value can be configured
# The actions can be as follows:
# - "notify": sends a notification to the user and informs them about the battery percentage via notify-send
# - "sleep": suspends system to RAM, waits for a configured amount of time.
# - "shutdown": gracefully shuts down the system, waits for a configured amount of time.
# You can assign more actions to a battery level, separated by commas (no trailing comma and whitespace after comma allowed)
# The daemon will execute the actions in the order they are specified so "shutdown,notify" will not make any sense
# if WAIT_TIME_SHUTDOWN is set to 0
# HALF battery percentage treshold (usually 50%, but who knows!)
TRESHOLD_HALF=50
# Action to do at HALF battery
ACTION_HALF="notify"
# LOW battery percentage treshold (0-100)
TRESHOLD_LOW=30
# Action to do at LOW battery
ACTION_LOW="notify"
# CRITICAL battery percentage treshold (0-100)
TRESHOLD_CRITICAL=15
ACTION_CRITICAL="notify,sleep"
# Waiting times for actions (in seconds, maximum of 300)
# Waiting time for "sleep" action
WAIT_TIME_SLEEP=30
# Waiting time for "shutdown" action
WAIT_TIME_SHUTDOWN=60
# TODO: more
```
### License
### License
This project uses the
[
GNU General Public License v3.0
](
COPYING
)
This project uses the
[
GNU General Public License v3.0
](
COPYING
)
This diff is collapsed.
Click to expand it.
batteryd.conf.example
0 → 100644
+
36
−
0
View file @
bc9481f9
# Example batteryd.conf file
#
# Copyright (c) 2023, Csaba Zámolyi
# LICENSE: GNU GPL v3.0
#
#
# There are three available battery levels: HALF, LOW, CRITICAL and their percentage value can be configured
# The actions can be as follows:
# - "notify": sends a notification to the user and informs them about the battery percentage via notify-send
# - "sleep": suspends system to RAM, waits for a configured amount of time.
# - "shutdown": gracefully shuts down the system, waits for a configured amount of time.
# You can assign more actions to a battery level, separated by commas (no trailing comma and whitespace after comma allowed)
# The daemon will execute the actions in the order they are specified so "shutdown,notify" will not make any sense
# if WAIT_TIME_SHUTDOWN is set to 0
# HALF battery percentage treshold (usually 50%, but who knows!)
TRESHOLD_HALF=50
# Action to do at HALF battery
ACTION_HALF="notify"
# LOW battery percentage treshold (0-100)
TRESHOLD_LOW=30
# Action to do at LOW battery
ACTION_LOW="notify"
# CRITICAL battery percentage treshold (0-100)
TRESHOLD_CRITICAL=15
ACTION_CRITICAL="notify,sleep"
# Waiting times for actions (in seconds, maximum of 300)
# Waiting time for "sleep" action
WAIT_TIME_SLEEP=30
# Waiting time for "shutdown" action
WAIT_TIME_SHUTDOWN=60
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment