The Net traffic is not working on mine is there something special I have to do to make it work? I went in and modified it allready to read eth1 instead of eth0 as this is the card that my internet connection is on. Do I need to change the ppp0 to something else, I go through a router so I am not sure.
I like the bar. I would recomend removing the SUSE specific Icons and just adding a systray. This would make it more useful as is for non SUSE users and allow SUSE users to still have the nifty extra icons (because they run from the system tray anyway).
You can do that by creating a simple karamba/python script that contains the following:
------------------
#this import statement allows access to the karamba functions
import karamba
#this is called when you widget is initialized
def initWidget(widget):
karamba.createSystray(widget, 1600, 5, 350, 32)
#this is called everytime your widget is updated
#the update inverval is specified in the .theme file
def widgetUpdated(widget):
pass
#This gets called everytime our widget is clicked.
#Notes:
# widget = reference to our widget
# x = x position (relative to our widget)
# y = y position (relative to our widget)
# botton = button clicked:
# 1 = Left Mouse Button
# 2 = Middle Mouse Button
# 3 = Right Mouse Button, but this will never happen
# because the right mouse button brings up the
# Karamba menu.
# 4,5 = Scroll wheel up and down
def widgetClicked(widget, x, y, button):
pass
#This gets called everytime our widget is clicked.
#Notes
# widget = reference to our widget
# x = x position (relative to our widget)
# y = y position (relative to our widget)
# botton = button being held:
# 0 = No Mouse Button
# 1 = Left Mouse Button
# 2 = Middle Mouse Button
# 3 = Right Mouse Button, but this will never happen
# because the right mouse button brings up the
# Karamba menu.
def widgetMouseMoved(widget, x, y, button):
#Warning: Don't do anything too intensive here
#You don't want to run some complex piece of code everytime the mouse moves
pass
#This gets called when an item is clicked in a popup menu you have created.
# menu = a reference to the menu
# id = the number of the item that was clicked.
def menuItemClicked(widget, menu, id):
pass
#This gets called when an item is clicked in the theme CONFIGURATION menu,
#not the popup menus that you create.
# key = the reference to the configuration key that was changed
# value = the new value (true or false) that was selected
def menuOptionChanged(widget, key, value):
pass
#This gets called when a meter (image, text, etc) is clicked.
# NOTE you must use attachClickArea() to make a meter
# clickable.
# widget = reference to your theme
# meter = the meter clicked
# button = the button clicked (see widgetClicked for button numbers)
def meterClicked(widget, meter, button):
pass
# This will be printed when the widget loads.
print "Loaded my python extension!"
-----------------
You should save this in the same directory as your mainbar.theme and call it mainbar.py. Karamba will execute this script automatically when it starts this theme.
If you add this, be sure to remove your normal system tray from kicker before starting this theme. Otherwise there will be some confusion.
Ratings & Comments
3 Comments
The Net traffic is not working on mine is there something special I have to do to make it work? I went in and modified it allready to read eth1 instead of eth0 as this is the card that my internet connection is on. Do I need to change the ppp0 to something else, I go through a router so I am not sure.
I like the bar. I would recomend removing the SUSE specific Icons and just adding a systray. This would make it more useful as is for non SUSE users and allow SUSE users to still have the nifty extra icons (because they run from the system tray anyway). You can do that by creating a simple karamba/python script that contains the following: ------------------ #this import statement allows access to the karamba functions import karamba #this is called when you widget is initialized def initWidget(widget): karamba.createSystray(widget, 1600, 5, 350, 32) #this is called everytime your widget is updated #the update inverval is specified in the .theme file def widgetUpdated(widget): pass #This gets called everytime our widget is clicked. #Notes: # widget = reference to our widget # x = x position (relative to our widget) # y = y position (relative to our widget) # botton = button clicked: # 1 = Left Mouse Button # 2 = Middle Mouse Button # 3 = Right Mouse Button, but this will never happen # because the right mouse button brings up the # Karamba menu. # 4,5 = Scroll wheel up and down def widgetClicked(widget, x, y, button): pass #This gets called everytime our widget is clicked. #Notes # widget = reference to our widget # x = x position (relative to our widget) # y = y position (relative to our widget) # botton = button being held: # 0 = No Mouse Button # 1 = Left Mouse Button # 2 = Middle Mouse Button # 3 = Right Mouse Button, but this will never happen # because the right mouse button brings up the # Karamba menu. def widgetMouseMoved(widget, x, y, button): #Warning: Don't do anything too intensive here #You don't want to run some complex piece of code everytime the mouse moves pass #This gets called when an item is clicked in a popup menu you have created. # menu = a reference to the menu # id = the number of the item that was clicked. def menuItemClicked(widget, menu, id): pass #This gets called when an item is clicked in the theme CONFIGURATION menu, #not the popup menus that you create. # key = the reference to the configuration key that was changed # value = the new value (true or false) that was selected def menuOptionChanged(widget, key, value): pass #This gets called when a meter (image, text, etc) is clicked. # NOTE you must use attachClickArea() to make a meter # clickable. # widget = reference to your theme # meter = the meter clicked # button = the button clicked (see widgetClicked for button numbers) def meterClicked(widget, meter, button): pass # This will be printed when the widget loads. print "Loaded my python extension!" ----------------- You should save this in the same directory as your mainbar.theme and call it mainbar.py. Karamba will execute this script automatically when it starts this theme. If you add this, be sure to remove your normal system tray from kicker before starting this theme. Otherwise there will be some confusion.
really good work, although I had to change a few things, because i do not run suse.