antidrift/README.md

61 lines
1.0 KiB
Markdown
Raw Permalink Normal View History

2022-06-18 21:51:24 +02:00
# AntiDrift
2021-10-13 03:58:56 +02:00
2022-06-18 21:51:24 +02:00
Utilize your computer purposefully.
2021-10-13 03:57:01 +02:00
## Make executable and install
```
pip install pyinstaller --user
pyinstaller --onefile antidrift.py
sudo cp dist/antidrift /usr/bin
```
## Dependencies
- dbus-python
- glib
## Create sudoers configuration
Create a file `antidrift` in `/etc/sudoers.d`. This allows antidrift to run
itself with sudo ultimately making it unkillable from the regular user.
```
user hostname = (root) NOPASSWD: /usr/bin/antidrift
```
## Autostart with systemd
- Create `~/.config/systemd/user/antidrift.service`
- Add configuration below and save
- Run `systemctl --user enable antidrift.service`
```
[Unit]
Description=AntiDrift
[Service]
ExecStart=antidrift
[Install]
WantedBy=default.target
```
## Autostart via desktop file
Create a file `antidrift.desktop` in `/etc/xdg/autostart`.
Add the following content to the file.
```
[Desktop Entry]
Name=AntiDrift
Exec=antidrift
Terminal=false
Type=Application
StartupNotify=false
```
Your window manager will now start antidrift automatically.