mirror of
https://gitlab.com/thebiblelover7/dotfiles.git
synced 2025-12-14 04:03:50 +00:00
initial commit
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
// Copyright (C) 2011-2017 R M Yorston
|
||||
// Licence: GPLv2+
|
||||
|
||||
const Main = imports.ui.main;
|
||||
const SessionMode = imports.ui.sessionMode;
|
||||
|
||||
function init() {
|
||||
}
|
||||
|
||||
function enable() {
|
||||
// do nothing if the clock isn't centred in this mode
|
||||
if ( Main.sessionMode.panel.center.indexOf('dateMenu') == -1 ) {
|
||||
return;
|
||||
}
|
||||
|
||||
let centerBox = Main.panel._centerBox;
|
||||
let rightBox = Main.panel._rightBox;
|
||||
let dateMenu = Main.panel.statusArea['dateMenu'];
|
||||
let children = centerBox.get_children();
|
||||
|
||||
// only move the clock if it's in the centre box
|
||||
if ( children.indexOf(dateMenu.container) != -1 ) {
|
||||
centerBox.remove_actor(dateMenu.container);
|
||||
|
||||
children = rightBox.get_children();
|
||||
rightBox.insert_child_at_index(dateMenu.container, children.length-1);
|
||||
}
|
||||
}
|
||||
|
||||
function disable() {
|
||||
// do nothing if the clock isn't centred in this mode
|
||||
if ( Main.sessionMode.panel.center.indexOf('dateMenu') == -1 ) {
|
||||
return;
|
||||
}
|
||||
|
||||
let centerBox = Main.panel._centerBox;
|
||||
let rightBox = Main.panel._rightBox;
|
||||
let dateMenu = Main.panel.statusArea['dateMenu'];
|
||||
let children = rightBox.get_children();
|
||||
|
||||
// only move the clock back if it's in the right box
|
||||
if ( children.indexOf(dateMenu.container) != -1 ) {
|
||||
rightBox.remove_actor(dateMenu.container);
|
||||
centerBox.add_actor(dateMenu.container);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"_generated": "Generated by SweetTooth, do not edit",
|
||||
"description": "Move clock to left of status menu button",
|
||||
"name": "Frippery Move Clock",
|
||||
"shell-version": [
|
||||
"40",
|
||||
"41"
|
||||
],
|
||||
"url": "http://frippery.org/extensions",
|
||||
"uuid": "Move_Clock@rmy.pobox.com",
|
||||
"version": 25
|
||||
}
|
||||
Reference in New Issue
Block a user