1

I'm on Ubuntu 20.10 and in this update, the events show at the bottom of the calendar along with the add world clock option as in the screenshot below.

enter image description here

I know this got here because of I installed "gnome-clocks" but I use clocks option quite often but not the world clock. So, I would like to remove the option to add world clock without removing the gnome-clocks package.

Any help would be appreciated!

2

This can be achieved by creating, installing and enabling the gnome-shell extension.

enter image description here

1. mkdir -p $HOME/.local/share/gnome-shell/extensions/remove_world_clocks_button@name.mail.com
2. cd $HOME/.local/share/gnome-shell/extensions/remove_world_clocks_button@name.mail.com
3. nano extension.js

paste below content in the extension.js file

'use strict';

const Main = imports.ui.main;
const DateMenu = Main.panel.statusArea.dateMenu

class RemoveWorldClocks {
    constructor() {
    }

    enable() {
    DateMenu._clocksItem.hide();
    }

    disable() {
    DateMenu._clocksItem.show();
    }
}

function init() {
    return new RemoveWorldClocks();
}

Save the file.

4. nano metadata.json

paste the below content in metadata.json file

{
  "name": "Remove World Clocks Button",
  "description": "Remove World Clocks Button from dateMenu",
  "uuid": "remove_world_clocks_button@name.mail.com",
  "shell-version": [
    "3.36",
    "3.38",
    "40"
  ]
}

Save the file.

restart the gnome-shell with Alt+F2 r Enter Method. If its wayland server you need to logout and logback in.

enable the extension with below command.

5. gnome-extensions enable remove_world_clocks_button@name.mail.com

enter image description here

1
  • 1
    Works as expected! Thanks!
    – Heisenberg
    Jun 4 at 16:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.