From 3da863e764ad5c4cf8d6bf75b6fd9f948cbc6a43 Mon Sep 17 00:00:00 2001 From: Azalea Gui <22280294+hykilpikonna@users.noreply.github.com> Date: Mon, 7 Oct 2024 07:19:59 -0400 Subject: [PATCH] [+] Time icon --- scripts/bin/time-icon | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 scripts/bin/time-icon diff --git a/scripts/bin/time-icon b/scripts/bin/time-icon new file mode 100755 index 0000000..cd93773 --- /dev/null +++ b/scripts/bin/time-icon @@ -0,0 +1,27 @@ +#!/usr/bin/env python3 +from datetime import datetime + +def get_unicode_time_icon(): + # Get the current hour in 12-hour format + current_hour = datetime.now().strftime("%I") # '%I' gives the hour in 12-hour format + + unicode_icons = { + '01': '', + '02': '', + '03': '', + '04': '', + '05': '', + '06': '', + '07': '', + '08': '', + '09': '', + '10': '', + '11': '', + '12': '', + } + + # Return the icon for the current hour + return unicode_icons.get(current_hour) + +# Example usage +print(get_unicode_time_icon())