Skip to content
Snippets Groups Projects
Commit bc9481f9 authored by Zámolyi Csaba Ferenc's avatar Zámolyi Csaba Ferenc
Browse files

Added example config file

parent 485d3545
Branches
No related tags found
No related merge requests found
...@@ -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)
# 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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment