From 85ae438fbc238fe56bcb1c10a12ec52365053cb6 Mon Sep 17 00:00:00 2001 From: Biswakalyan Bhuyan Date: Sat, 26 Feb 2022 20:31:12 +0530 Subject: dwmbar dotfiles --- modules/daypercentage | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 modules/daypercentage (limited to 'modules/daypercentage') diff --git a/modules/daypercentage b/modules/daypercentage new file mode 100755 index 0000000..97e5eec --- /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) + "%") -- cgit v1.2.3-59-g8ed1b