
universal topbar
Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net
ok this is my first karamba upload.
the theme has following features:
- cpu-load...
- net-traffic
- disk space...
- uptime
- time/date...
- 2 different backgrounds
(transp/baghira like)
and some other small things, check it out!
note: it's a 1280 version.
17 years ago
0.1
-------------
a new theme was born
0.2
-------------
added the systray to the theme
(thanks to wintermte)
17 years ago
0.1
-------------
a new theme was born
0.2
-------------
added the systray to the theme
(thanks to wintermte)
kopykatkiller
17 years ago
Report
wintermte
17 years ago
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.
Report
davidp
17 years ago
Report