b3by / atom-clock

Place a clock or calendar in your status bar

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature request: fixed width for clock area

Walther opened this issue · comments

By default, the clock area is text-aligned to the right edge of the bottom bar. Additionally, the font is variable-width. When a minute changes (or for more extreme effect, display seconds too), the clock twitches around as different numbers have different widths. As the clock is the rightmost thing on the bar, everything else right-floated on the bar moves around too.

Proposed solutions:

  • Allow setting a fixed width font
  • Add a setting for fixing the clock position

This is actually an excellent point. I'll just fix the clock width, and will probably give the user the choice about the clock position (right, middle, left?) and font. Will look into it ASAP.
Thank you for this, never noticed as I just use hour/minute format!

I'll probably go for the fixed width font solution. That could be triggered in the settings, even if I'm not completely happy with the final result.
I use the default Atom font, and seeing the monospaced thinghy down there kind of cools me down.

screenshot 2017-02-13 22 22 34

Anyway, the clock position will be fixed.

Another solution I'm trying to implement is the automatic calculation of the required space for a given format. When no width is set, I would fetch the size of the container div as clientWidth and increment it of a few pixels. Of course, I'm afraid this could break for some formats, especially for fancy locales where the required width heavily varies according to the time or date.

Hum, apparently the fixed width thing works fine (I'm still refining it, but there should be no problem with that). Now, I'm not sure the fixed width option could be actually needed...

Closing, it should be fixed with the new release!