当前位置: 首页>>代码示例>>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;未经允许,请勿转载。