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?
-
but separator will take same size as of other launchers on unity panel. Do you allow this behavior?– Rahul VirparaJun 8, 2012 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 SpampinatoJun 8, 2012 at 13:04
Add a comment
|
3 Answers
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
Exec=/bin/true
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.
I solved. I just created some shortcuts with empty command and changed the icon. This is the result:
-
4
-
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 Jun 8, 2012 at 13:53
- Create a simple Python script (separator.py) with icon. (see code below)
- Put it in
~/bin/
- Create an
icon.png
and place it in the same directory. chmod +x ~/bin/separator.py
- Launch it. It will appear in launcher.
- While is running, set it to keep in launcher (right click on icon in launcher).
- Repeat from 1-6, changing the name to separator2.py etc.
- 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()