summaryrefslogtreecommitdiff
path: root/README.md
blob: 6d97db72bee011d66f38f54dd3186aaabb824868 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Description

HTTP service to control monitor brightness.

# Requirements

* go 1.17.11
* ddcutil 1.2.2
* linux 5.13.16

# Build

``` shell
nix build
```

# Run

```
sudo result/bin/ddcutil-daemon
```

The `ddcutil` binary should run with root privileges, so we use `sudo`.

# Usage

Get current brightness cached value:
```shell
curl 127.0.0.1:49281/set
```

Set brightness to specific value:
```shell
curl --request POST --data '{'value': 5}' 127.0.0.1:49281/set
```

Increase brightness:
```shell
curl --request POST --data '{"value": 5}' 127.0.0.1:49281/increase
```

Decrease brightness:
```shell
curl --request POST --data '{"value": 5}' 127.0.0.1:49281/decrease
```

Toggle brightness between current and minimal values:
```shell
curl --request POST 127.0.0.1:49281/toggle
```