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.

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?

share|improve this question
    
but separator will take same size as of other launchers on unity panel. Do you allow this behavior? –  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

3 Answers 3

up vote 4 down vote accepted

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.

share|improve this answer

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

http://oi49.tinypic.com/t9wj1z.jpg

share|improve this answer
2  
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
  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()
share|improve this answer

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.