1
0
Fork
You've already forked autodarkmode
0
No description
  • C 82.4%
  • Meson 14.5%
  • Shell 3.1%
2025年06月19日 00:47:45 +02:00
misc misc: add dark/light scripts 2024年06月28日 01:44:19 +02:00
src Make gclue dependency optional with build option 2025年06月19日 00:47:45 +02:00
.gitmodules add configuration system 2024年05月28日 19:12:49 +02:00
COPYING add files 2024年05月28日 13:01:13 +02:00
meson.build add license header 2024年05月28日 19:43:28 +02:00
meson_options.txt Make gclue dependency optional with build option 2025年06月19日 00:47:45 +02:00
README.md misc: add dark/light scripts 2024年06月28日 01:44:19 +02:00
xen.nya.autodark.json misc: add dark/light scripts 2024年06月28日 01:44:19 +02:00

autodarkmode

A simple tool to switch between dark and light mode.

It executes a command on switch and nothing else.

Location is either specified by the user or retrieved via geoclue.

It has a constant memory footprint of about 393kb.

Building

meson setup _build
cd build
meson compile

the resulting binary src/autodarkmode can then be moved to any directory in PATH.

Configuration

[main]
; can be 'manual' or 'gclue'
locationtype = "manual"
[manual]
; set latitude and longitude in case that locationtype is set to manual
latitude = -10.0
longitude = -5.0
[light]
; command to execute for light mode
cmd = "notify-send 'a'"
[dark]
; command to execute for dark mode
cmd = "notify-send 'b'"

autodarkmode expects to find this configuration in $XDG_CONFIG_HOME/autodarkmode/config.ini, in the case that XDG_CONFIG_HOME is empty, it will use ~/.config/autodarkmode/config.ini

Misc files

the misc folder contains various scripts/examples that can make setting up autodarkmode easier.

the autodarkmode.service file is a systemd service that can be put in ~/.config/systemd/user/ and enabled through systemctl --user enable autodarkmode to make it automatically launch on login.

the light_<desktop>.sh and dark_<desktop>.sh scripts are already finished scripts that work for the desktop they are made for, they can be extended or just used as is.