Add status message, make colors nice and add auto start instructions.
This commit is contained in:
11
antidrift.py
11
antidrift.py
@@ -1,9 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
""" AntiDrift """
|
||||
|
||||
import logging
|
||||
import shutil
|
||||
import sys
|
||||
import os
|
||||
import signal
|
||||
from pathlib import Path
|
||||
import antidrift.client as client
|
||||
@@ -44,16 +42,17 @@ def check_for_xdotool():
|
||||
|
||||
def main() -> None:
|
||||
""" Main routine that dispatches to client or daemon """
|
||||
config = Config.load("config.yaml")
|
||||
|
||||
config = Config.load(os.path.expanduser("~/.config/antidrift.yaml"))
|
||||
check_for_xdotool()
|
||||
if client.antidrift_daemon_is_running():
|
||||
init_logging(config.client_log_file)
|
||||
client.client_mode(config)
|
||||
else:
|
||||
elif len(sys.argv) == 1:
|
||||
init_logging(config.daemon_log_file)
|
||||
add = AntiDriftDaemon(config)
|
||||
add.run()
|
||||
else:
|
||||
print("ad not running")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user