7

I really need to put some separator in the unity launcher left bar... I think that could be possible to add some links to a program that simply do nothing so we only need to change it's icon to a separator-like icon... How can I do this?

2
  • but separator will take same size as of other launchers on unity panel. Do you allow this behavior? – Rahul Virpara Jun 8 '12 at 12:27
  • I would have preferred that they occupy less but I don't know how to do this... if you know other solutions please let me know – Fabio Spampinato Jun 8 '12 at 13:04
8

Just create launcher

gksudo gedit /usr/share/applications/separator.desktop

and paste following details in gedit.

[Desktop Entry]
Type=Application
Icon=/path/to/icon.png
Name=Unity Separator

then hit Super and search for Unity Separator and put it on Unity Panel Remember, It will consume same space as of other launcher size on Unity Panel.

2

I solved. I just created some shortcuts with empty command and changed the icon. This is the result:

enter image description here

2
  • 4
    Didn't you just implement what virpara had in his answer – David Peterman Jun 8 '12 at 13:33
  • I read his answer only after I made it, btw I only made some copies of "My-Wheater-Indicator" (in my desktop) and I changed the properties – Fabio Spampinato Jun 8 '12 at 13:53
0
  1. Create a simple Python script (separator.py) with icon. (see code below)
  2. Put it in ~/bin/
  3. Create an icon.png and place it in the same directory.
  4. chmod +x ~/bin/separator.py
  5. Launch it. It will appear in launcher.
  6. While is running, set it to keep in launcher (right click on icon in launcher).
  7. Repeat from 1-6, changing the name to separator2.py etc.
  8. Arrange the icons with drag.
#!/usr/bin/env python
import pygtk
pygtk.require('2.0')
import gtk

class HelloWorld:

    def delete_event(self, widget, event, data=None):
        return False

    def destroy(self, widget, data=None):
        gtk.main_quit()

    def __init__(self):
        # create a new window
        self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)

        self.window.set_icon_from_file('icon.png')

        self.window.connect("delete_event", self.delete_event)
        self.window.connect("destroy", self.destroy)

        # Creates a new button with the label "Hello World".
        self.button = gtk.Button("Hello World")

        self.window.add(self.button)
        self.button.show()
        self.window.show()

    def main(self):
        gtk.main()

if __name__ == "__main__":
    hello = HelloWorld()
    hello.main()

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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