AntiDrift is an app that empowers you to utilize your computer mindfully.
Go to file
felixm d97a4885cb Reformat code and add option to add keywords 2023-06-07 17:52:34 -04:00
antidrift Reformat code and add option to add keywords 2023-06-07 17:52:34 -04:00
.gitignore Repurpose FocusFriend to get AntiDrift off the ground. 2022-06-21 21:29:31 -04:00
LICENSE Update license 2022-08-13 09:19:19 -04:00
README.md Add documentation for building antidrift into single executable. 2022-07-23 13:19:14 -04:00
antidrift.code-workspace FocusFriend is now AntiDrift. 2022-06-18 15:51:24 -04:00
antidrift.desktop Clean up spawn as root and CLI interface 2023-05-22 20:48:32 -04:00
main.py Reformat code and add option to add keywords 2023-06-07 17:52:34 -04:00

README.md

AntiDrift

Utilize your computer purposefully.

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.