Add setting to toggle clock movement

Trying out going back to the default position
This commit is contained in:
Josh Sherman 2018-12-01 09:59:24 -06:00
parent 3f8c1e850b
commit 142561ac98
No known key found for this signature in database
GPG key ID: 55B058A80530EF22

View file

@ -3,6 +3,8 @@ const ExtensionUtils = imports.misc.extensionUtils;
const Main = imports.ui.main;
const SessionMode = imports.ui.sessionMode;
const moveClock = false;
const disableHotCorners = function () {
Main.layoutManager.hotCorners.forEach(function (hotCorner) {
if (!hotCorner) return;
@ -28,7 +30,7 @@ function enable() {
hotCornerCallback = Main.layoutManager.connect('hot-corners-changed', disableHotCorners);
// Moves the clock to the right
if (Main.sessionMode.panel.center.indexOf('dateMenu') > -1) {
if (moveClock && Main.sessionMode.panel.center.indexOf('dateMenu') > -1) {
centerBox = Main.panel._centerBox;
rightBox = Main.panel._rightBox;
dateMenu = Main.panel.statusArea.dateMenu;