1darkman(1)                  General Commands Manual                 darkman(1)
2
3
4

NAME

6       darkman - daemon for dark-mode and light-mode transitions on Linux
7       desktop
8

SYNOPSIS

10       darkman run
11       darkman set [light|dark]
12       darkman get
13       darkman toggle
14

DESCRIPTION

16       darkman runs in the background and turns on night mode at sundown, and
17       turns it off again at sunrise. darkman is not designed to be used in‐
18       teractively: it's designed to be set up once, and run in the back‐
19       ground.
20
21       It is, however, possible trigger manual transitions and even disable
22       automatic transitions entirely.
23

COMMANDS

25       run
26           Runs the darman service. This command is intended to be executed by
27           a service manager, init script or alike.
28
29       set <light|dark>
30           Sets the current mode.
31
32       get
33           Prints the current mode.
34
35       toggle
36           Toggle the current mode.
37

INTEGRATIONS

39       The Linux desktop ecosystem is quite heterogeneous and switching be‐
40       tween dark/light mode on different applications requires different
41       mechanism and techniques.
42
43       Darkman seeks to implement the more widely supported standards, while
44       leaving room for users to hook in custom scripts for other applica‐
45       tions.
46
47       Darkman implements the Freedesktop dark mode standard. Applications us‐
48       ing this API should switch to dark/light mode based on darkman's cur‐
49       rent preference. This standard was originally pushed by the GNOME and
50       Elementary teams, and is currently supported by KDE, Firefox and many
51       other projects. You should expect applications from those environment
52       to support it, amongst others.
53
54       For additional application support, custom scripts can be places in the
55       following two directories:
56
57$XDG_DATA_DIRS/dark-mode.d/: Scripts to run when switching to dark
58           mode.
59$XDG_DATA_DIRS/light-mode.d/: Scripts to run when switching to
60           light mode.
61
62
63       Scripts need to have an executable bit set, or will not be executed.
64
65       For additional sample scripts (and discussion on how to integrate dif‐
66       ferent applications) see the project website:
67
68           https://gitlab.com/WhyNotHugo/darkman
69
70       For custom integrations, darkman exposes a D-Bus API which allows
71       querying and controlling the current mode. The get, set and toggle com‐
72       mands all use this API. Use this API is also the recommended approach
73       when writing custom tools (e.g.: switching the current mode based on
74       the input from a light sensor).
75

LOCATION

77       darkman will automatically determine your location using geoclue. Geo‐
78       clue's reliability varies depending on distribution and desktop envi‐
79       ronment, and it will often not work without a geoclue agent running.
80
81       If using geoclue is not an option, the location may be specified ex‐
82       plicitly via a configuration file.
83

CONFIGURATION

85       A configuration file and all settings are optional. Configuration is
86       read from ~/.config/darkman/config.yaml, and has the following format:
87
88           lat: 52.3
89           lng: 4.8
90           dbusserver: true
91
92       The following settings are available:
93
94lat, lng: Latitude and longitude respectively. This value will be
95           used at start-up, but will later be superseded by whatever geoclue
96           resolves (if enabled). You generally don't need more than one deci‐
97           mal point for your location, as described in
98           https://xkcd.com/2170/.
99
100
101dbusserver (true/false): Whether to expose the current mode via
102           darkman's own D-Bus API. The command line tool uses this API to ap‐
103           ply changes, so it will not work if this setting is disabled.
104
105
106portal (true/false): Whether to expose the current mode via the XDG
107           settings portal D-Bus API. Many desktop application will read the
108           current mode via the portal and respect what darkman is indicating.
109
110
111usegeoclue (true/false): Whether to use a local geoclue instance to
112           determine the current location. On some distributions/setups, this
113           may require setting up a geoclue agent to function properly.
114
115

ENVIRONMENT

117       The following environment variables are also read and will override the
118       configuration file:
119
120       DARKMAN_LAT
121           Overrides the latitude for the current location.
122
123       DARKMAN_LNG
124           Overrides the longitude for the current location.
125
126       DARKMAN_DBUSSERVER
127           Overrides whether to expose the current mode via D-Bus.
128

AUTHORS

130       Developed by Hugo O. Barrera <hugo@whynothugo.nl>, with invaluable con‐
131       tributions from the community.
132
133       darkman is an open source project licensed under the ISC licence and
134       developed for anyone to use freely. If you would like to sponsor this
135       project, see:
136
137           https://liberapay.com/WhyNotHugo/
138
139
140
141                                  2022-06-20                        darkman(1)
Impressum