I am the author of the extension Mock Universal Menu, and am working on the next update. The problem is, I want to insert my text to the rightmost index of the left box. I want to do this because as of now, after coming out from suspend, my extension goes to the left of the app menu (ex, Firefox
, or Extensions
), and after the activities button. So, my question is: Would it be possible to stop this behavior, and if not, how do I align it to the right of the left box.
My Code
'use strict';
const { St, Clutter } = imports.gi;
const Main = imports.ui.main;
let _myText;
class Extension {
enable() {
const _myText = new St.Label({ text: ' File Edit View Go Window Help',
y_align: Clutter.ActorAlign.CENTER,
style_class: 'panel-button',
track_hover: false,
reactive: false,
style_class: 'panel-button my-class'});
Main.panel._leftBox.insert_child_at_index(_myText, 10)
}
disable() {
_myText.destroy();
}
}
function init() {
return new Extension();
}
I am on Ubuntu 21.04 with GNOME 40.4 installed.
from the code you have provided, it seems the disable function like below will do what you are looking for
also remove the text "const" from your enable code 2nd line