Skip to content

Commit ae903e1

Browse files
author
Oliver Schrenk
committed
Better docs
1 parent d5c362f commit ae903e1

File tree

3 files changed

+49
-48
lines changed

3 files changed

+49
-48
lines changed

DOCS.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# DOCS
2+
3+
> Night Shift automatically shifts the colours of your display to the warmer end of the colour spectrum after dark. This may help you get a better night's sleep.
4+
5+
Under "System Settings > Display > Night Shift" you find the UI controls.
6+
7+
It supports three schedules
8+
9+
1. Off
10+
2. Sunset to Sunrise
11+
3. Custom
12+
13+
When "Off" (`mode: 0`), you can turn it on for a single day toggling "Turn on until "tomorrow"
14+
15+
When "Sunset to Sunrise" (`mode: 1`), the schedule is automatic, and you can toggle it active until the next "sunrise"
16+
17+
When "Custom" (`mode: 2`), you can set a daily schedule, and additionally toggle it active until "tomorrow"
18+
19+
In all three modes, you can select a colour temperature, on a sliding scale between "Less Warm" and "More Warm"
20+
21+
## Technical
22+
23+
The status object
24+
25+
```
26+
var status: Status = Status()
27+
client.getBlueLightStatus(&status)
28+
```
29+
30+
```
31+
// seems to control the temporary setting until tomorrow/sunrise
32+
enabled: true|false
33+
available: true|false
34+
35+
// I guesss this has to do with location based information
36+
sunSchedulePermitted: true|false
37+
disableFlags: 0
38+
mode: 0|1|2
39+
schedule(fromTime(hour,minute),toTime(hour,minute))
40+
```

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ install: release
1818
uninstall:
1919
rm -rf "$(bindir)/$(name)"
2020

21+
# requires `brew install swiftlint`
2122
lint:
2223
swiftlint
2324

README.md

Lines changed: 8 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,6 @@
11
# README
22

3-
A macOS tool to read and control macos Nightshift feature.
4-
5-
> Night Shift automatically shifts the colours of your display to the warmer end of the colour spectrum after dark. This may help you get a better night's sleep.
6-
7-
Under "System Settings > Display > Night Shift" you find the UI controls.
8-
9-
It supports three schedules
10-
11-
1. Off
12-
2. Sunset to Sunrise
13-
3. Custom
14-
15-
When "Off" (`mode: 0`), you can turn it on for a single day toggling "Turn on until "tomorrow"
16-
17-
When "Sunset to Sunrise" (`mode: 1`), the schedule is automatic, and you can toggle it active until the next "sunrise"
18-
19-
When "Custom" (`mode: 2`), you can set a daily schedule, and additionally toggle it active until "tomorrow"
20-
21-
In all three modes, you can select a colour temperature, on a sliding scale between "Less Warm" and "More Warm"
22-
23-
The status object
24-
25-
```
26-
var status: Status = Status()
27-
client.getBlueLightStatus(&status)
28-
```
29-
30-
```
31-
active: true|false
32-
33-
// seems to control the temporary setting until tomorrow/sunrise
34-
enabled: true|false
35-
available: true|false
36-
37-
// I am guesss this has to do with location based information
38-
sunSchedulePermitted: true|false
39-
disableFlags: 0
40-
mode: 0|1|2
41-
schedule(fromTime(hour,minute),toTime(hour,minute))
42-
```
3+
A macOS tool to read and control the [Night Shift](https://support.apple.com/en-us/102191) feature.
434

445
## Usage
456

@@ -52,11 +13,17 @@ Enabled until tomorrow: true
5213
Strength: 0.49
5314
```
5415

16+
Control modes
17+
5518
```
5619
nightshift mode off --temperature 0.4
5720
nightshift mode custom --from 11:00 --to 23:00 --temperature 0.4
5821
nightshift mode sunrise --temperature 0.4
22+
```
23+
24+
Control details
5925

26+
```
6027
nightshift enable
6128
nightshift disable
6229
nightshift temperature
@@ -77,16 +44,9 @@ make install
7744

7845
## Development
7946

80-
**Dependencies**
81-
82-
```
83-
brew install swiftlint
84-
```
85-
8647
- **Build** `make build`
8748
- **Run** `make run`
88-
89-
## Documentation
49+
- **Lint** `make lint`
9050

9151
## Release
9252

0 commit comments

Comments
 (0)