source: kde/dbus/knotify-client@ 935

Last change on this file since 935 was 935, checked in by joergs, on Dec 6, 2010 at 11:23:57 AM

initial version of knotify-client (kde 4.3.5)

  • Property svn:executable set to *
File size: 1.1 KB
Line 
1#!/usr/bin/env python
2# -*- coding: utf-8 -*-
3
4import sys
5import dbus
6import pprint
7
8m = sys.argv[1]
9
10knotify = dbus.SessionBus().get_object("org.kde.knotify", "/Notify")
11
12# interface for knotify,
13# taken from knotify.h
14# int event(
15# const QString &event,
16# const QString &fromApp,
17# const QVariantList& contexts ,
18# const QString &title,
19# const QString &text,
20# const QByteArray& pixmap,
21# const QStringList& actions,
22# int timeout,
23# qlonglong winId );
24
25
26# predefined notify settings, see
27# find /usr/share/kde4/apps -name *.notifyrc
28# grep -v '[a-z]\[' /usr/share/kde4/apps/kde/kde.notifyrc
29
30#i = knotify.event( "warning", "mettenmeier_batteriemanagement", [], "Batteriemanagement", m, [0,0,0,0], [], 0, dbus_interface="org.kde.KNotify")
31
32# use notify settings from powerdevil
33#i = knotify.event( "criticalbattery", "powerdevil", [], "Batteriemanagement", m, [], [], 0, dbus_interface="org.kde.KNotify")
34i = knotify.event( "notification", "kde", [], "knotify-client", m, [], [], 0, dbus_interface="org.kde.KNotify")
35#pprint.pprint(i)
36
Note: See TracBrowser for help on using the repository browser.