MATE: Custom Panel Clock Settings?

In moving from Ubuntu MATE to Manjaro MATE, I’m wanting to replicate the Panel clock. I’ve searched for this topic here in the Forum, but not found a solution. By using dConf on UbuM, I was able to reduce the panel size of the clock to get more room for frequently used app icons.

Using the %H:%… special string characters (forget what they’re called but I can look that up if/when informed if/where they’ll work). Specifically I’d like: DayOfWeek&NumericDayOfWeek(space))Hour(12Hr):Minute:Second

Using the correct custom string my UbuM Panel clock looked like this:
Sun21 10:05:50

Since (even in lockdown when it always seemed to feel like “Blursday”) I always know the month and am/pm, so it’s great having a much smaller DateTime in the Panel. Nothing I’ve tried in dConf here in delightful ManjaroM has had any effect, so maybe the Clock app in Manjaro doesn’t support the use of standard syntax like %H:%D that enabled customizing UbuM?

According to dConf, the Panel clock is MATE’s ClockAppletFactory::ClockApplet and it appears that only the applet’s Preferences have any effect on display. The clock in UbuMATE is org.ayatana.indicator.datetime so maybe there’s a way to install and use that (or some other customizable Panel clock) instead? I don’t know nearly enough to get and modify the ClockApplet to add customization capability.

Once I can find and install a customizable Panel clock, there’s a pretty good list of variables in man date via the Terminal.

In case it’s of any help, dConf shows a custom-format option where you can input a string, but of course it doesn’t work. Maybe someday the applet will get a “schema” for the custom mode and then it will work? Meanwhile dConf shows this for the applet’s prefs:

Looks like the 182.4 kB of binary code is in /lib64/mate-panel/clock-applet with a copy in /lib/mate-panel and there’s a related file that apparently contains language strings for the interface.

Now I’m looking at this file:
/usr/share/glib-2.0/schemas/org.mate.panel.applet.clock.gschema.xml

At the top of the file is this helpful stuff for manual configuration of the panel clock:

<schemalist gettext-domain="mate-panel">
  <enum id="org.mate.panel.applet.clock.ClockFormat">
    <value nick="invalid" value="0"/>
    <value nick="12-hour" value="1"/>
    <value nick="24-hour" value="2"/>
    <value nick="unix" value="3"/>
    <value nick="internet" value="4"/>
    <value nick="custom" value="5"/>
  </enum>
  <enum id="org.mate.panel.applet.clock.TemperatureUnit">
    <value nick="Invalid" value="0"/>
    <value nick="Default" value="1"/>
    <value nick="Kelvin" value="2"/>
    <value nick="Centigrade" value="3"/>
    <value nick="Fahrenheit" value="4"/>
  </enum>
  <enum id="org.mate.panel.applet.clock.SpeedUnit">
    <value nick="Invalid" value="0"/>
    <value nick="Default" value="1"/>
    <value nick="m/s" value="2"/>
    <value nick="km/h" value="3"/>
    <value nick="mph" value="4"/>
    <value nick="knots" value="5"/>
    <value nick="Beaufort scale" value="6"/>
  </enum>
  <schema id="org.mate.panel.applet.clock">
    <key name="format" enum="org.mate.panel.applet.clock.ClockFormat">
      <default>'custom'</default>
      <summary>Hour format</summary>
      <description>This key specifies the hour format used by the clock applet. Possible values are "12-hour", "24-hour", "internet", "unix" and "custom". If set to "internet", the clock will display Internet time. The Internet time system divides the day into 1000 ".beats". There are no time zones in this system, so time is the same all over the world. If set to "unix", the clock will display time in seconds since Epoch, i.e. 1970-01-01. If set to "custom", the clock will display time according to the format specified in the custom_format key.</description>
    </key>
    <key name="custom-format" type="s">
      <default>'%l:%M,%a%d'</default>
      <summary>Custom format of the clock</summary>
      <description>This key specifies the format used by the clock applet when the format key is set to "custom". You can use conversion specifiers understood by strftime() to obtain a specific format. See the strftime() manual for more information.</description>
    </key>
    <key name="show-seconds" type="b">
      <default>false</default>
      <summary>Show time with seconds</summary>
      <description>If true, display seconds in time.</description>
    </key>

Sadly, it has no effect. For example, my panel is currently displaying second despite that key value in the file showing “false” after having edited the file to a “custom” clock format default with a default strftime string of ‘%l:%M,%a%d’ as shown above.

So the org.mate.panel.applet.clock.gschema.xml is irrelevant? Anyone have ideas on how to configure the MATE Panel clock?

YAY! :smiley:

In taking another look at this 2014 post my error in a prior attempt using that method became obvious. I’d tried to change my panel clock object (object-17 in my current setup) custom-format to “custom” with dConf here:
/org/mate/panel/objects/object-17/prefs/custom-format

Instead, obviously, I needed to first set the “format” key to “custom” (Duh!!). :confused:
In dConf that’s here:
/org/mate/panel/objects/object-17/prefs/format

So after changing the format to custom it was easy to fiddle with the strftime string and click Apply to see how it looked. For now I’ve settled on %l:%M,%a%d so my super short Clock display in the Panel looks like this:
5:20,Thu01

This works great for me since here in SoCA, even when working into the wee hours it’s easy enough to tell am/pm, so far the current month has never eluded me, and my crowded Panel has plenty of space for a comma now that the datetime display is so small. I hope this helps anyone else struggling with the near total lack of configuration options in the current Manjaro MATE Clock Applet Preferences (right click on the Panel Clock).

Now maybe I’ll put Manjaro Plasma on a fast USB drive to check out why everyone else seems to be using that. :trophy:

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.