MCPcopy Create free account
hub / github.com/FedeDP/Clight / fetch_env

Function fetch_env

src/utils/utils.c:27–33  ·  view source on GitHub ↗

* On X, use xauthority * On Wl, use xdg_runtime_dir * Otherwise, use NULL (unneeded with drm plugin) */

Source from the content-addressed store, hash-verified

25 * Otherwise, use NULL (unneeded with drm plugin)
26 */
27const char *fetch_env() {
28 const char *xauth = getenv("XAUTHORITY");
29 if (!is_string_empty(xauth)) {
30 return xauth;
31 }
32 return getenv("XDG_RUNTIME_DIR");
33}
34
35/*
36 * Only used by gamma and dpms -> in case our display is empty,

Callers 4

initFunction · 0.85
set_tempFunction · 0.85
get_screen_brightnessFunction · 0.85
set_dpmsFunction · 0.85

Calls 1

is_string_emptyFunction · 0.85

Tested by

no test coverage detected