Panel Tool

In the past year of using Ubuntu fulltime at work, there have only been a couple of consistent annoyances. One was that when booting up with 2 screens attached it would default to the external monitor, not the internal. I wrote a quick script which sorts that.

The other was that, when the previous occurs, or when playing games etc, the panel icons and applets seem to move around, rather than staying where I had carefully placed them. Now, the positions of all the applets and icons are stored in gconf, so I thought it would be a cunning plan to write to script to store/restore them, and here it is!

To run it you simply do:

$ python panel-tool.py store

which will store the positions of all the icons/applets in your top panel in a text file, and then

$ python panel-tool.py restore

when you want them restored to normal. This requires a restart of the panel, which is a bit ugly (it does a complete reload, which takes a few seconds) but it works!

Anyway – thought somebody else might be wanting this, so I’m releasing this version into the wild. It’s nowhere near perfect, I’m sure, but it WFM…

mrBen

panel-tool.py

(Save the file and rename to panel-tool.py due to hosting weirdness)

UPDATE
OK – there seems to be some issues with the login/out menu applet, and the clock applet. Sometimes they show up in the wrong place, although if you move them to where they should be and rerun panel-tool it seems to work itself out properly. I’ll see if I can resolve this (and do a proper config file as suggested by aq)

This entry was posted in Computing, Linux, mrBen. Bookmark the permalink.

3 Responses to Panel Tool

  1. Pingback: MJ Ray (mjray) 's status on Wednesday, 05-Aug-09 18:50:35 UTC - Identi.ca

  2. sil says:

    This is really annoying when it happens, and I don’t get why it happens!
    Notes on the script:
    If you import and use xdg.BaseDirectory then you can store the text file in a proper config folder rather than just in whatever folder you happen to be in.

  3. mrBen says:

    sil – I look forward to getting your patch ;)

    There are a couple of improvements like that that really need to be made; I’ll try and get it updated in the next couple of days (barring teh wife going into labour)

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>