Saturday, May 4, 2024
 Popular · Latest · Hot · Upcoming
7
rated 0 times [  7] [ 0]  / answers: 1 / hits: 9397  / 3 Years ago, thu, august 19, 2021, 12:17:48

How to remove clock from the top panel in gnome-shell?
enter image description here


More From » gnome

 Answers
2

It is possible by creating an extension.



mkdir -p ~/.local/share/gnome-shell/extensions/Disable_Clock@ocelot
cd ~/.local/share/gnome-shell/extensions/Disable_Clock@ocelot


Make a metadata.json file.



gedit metadata.json


Cut following code, and Paste into the editor ,and Save.



{"shell-version": ["3.2"], "uuid": "Disable_Clock@ocelot", "name": "Disable Clock", "description": "Disable Clock from the top of panel"}


Make an extension.js file.



gedit extension.js


Cut following code, and Paste into the editor ,and Save.



const St = imports.gi.St;
const Main = imports.ui.main;

function init(meta) {
}

function enable() {
Main.panel._centerBox.remove_actor(Main.panel._dateMenu.actor);
}

function disable() {
Main.panel._centerBox.add_actor(Main.panel._dateMenu.actor);
}


Restart gnome-shell and Turn on "Disable Clock" extension by gnome-tweak-tool


[#42096] Thursday, August 19, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ibuteking

Total Points: 35
Total Questions: 128
Total Answers: 138

Location: Indonesia
Member since Thu, Oct 1, 2020
4 Years ago
ibuteking questions
Sat, Sep 10, 22, 08:44, 2 Years ago
Fri, May 12, 23, 10:10, 1 Year ago
Tue, May 23, 23, 13:38, 1 Year ago
;