leits / MeetingBar

🇺🇦 Your meetings at your fingertips in the macOS menu bar
https://meetingbar.app
Apache License 2.0
4.52k stars 201 forks source link

Feature: Customize time format for meeting time in menu bar string #636

Open KaiOelfke opened 1 year ago

KaiOelfke commented 1 year ago

Issue that this suggestion fixes

I have not enough space in my menu bar. A meeting has the following text, if it's happening now:

"Event nam... now (25min left)" (My app is localized in German, so the actual English title is maybe slightly different)

I'd like to be able to customize the title to:

"Event nam... 25m"

Solution description

Provide time format settings from full length to omitted words with only the abbreviated time.

Alternatives considered

Currently I can only enable or disable time in the menu bar title. I want the time, but it should take less space.

Additional context

No response

huyz commented 1 year ago

For me in 22h 51m is still too long. All I need to see is 22h51. Why waste more space?

darthwalsh commented 8 months ago

Have the same problem. Some notes if somebody is interesting in implementing this:

The text 25min or 22h 51m is defined by this formatter: https://github.com/leits/MeetingBar/blob/b28e743c2f118670cadc0710bc2d60b57eb33a3d/MeetingBar/StatusBarItemController.swift#L1013-L1016

Then the (%@ left) seems to come from: https://github.com/leits/MeetingBar/blob/b28e743c2f118670cadc0710bc2d60b57eb33a3d/MeetingBar/StatusBarItemController.swift#L1031-L1033 https://github.com/leits/MeetingBar/blob/b28e743c2f118670cadc0710bc2d60b57eb33a3d/MeetingBar/Resources%20/Localization%20/en.lproj/Localizable.strings#L241


I'm not sure what the UX for this would be. Another option in dropdown Status bar > Time > minimal? I don't know how useful making the time format fully customizable would be. But anybody with a new macbook with the camera notch has only limited menu bar space available, so maybe this new compact format should be the default?

huyz commented 8 months ago

Yeah, I forked and hacked the files myself locally. Pretty easy to build and regular upstream merges have been without conflicts.