Conversation
Enhanced the timer a little bit. It will play a recurring bell sound, notify via system notify-send, and flash a bell icon when the timer is up
|
Hi @r14n, thanks for the PR, sorry for the late response. I must've missed some notification. |
amireldor
left a comment
There was a problem hiding this comment.
Hi @r14n and thanks again for the PR.
The guide for my comments was directed by the idea of "let's keep the same previous behavior" so it doesn't break expected behavior for any users who might be using this for some reason. Thanks for the enhancements!
| inner_text = f"{icon}<span font_family='monospace'>{to_display}</span>" | ||
| display_text = f'<span color="green">{inner_text}</span>' | ||
|
|
||
| subprocess.Popen(["paplay", "/usr/share/sounds/freedesktop/stereo/complete.oga"], |
There was a problem hiding this comment.
Please make this filepath customizable via getenv("SOME_NAMING_YOU_CAN_CHOOSE", "1") as in the other options above.
| if seconds_count % 2 == 0: | ||
| icon = "🔔 " |
There was a problem hiding this comment.
I think this should be customizable too (with flashing on/off).
Maybe you can "expand" pomodoro_warning values:
"0" or empty - no pomodoro_warning
"1" - existing behavior
"flashing" - your new logic
| def format_time(seconds_count): | ||
| if seconds_count < 3600: | ||
| minutes = str(int(seconds_count / 60)) | ||
| minutes = str(int(seconds_count / 60)).zfill(2) |
There was a problem hiding this comment.
Sorry to nitpick, I think this should be also customizable via an env var as "zfill on/off" or similar.
| from typing import Tuple | ||
|
|
||
| filename = getenv("I3BLOCKSTIMERTHING_FILE", "/tmp/i3blockstimerthing.txt") | ||
| notified_file = filename + ".notified" |
There was a problem hiding this comment.
Is a new file really necessary? Why not use write_stuff_to_file with a new boolean, and write to it when you need to change the notified value?
I prefer to not "pollute" the filesystem with an additional file.
Enhanced the timer a little bit. It will play a recurring bell sound, notify via system notify-send, and flash a bell icon when the timer is up