mvmike / min-cal-widget

Minimal calendar widget
BSD 3-Clause "New" or "Revised" License
89 stars 15 forks source link

widget can be more smaller #39

Closed 532910 closed 2 years ago

532910 commented 5 years ago

Please add support for:

  1. don't show symbols at all
  2. 2-letters weekdays abbreviation

image

mvmike commented 5 years ago

1- doable 2- that would be a bit inconsistent with some languages (e.g. in Catalan you have more than one weekday with the same first two letters abbreviation)

If i may ask, which resolution and widget size is this screenshot?

mvdan commented 5 years ago

What about not naming the weekdays? The user can configure which is the first day of the week, and the colors clearly outline the weekend.

For example, we could make it so that if the widget is made too small, and the weekday names don't fit like in the screenshot, that row disappears.

532910 commented 5 years ago

You're absolutely wrong. All languages have two-characters weekdays abbreviation. It's locale defined:

% LC_TIME=ca_ES.UTF-8 ncal
    De març 2019      
dl     4 11 18 25   
dt     5 12 19 26   
dc     6 13 20 27   
dj     7 14 21 28   
dv  1  8 15 22 29   
ds  2  9 16 23 30   
dg  3 10 17 24 31   
mvdan commented 5 years ago

I think there are nicer ways to reply to an open source author than "you're absolutely wrong" :)

532910 commented 5 years ago

Sorry, it doesn't sound rude for me. Nothing personal.

mvmike commented 5 years ago

Didn't take it personal, but agree that there would be other ways of saying the very same.

On the other hand, investigated a bit and @532910 is right... but seems a bit of an overkill to have two sets of strings only to use two characters... would you make it configurable or just based in the text measure (if it fits or not)?

532910 commented 5 years ago

Really I'm also absolutely wrong. Some languages has 2-character abbreviated weekday name length, and some 3. But looks like the last character can be safely truncated without loosing the meaning. Anyway cal/ncal does so. Moreover, even M T W T F S S is understandable.

% cd /usr/share/i18n/locales

% grep abday ca_ES
abday      "dg.";"dl.";"dt.";"dc.";"dj.";"dv.";"ds."

% grep abday -A2 es_ES
abday   "dom";"lun";/
    "mar";"mi<U00E9>";/
    "jue";"vie";/

% grep abday en_GB    
abday       "Sun";"Mon";"Tue";"Wed";"Thu";"Fri";"Sat"

% grep abday -A6 ru_RU
abday   "<U0412><U0441>";/
        "<U041F><U043D>";/
        "<U0412><U0442>";/
        "<U0421><U0440>";/
        "<U0427><U0442>";/
        "<U041F><U0442>";/
        "<U0421><U0431>"

I think you should get abbreviated weekday name from the locale, and a. show 3 characters where it's enough space otherwise truncate to 2 b. if it's very difficult to understand when space is enough add user setting.

mvmike commented 5 years ago

empty symbol set added in e7bbd7fea312781ad2199b3208420d18c5b826d9, will be available in next release

mvmike commented 2 years ago

Fixed in 0f5469ddf0f9424058044154d4050279a4955276