Dotfiles-dwm/dwmbar/modules/daypercentage

12 lines
205 B
Plaintext
Raw Permalink Normal View History

2024-06-02 11:02:06 +00:00
#!/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) + "%")