mirror of
https://github.com/2e3s/awatcher.git
synced 2025-06-04 02:20:15 +00:00
Add systemd sample configs and docs
This commit is contained in:
parent
810707cc46
commit
a04578083f
@ -20,6 +20,7 @@ The binaries for the bundle, bundled DEB and ActivityWatch watchers replacement
|
|||||||
- Remove `aw-watcher-window` and `aw-watcher-afk` from autostart at `aw-qt/aw-qt.toml` in [config directory](https://docs.activitywatch.net/en/latest/directories.html#config),
|
- Remove `aw-watcher-window` and `aw-watcher-afk` from autostart at `aw-qt/aw-qt.toml` in [config directory](https://docs.activitywatch.net/en/latest/directories.html#config),
|
||||||
add `aw-awatcher`.
|
add `aw-awatcher`.
|
||||||
- Restart ActivityWatch. In the Modules submenu there should be a new checked module **aw-awatcher**. Note that awatcher shows up in the Web UI under Timeline as `aw-watcher-window_$HOSTNAME`.
|
- Restart ActivityWatch. In the Modules submenu there should be a new checked module **aw-awatcher**. Note that awatcher shows up in the Web UI under Timeline as `aw-watcher-window_$HOSTNAME`.
|
||||||
|
- Optionally, you can use systemd instead of ActivityWatch runner. In this case, skip adding `aw-awatcher` to `aw-qt.toml` and install this service [configuration](https://github.com/2e3s/awatcher/blob/main/config/aw-awatcher.service). In this case, ActivityWatch server also must be managed by systemd (as `aw-server.service` in the config).
|
||||||
|
|
||||||
### Bundle with built-in ActivityWatch
|
### Bundle with built-in ActivityWatch
|
||||||
|
|
||||||
@ -35,6 +36,7 @@ They are controled from the tray, no additional configuration is necessary.
|
|||||||
|
|
||||||
It is recommended to use `~/.config/autostart` for the bundle. This folder is employed by "Autostart" in KDE settings and Gnome Tweaks.
|
It is recommended to use `~/.config/autostart` for the bundle. This folder is employed by "Autostart" in KDE settings and Gnome Tweaks.
|
||||||
Systemd may require to sleep for a few seconds (`ExecStartPre=/bin/sleep 5`) in order to wait for the environment.
|
Systemd may require to sleep for a few seconds (`ExecStartPre=/bin/sleep 5`) in order to wait for the environment.
|
||||||
|
See this service [configuration](https://github.com/2e3s/awatcher/blob/main/config/awatcher.service).
|
||||||
|
|
||||||
## Supported environments
|
## Supported environments
|
||||||
|
|
||||||
|
@ -14,4 +14,4 @@ After=aw-server.service graphical-session.target
|
|||||||
Requires=aw-server.service
|
Requires=aw-server.service
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=graphical-session.target
|
WantedBy=graphical-session.target
|
16
config/awatcher.service
Normal file
16
config/awatcher.service
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
TimeoutStartSec=120
|
||||||
|
ExecStartPre=/bin/sleep 5
|
||||||
|
ExecStart=awatcher
|
||||||
|
Restart=always
|
||||||
|
RestartSec=5
|
||||||
|
RestartSteps=2
|
||||||
|
RestartMaxDelaySec=15
|
||||||
|
|
||||||
|
[Unit]
|
||||||
|
Description=AWatcher
|
||||||
|
After=graphical-session.target
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=graphical-session.target
|
Loading…
x
Reference in New Issue
Block a user