added systemd example and docs

This commit is contained in:
Ziad Arafat committed 2026-01-11 13:36:25 -07:00
1 parent 31b4c972d1
commit 7c34a4c501
2 files changed
+43

No files matched your search

+29
View File
@@ -18,3 +18,32 @@ uv sync
uv run konsoltheme --dark_profile "Dark" --light_profile "Light"
```
## Systemd Auto-start
You can use the provided systemd unit file to automatically start the background process when you log in.
1. Create the systemd user directory if it doesn't exist:
```bash
mkdir -p ~/.config/systemd/user/
```
2. Copy or link the service file:
```bash
# Adjust path to where you cloned the repo
ln -s $(pwd)/systemd/user/konsole-daynight.service ~/.config/systemd/user/
```
3. Reload systemd and enable the service:
```bash
systemctl --user daemon-reload
systemctl --user enable --now konsole-daynight.service
```
4. Check the status:
```bash
systemctl --user status konsole-daynight.service
```
> [!NOTE]
> The service file assumes you are using `uv` and the project is located at `~/Documents/src/konsole_daynight`. If your setup is different, you may need to edit the `ExecStart` line in the service file.
+14
View File
@@ -0,0 +1,14 @@
[Unit]
Description=Konsole Day/Night Theme Switcher
After=graphical-session.target
[Service]
Type=simple
# This assumes the user has uv installed and the project is cloned in the standard location.
# Users might need to adjust this path in their local copy.
ExecStart=/usr/bin/env uv run --directory %h/Documents/src/konsole_daynight konsoltheme
Restart=on-failure
RestartSec=5s
[Install]
WantedBy=graphical-session.target