17 lines
412 B
Python
Executable file
17 lines
412 B
Python
Executable file
#!/bin/python
|
|
|
|
# https://realpython.com/python-subprocess/
|
|
|
|
import subprocess
|
|
from argparse import ArgumentParser
|
|
from time import sleep
|
|
|
|
parser = ArgumentParser()
|
|
parser.add_argument("time", type=int)
|
|
args = parser.parse_args()
|
|
print(f"Starting timer of {args.time} seconds")
|
|
for _ in range(args.time):
|
|
print(".", end="", flush=True)
|
|
sleep(1)
|
|
# print("Done!")
|
|
subprocess.call(["notify-send", "Done!"])
|