253

On previous versions I had the date displayed. Now it just shows the current day but not the day's number or the month.

Is there a way to customize the clock or tray/taskbar more in GNOME shell on Ubuntu 17.10 and later?

pomsky
  • 68,507
neuromage
  • 2,744
  • I installed gnome-tweak-tool that did the trick with the clock. Might check out the shell extension at some point. The only other thing I'm missing is compiz cube rotation. I'm not sure how to get the workspace switcher button back. ctrl alt left or right doesn't switch the workspace. – neuromage Oct 20 '17 at 19:59
  • If you dont want to install any new software use this to write to the gnome config: dconf write /org/gnome/desktop/interface/clock-show-date 'true' – psykid May 31 '21 at 07:24
  • similar to @psykid's suggestion. gsettings set org.gnome.desktop.interface clock-show-weekday true – Pankaj Jangid Oct 14 '21 at 12:09

2 Answers2

377

You can get the date displayed in the top bar by using gnome-tweaks (was gnome-tweak-tool). First open up a terminal with ctrl+alt+t and install the tweak tool with

# sudo apt install gnome-tweak-tool # obsolete package
sudo apt install gnome-tweaks # current package
gnome-tweaks  #  now launch it

After that you can start it from the application selector (there the name is just tweaks) and navigate inside the tweak tool to the tab for 'Top Bar' and activate Date and Seconds (see screen-shot).

enter image description here

Although this might be the easiest approach for the casual user there's another method which works. By issuing the following terminal command you can set the same:

# makes the date appear
gsettings set org.gnome.desktop.interface clock-show-date true
# switches the seconds display on
gsettings set org.gnome.desktop.interface clock-show-seconds true

By replacing set with get you can ask the system to give you the actual settings. Example:

gsettings get org.gnome.desktop.interface clock-show-seconds
mivk
  • 5,312
Videonauth
  • 33,355
  • 17
  • 105
  • 120
  • 47
    gnome-tweak-tool is really an essential package for anyone who is actually using their computers for more than 5 minutes. – pipe Oct 20 '17 at 14:08
  • 12
    It's worth noting that once installed, the name of the application is Tweaks. – medley56 Apr 30 '18 at 14:56
  • Added to the answer. – Videonauth Apr 30 '18 at 19:41
  • 1
    I've just upgraded to 18.04 (and lost all settings again). I've installed gnome-tweak-tool but there is no "Top Bar" tab – dezzer10 May 07 '18 at 12:30
  • 8
    The date should be shown by default beside the clock. (Who needs to know the day of the week without also knowing the date!!). The fact that you have to install an extra package to enable it is unfathomable! – EoghanM Jul 23 '18 at 09:16
  • 1
    This works in Ubuntu 18.04 too. Thank you. – aghost Sep 07 '18 at 15:26
  • 6
    @EoghanM Installing an extra package is actually not necessary, you can turn this on by just running gsettings set org.gnome.desktop.interface clock-show-date true. (Videonauth, please consider adding the gsettings/dconf method to the answer.) – pomsky Sep 11 '18 at 16:55
  • 2
    @pomsky done so. – Videonauth Sep 11 '18 at 17:03
  • gsettings set org.gnome.desktop.interface clock-show-date true doesn't work for me, and gnome-tweak-tool doesn't have a "Top Bar" tab. Ubuntu 19.04. – user643722 Jun 24 '19 at 21:44
  • Available in the software center as "Gnome Tweaks" – Ben Nov 16 '19 at 18:50
31

For a more granular control, you may use the Clock override GNOME shell extension (reference: How do I install and manage GNOME Shell extensions?). With it, you can

Customize the date and time format displayed in clock in the top bar in GNOME Shell. Add as much or as little time information you want with extensive formatting options including an emoji clock face and Internet Time (.beat).

It supports Python's strftime format.

Extension homepage: https://github.com/stuartlangridge/gnome-shell-clock-override

pomsky
  • 68,507
  • 6
    This Clock Override extension is AWESOME: it gives you complete freedom to customise the clock the way you want. Be prepared to read up the syntax for the format string though, unless you know it already from Python. – Deeday-UK Sep 10 '18 at 22:09
  • 2
    edit format to show just date and time %F %R – Scott Stensland Nov 25 '18 at 17:50
  • This is great, but now it doesn't have enough space to display the full date&time. My setting is %a %e %b %y %H:%M and it display's only: Sat 25 j .... Is there a way to increase the area of the display size? – ioaniatr Jan 25 '20 at 21:28