Option to remove AM/PM from clock

I have an ultra-wide monitor and use a vertical panel on the left, just because it saves me a lot of screen space. However, the clock is very small. It could be scaled up a bit if the AM/PM was dropped. Personally, I have no need for it, as I can look and see if it is day or night. How hard would it be to make the AM/PM an option just as 12/24 hour is an option?

Thanks in advance.

1 Like

i second the addition of this check box, i don’t need the AM/PM, nor do i want to tend with a 24hr clock.

in the mean time i’ve found a font for my vertical panel that is the most readable but unfortunately the font selector doesn’t tell me what font i have selected once i hit apply.

i’ve tracked it down in my notes (pays to take good notes)

the font is montepetrum and can be downloaded from here

just unzip it and drag it to your fonts management window

the other thing i’ve noticed is that there is something about the default panel that puts extra padding right and left of the clock … so the the clock can display with less padding right and left if it’s placed into its own separate panel

it’s a bit tedious to set up but i have a separate panel the same width as my taskbar and put both the clock and minimize all windows widget in that panel by themselves… then just match the vertical heights so it appears to be one continuous panel (except for some minor gradient mismatch.

Screenshot_20230807_081053

1 Like

It might be easier to just say if the panel is vertical, drop the AM/PM, since it really isn’t an issue on a horizontal panel.

As far as the date, I just use Custom and paste in the format code I prefer.

The “Split Digital Clock” widget on store.kde.org may help here.

1 Like

It sort of looks like what I would want, but it still leave the standard clock in the taskbar. I am not a coder, so I don’t know how to add a If verticalPanel statement in there, but I did manage to change DigitalClock.qml to

        // add "AM/PM" either if the setting is the default and locale uses it OR if the user unchecked "use 24h format"
        if ((main.use24hFormat == Qt.PartiallyChecked && !uses24hFormatByDefault) || main.use24hFormat == Qt.Unchecked) {
//            result += " " + amPm;
            result += " ";
        }

and that got what I was looking for.

I found that I was also able to rem out the section and get the same result.

//        if ((main.use24hFormat == Qt.PartiallyChecked && !uses24hFormatByDefault) || main.use24hFormat == Qt.Unchecked) {
//            result += " " + amPm;
//        }

Screenshot_20230807_120758

I realize I will have to make this change pretty often on Tumbleweed, but I know how now. :grinning:

1 Like

Or just use 24-hour time format. No AM or PM there…

3 Likes

I could, but I would hate it. I would much rather just use 12 hour format and not see the AM or PM and have a clock that is readable for my old eyes. If it were a horizontal panel, the width of the clock would be insignificant.

We have a check box for 12/24 hour and a check box for Show Seconds. A check box for Show AM/PM would be a nice addition for those who might use a vertical panel. It could be a nice addition sometime down the road.

2 Likes

i like the split clock even less than i like the 24hr clock, but it does tend to solve the problem for vertical panels, worth checking out.

it even integrates with PIM services to show your calendar events.

Doesn’t that just use 24 h format? 12:07 is not 12h format.

Also I cannot reproduce with your code change. My clock just switches to 24h format if I apply your changes

1 Like

Yes, but I was not aware of it till the afternoon rolled around. :rofl:

Like I said, I am not a coder.

1 Like

Very true, but I don’t want to add another clock. I already have one.

It does look good, but not on a vertical panel.

Haha, happens.

Actually it seems this is not a trivial problem. At least with my limited programming experience. But its a fun challenge. I doubt this will be up streamed, even if we figure it out.

I have looked at a lot of the clocks and they all want to split the hour and minutes to another line. The standard clock looks best, but it seems to just put the time in from the Regional Settings.

This has turned into something that does not belong in the Brainstorm section.