當前位置: 首頁>>代碼示例>>Python>>正文


Python Config.settings方法代碼示例

本文整理匯總了Python中dragonfly.Config.settings方法的典型用法代碼示例。如果您正苦於以下問題:Python Config.settings方法的具體用法?Python Config.settings怎麽用?Python Config.settings使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在dragonfly.Config的用法示例。


在下文中一共展示了Config.settings方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: Item

# 需要導入模塊: from dragonfly import Config [as 別名]
# 或者: from dragonfly.Config import settings [as 別名]
                                  doc="Command to bring a window with the given title to the foreground.")
config.lang.translate_win  = Item("place <win_selector> <position> [on <mon_selector>]",
                                  doc="Command to translate a window.")
config.lang.resize_win     = Item("place <win_selector> [from] <position> [to] <position> [on <mon_selector>]",
                                  doc="Command to move and resize a window.")
config.lang.stretch_win    = Item("stretch <win_selector> [to] <position>",
                                  doc="Command to stretch a window.")
config.lang.win_selector   = Item("window | win | [window] <win_names>",
                                  doc="Partial command for specifying a window; must contain the <win_names> extra.")
config.lang.mon_selector   = Item("(this | current) monitor | [monitor] <mon_names>",
                                  doc="Partial command for specifying a monitor; must contain the <mon_names> extra.")
config.lang.left           = Item("left", doc="Word for left side of monitor.")
config.lang.right          = Item("right", doc="Word for right side of monitor.")
config.lang.top            = Item("top", doc="Word for top side of monitor.")
config.lang.bottom         = Item("bottom", doc="Word for bottom side of monitor.")
config.settings            = Section("Settings section")
config.settings.grid       = Item(10, doc="The number of grid divisions a monitor is divided up into when placing windows.")
config.settings.defaults   = Item({"fire": ("firefox", None)}, doc="Default window names.  Maps spoken-forms to (executable, title) pairs.")
#config.generate_config_file()
config.load()


#===========================================================================
# Create this module's main grammar object.

terminator_grammar = Grammar("window control")


#---------------------------------------------------------------------------
# Dictionary list of window and monitor names.
開發者ID:taylor-brown,項目名稱:dragonfly-scripts,代碼行數:32,代碼來源:_winctrl.py


注:本文中的dragonfly.Config.settings方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。