How to remove the "Add World Clock" in the notification area?
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.
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!
This can be achieved by creating, installing and enabling the gnome-shell extension
.
1. mkdir -p $HOME/.local/share/gnome-shell/extensions/[email protected]
2. cd $HOME/.local/share/gnome-shell/extensions/[email protected]
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": "[email protected]",
"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 [email protected]