本文整理汇总了Python中dbus.SessionBus.reparseConfiguration方法的典型用法代码示例。如果您正苦于以下问题:Python SessionBus.reparseConfiguration方法的具体用法?Python SessionBus.reparseConfiguration怎么用?Python SessionBus.reparseConfiguration使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类dbus.SessionBus
的用法示例。
在下文中一共展示了SessionBus.reparseConfiguration方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: SessionBus
# 需要导入模块: from dbus import SessionBus [as 别名]
# 或者: from dbus.SessionBus import reparseConfiguration [as 别名]
#!/usr/bin/env python
import os, sys, datetime
from dbus import SessionBus
from PyKDE4.kdecore import KConfig, KConfigGroup
from PyKDE4.kdeui import KGlobalSettings
kGlobalSettings = KGlobalSettings.self()
# tell all KDE apps to recreate their styles to apply the setitngs
kGlobalSettings.emitChange(KGlobalSettings.StyleChanged)
kGlobalSettings.emitChange(KGlobalSettings.SettingsChanged)
kGlobalSettings.emitChange(KGlobalSettings.ToolbarStyleChanged)
kGlobalSettings.emitChange(KGlobalSettings.PaletteChanged)
kGlobalSettings.emitChange(KGlobalSettings.FontChanged)
kGlobalSettings.emitChange(KGlobalSettings.IconChanged)
kGlobalSettings.emitChange(KGlobalSettings.CursorChanged)
print 'Telling Kwin to reload its config'
os.system("dbus-send --dest=org.kde.kwin /KWin org.kde.KWin.reloadConfig")
print 'Telling plasma to reload its config'
plasma = SessionBus().get_object('org.kde.plasma-desktop','/MainApplication')
plasma.reparseConfiguration()