From ecabc509ff16bd2a64cecf478a7dc542febddb32 Mon Sep 17 00:00:00 2001 From: axtlos Date: Tue, 28 May 2024 22:41:05 +0200 Subject: Add systemd service --- README.md | 5 ++++- misc/autodarkmode.service | 13 +++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 misc/autodarkmode.service diff --git a/README.md b/README.md index a2a5395..fc0f7d2 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,10 @@ 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 + +Location is either specified by the user or retrieved via geoclue. + +It has a constant memory footprint of about 393kb. # Building ``` diff --git a/misc/autodarkmode.service b/misc/autodarkmode.service new file mode 100644 index 0000000..320c09e --- /dev/null +++ b/misc/autodarkmode.service @@ -0,0 +1,13 @@ +[Unit] +Description=autodarkmode - Automatically switch between dark and light mode +PartOf=graphical-session.target +After=graphical-session.target +Requisite=graphical-session.target + +[Service] +ExecStart=autodarkmode +Restart=on-failure + +SystemCallArchitectures=native +MemoryDenyWriteExecute=true +NoNewPrivileges=true -- cgit v1.2.3