Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

On Ubuntu 11.10, using gnome-tweak-tool (3.2.0-0ubuntu1), I have great difficulty finding specific extensions. The ordering seems random.

I have looked and looked.. but I do not see any ordering options.

Is there a way to change the ordering to be alphabetic? Or by provider, perhaps?

share|improve this question
add comment

1 Answer 1

up vote 3 down vote accepted

I don't consider myself a pro python coder, so this may not be the most efficient way to go. In fact, I had to do some research for sorting because it's been a while since I've used python.

If you open /usr/share/pyshared/gtweak/tweaks/tweak_shell_extensions.py, and add the following import at the top of the file:

from operator import itemgetter

Then at the bottom of the script, modify the try block to sort extensions (around line 154):

        try:
             #add a tweak for each installed extension
             extensions = shell.list_extensions().values()
             for extension in sorted(extensions, key=itemgetter('name')):
share|improve this answer
    
Thank you for providing a way! I need to study python. That worked excellently. I'm set... until the next update to the tweak tool! lol –  TheGeeko61 Jan 2 '12 at 22:57
    
@TheGeeko61 No problem! I started learning python a long time ago (around 1999, maybe?), but I was easily annoyed by significant whitespace and decided to learn Ruby instead. When you do study it, use a good editor like vim and the whitespace becomes less of a headache. –  Jim Schubert Jan 3 '12 at 2:13
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.