diff options
| author | Baitinq <30861839+Baitinq@users.noreply.github.com> | 2021-12-21 23:31:37 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-21 23:31:37 +0000 |
| commit | 574f5703c558a56bc9c354471543511255423dc7 (patch) | |
| tree | 3f6e9fd07bab8352edc48d91ab3176225f208457 /modules/daypercentage | |
| parent | 79d7dacd4fb9f06976fc5e5f4f4593e7051e2f1d (diff) | |
Rename daypercentage.py to daypercentage
This is because the script cant be detected if it has an extension
Diffstat (limited to 'modules/daypercentage')
| -rwxr-xr-x | modules/daypercentage | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/modules/daypercentage b/modules/daypercentage new file mode 100755 index 0000000..d97d6d8 --- /dev/null +++ b/modules/daypercentage @@ -0,0 +1,11 @@ +#!/usr/bin/env python3 + +PREFIX = ' ' + +import datetime + +now = datetime.datetime.now() +minutes = now.hour * 60 + now.minute +percentage = round(minutes * 100 / 1440) + +print(PREFIX + str(percentage) + "%") |
