Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Persistent panel items location (reordering) #41

Closed
eaerth opened this issue Apr 14, 2018 · 2 comments
Closed

[Feature Request] Persistent panel items location (reordering) #41

eaerth opened this issue Apr 14, 2018 · 2 comments
Labels

Comments

@eaerth
Copy link

eaerth commented Apr 14, 2018

Hey there.
I've been tinkering around with the extension in my free time to try to figure out how to add this myself as there are a few other extensions that steal priority over this I believe. I'm also using Extend Panel Menu, which seems to offer an offset option but it doesn't always work on account of when I restart the shell from time to time, Unite will move back to the center of the panel icons. I've googled this a bit, found a solution on askubuntu.com but a lot of the tags and values (forgive me if I'm using the wrong jargon, I'm only really experienced with webdesign coding, not so much actual programming! haha) they are for items not in your code and I'm not sure if it was left out as they report that if left out, it will be placed to the right by default. However, I'm thinking that other extensions do have this and are possibly stealing priority over panel placement.

So... TL;D(wt)R ;
If you were to implement this functionality, how might you go about doing it if you're not feeling it is necessary to the integrity of the code? I would very much like to add it myself but I'm kind of at a loss. The only location I feel like it would make sense to make adjustments is here* but the code they are saying to search for doesn't match any of your code. This is probably the closest but then again, I could be in the wrong .js file all together. I'm looking in the WindowButtons.js module.
Ideally the functionality I am looking for is that it gains priority to immediate right placement at all times. Of course if you wanted, you could add an option to change the offset in your uisettings from the extension panel but I wanted to spare you guys the extensive coding if I could, I'm sure you're fairly busy and if it isn't "broke"-broke, why fix it kind of a thing?

if (this._position == 'left') {
        let appmenu = Main.panel.statusArea.appMenu.actor.get_parent();
        Panel._leftBox.insert_child_below(this._buttonsActor, appmenu);
      }

      if (this._position == 'right') {
        Panel._rightBox.add_child(this._buttonsActor);
}

And here is the url to what they are suggesting ; https://askubuntu.com/questions/453969/how-can-i-order-gnome3-shell-extensions-at-the-top

Anyway, I really appreciate your time for taking a look at my proposed idea, would very much love it if you added this functionality as I have always liked having window buttons in the panel without window titlebar decorations and your extension is a hell of a lot better than what I remember Maximus being back in the day. Thank you for the work you have already contributed and I wish you all the best.

Cheers!

Joshua

@eaerth eaerth changed the title Persistent panel location? [Feature?] Persistent Panel Location Apr 16, 2018
@jonian
Copy link
Member

jonian commented May 8, 2018

Hi @eaerth. Thank you for your detailed report and apologies for the late response.

if (this._position == 'left') {
        let appmenu = Main.panel.statusArea.appMenu.actor.get_parent();
        Panel._leftBox.insert_child_below(this._buttonsActor, appmenu);
}

When the buttons are on the left side, they are placed before the appMenu. If you want to place them in a specific position, you can use:

if (this._position == 'left') {
        Panel._leftBox.insert_child_at_index(0);
}

When the buttons are on the right side, they are placed as the last item on the right.

I'm thinking that other extensions do have this and are possibly stealing priority over panel placement.

This will happen if there are other extensions that use add_child to add items on the right side of the panel. The extension loaded last will steal priority. The same applies if you use insert_child_at_index, to add a widget at a specific position.

So adding persistent location to panel widgets is not possible, since you can't control when each extension gets loaded.

I'm leaving this issue open and if I find a way to implement it, I will.

@jonian jonian changed the title [Feature?] Persistent Panel Location [Feature] Persistent Panel Location May 8, 2018
@jonian jonian changed the title [Feature] Persistent Panel Location [Feature Request] Persistent panel items location (reordering) Dec 2, 2018
@jonian
Copy link
Member

jonian commented Sep 15, 2021

Closing this as it is not possible to implement. This has also been discussed upstream and no solution was given.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants