From 0aba042eddd2e27c30a6cb1b47bfe2dbab1b7dff Mon Sep 17 00:00:00 2001 From: mostlyjason Date: Sat, 2 Apr 2016 11:58:21 -0700 Subject: [PATCH 1/2] Adding a setting for how long to wait for Atom palette to load --- caster/apps/atom.py | 205 +++++++++++++++++++++-------------------- caster/lib/settings.py | 3 +- 2 files changed, 107 insertions(+), 101 deletions(-) diff --git a/caster/apps/atom.py b/caster/apps/atom.py index aeb6f255c..e092c4d7f 100644 --- a/caster/apps/atom.py +++ b/caster/apps/atom.py @@ -16,6 +16,11 @@ class CommandRule(MappingRule): + # How long to wait for the Atom palette to load before hitting the enter key + atom_palette_wait = "30" + if settings.SETTINGS["apps"]["atom"]: + atom_palette_wait = settings.SETTINGS["miscellaneous"]["atom_palette_wait"] + mapping = { # Spoken commands that are commented out do not have assigned default shortcut keys or are incompatible. @@ -39,18 +44,18 @@ class CommandRule(MappingRule): "add project folder": R(Key("ac-o"), rdescript="Atom: Add Project Folder"), "open settings": R(Key("c-comma"), rdescript="Atom: Open Settings"), "[open] last tab": R(Key("cs-t"), rdescript="Atom: Reopen Last File or Tab"), - "reopen closed item": R(Key("cs-p") + Text("Reopen Closed Item") + Pause("4") + Key("enter"), rdescript="Atom: Reopen Last File or Tab"), - "open [your] config": R(Key("cs-p") + Text("Open Your Config") + Pause("4") + Key("enter"), rdescript="Atom: Open Your Config"), - "open [your] int script": R(Key("cs-p") + Text("Open Your Int Script") + Pause("4") + Key("enter"), rdescript="Atom: Open Your Int Script"), - "open [your] key map": R(Key("cs-p") + Text("Open Your Key Map") + Pause("4") + Key("enter"), rdescript="Atom: Open Your Key Map"), - "open [your] snippet": R(Key("cs-p") + Text("Open Your Snippet") + Pause("4") + Key("enter"), rdescript="Atom: Open Your Snippet"), - "open [your] stylesheet": R(Key("cs-p") + Text("Open your Stylesheet") + Pause("4") + Key("enter"), rdescript="Atom: Open Your Stylesheet"), + "reopen closed item": R(Key("cs-p") + Text("Reopen Closed Item") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Reopen Last File or Tab"), + "open [your] config": R(Key("cs-p") + Text("Open Your Config") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Open Your Config"), + "open [your] int script": R(Key("cs-p") + Text("Open Your Int Script") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Open Your Int Script"), + "open [your] key map": R(Key("cs-p") + Text("Open Your Key Map") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Open Your Key Map"), + "open [your] snippet": R(Key("cs-p") + Text("Open Your Snippet") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Open Your Snippet"), + "open [your] stylesheet": R(Key("cs-p") + Text("Open your Stylesheet") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Open Your Stylesheet"), "save": R(Key("c-s"), rdescript="Atom: Save"), "save as": R(Key("cs-s"), rdescript="Atom: Save As"), - "save all": R(Key("cs-p") + Text("Save All") + Pause("4") + Key("enter"), rdescript="Atom: Save All"), - "close pane": R(Key("cs-p") + Text("Pane Close") + Pause("4") + Key("enter"), rdescript="Atom: Close Pane"), - "close pane others": R(Key("cs-p") + Text("Pane Close Other Items") + Pause("4") + Key("enter"), rdescript="Atom: Close Pane"), - "close pane": R(Key("cs-p") + Text("Pane Close") + Pause("4") + Key("enter"), rdescript="Atom: Close Pane"), + "save all": R(Key("cs-p") + Text("Save All") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Save All"), + "close pane": R(Key("cs-p") + Text("Pane Close") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Close Pane"), + "close pane others": R(Key("cs-p") + Text("Pane Close Other Items") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Close Pane"), + "close pane": R(Key("cs-p") + Text("Pane Close") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Close Pane"), "close window": R(Key("cs-w"), rdescript="Atom: Close Window"), #Extra #Edit Menu @@ -67,20 +72,20 @@ class CommandRule(MappingRule): #Lines Submenu ##"indent": R(Key("c-lbrace"), rdescript="Atom: Indent"), # Rework Dragonfly Keymapping "outdent": R(Key("c-rightbrace"), rdescript="Atom: Outdent"), - "auto indent editor": R(Key("cs-p") + Text("Editor Auto Indent") + Pause("4") + Key("enter"), rdescript="Atom: Auto Indent"), - "auto indent windows": R(Key("cs-p") + Text("Window Auto Indent") + Pause("4") + Key("enter"), rdescript="Atom: Auto Indent"), + "auto indent editor": R(Key("cs-p") + Text("Editor Auto Indent") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Auto Indent"), + "auto indent windows": R(Key("cs-p") + Text("Window Auto Indent") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Auto Indent"), "[move] line up []": R(Key("c-up"), rdescript="Atom: Move Line Up #") * Repeat(extra="n"), "[move] line down []": R(Key("c-down"), rdescript="Atom: Move Line Down #") * Repeat(extra="n"), "duplicate line []": R(Key("cs-d"), rdescript="Atom: Duplicate Line") * Repeat(extra="n"), #Unless remapped the command triggers Dragon NaturallySpeaking dictation box "delete line []": R(Key("cs-k"), rdescript="Atom: Delete Line or # Lines Below") * Repeat(extra="n"), "join line": R(Key("c-j"), rdescript="Atom: Join Line"), #Text Submenu - "uppercase": R(Key("cs-p") + Text("Editor Upper Case") + Pause("4") + Key("enter"), rdescript="Atom: Convert Uppercase"), - "lowercase": R(Key("cs-p") + Text("Editor Lower Case") + Pause("4") + Key("enter"), rdescript="Atom: Convert lowercase"), + "uppercase": R(Key("cs-p") + Text("Editor Upper Case") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Convert Uppercase"), + "lowercase": R(Key("cs-p") + Text("Editor Lower Case") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Convert lowercase"), "delete [to] end of word []": R(Key("c-delete"), rdescript="Atom: Delete to End oF Word") * Repeat(extra="n"), "delete sub word []": R(Key("a-backspace"), rdescript="Atom: Delete to End of Subword") * Repeat(extra="n"), - "delete [to] previous word []": R(Key("cs-p") + Text("Delete to Previous Word boundary") + Pause("4") + Key("enter"), rdescript="Atom: Delete to previous word boundary") * Repeat(extra="n"), - "delete [to] next word []": R(Key("cs-p") + Text("Delete to Next Word Boundary") + Pause("4") + Key("enter"), rdescript="Atom: Delete to next word boundary") * Repeat(extra="n"), + "delete [to] previous word []": R(Key("cs-p") + Text("Delete to Previous Word boundary") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Delete to previous word boundary") * Repeat(extra="n"), + "delete [to] next word []": R(Key("cs-p") + Text("Delete to Next Word Boundary") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Delete to next word boundary") * Repeat(extra="n"), ##"delete line": R(Key("cs-k"), rdescript="Atom: Delete Line"), "transpose": R(Key("cs-p") + Text("Transpose") + Key("enter"), rdescript="Atom: Transpose"), #Folding Submenu @@ -97,30 +102,30 @@ class CommandRule(MappingRule): #View Menu "reload file": R(Key("ac-r"), rdescript="Atom: Reload File"), "fullscreen": R(Key("f11"), rdescript="Atom: Toggle Fullscreen"), - "toggle menubar": R(Key("cs-p") + Text("Toggle Menu Bar") + Pause("4") + Key("enter"), rdescript="Atom: Toggle Menubar"), + "toggle menubar": R(Key("cs-p") + Text("Toggle Menu Bar") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Toggle Menubar"), "increase font [size] []": R(Key("cs-equals"), rdescript="Atom: Increase Font Size") * Repeat(extra="n"), "decrease font [size] []": R(Key("cs-minus"), rdescript="Atom: Decrease Font size") * Repeat(extra="n"), "reset font [size]": R(Key("c-0"), rdescript="Atom: Reset Font Size"), - "toggle soft wrap": R(Key("cs-p") + Text("Toggle Soft Wrap") + Pause("4") + Key("enter"), rdescript="Atom: Toggle Soft Wrap"), + "toggle soft wrap": R(Key("cs-p") + Text("Toggle Soft Wrap") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Toggle Soft Wrap"), ##"toggle command palette": R(Key(""), rdescript="Atom: Toggle Command Palette"), "[toggle] treeview": R(Key("c-backslash"), rdescript="Atom: Toggle Treeview"), #Panes Submenu - "split above": R(Key("cs-p") + Text("Pane: Split Up") + Pause("4") + Pause("4") + Key("enter"), rdescript="Atom: Split Up"), - "split below": R(Key("cs-p") + Text("Pane: Split Down") + Pause("4") + Key("enter"), rdescript="Atom: Split Down"), - "split left": R(Key("cs-p") + Text("Pane: Split Left") + Pause("4") + Key("enter"), rdescript="Atom: Split Left"), - "split right": R(Key("cs-p") + Text("Pane: Split Right") + Pause("4") + Key("enter"), rdescript="Atom: Split Right"), - "focus [on] next [pane]": R(Key("cs-p") + Text("Window: Focus Next Pane") + Pause("4") + Key("enter"), rdescript="Atom: Focus Next Pane"), - "focus [on] previous [pane]": R(Key("cs-p") + Text("Window: Focus Previous Pane") + Pause("4") + Key("enter"), rdescript="Atom: Focus Previous Pane"), - "focus [pane] [on] above": R(Key("cs-p") + Text("Window: Focus Pane Above") + Pause("4") + Key("enter"), rdescript="Atom: Focused Pane Above"), - "focus [pane] [on] below": R(Key("cs-p") + Text("Window: Focus Pane Below") + Pause("4") + Key("enter"), rdescript="Atom: Focus Pane Below"), - "focus [pane] [on] left": R(Key("cs-p") + Text("Window: Focus Pane on Left") + Pause("4") + Key("enter"), rdescript="Atom: Focus On left"), - "focus [pane] [on] right": R(Key("cs-p") + Text("Window: Focus Pane on Right") + Pause("4") + Key("enter"), rdescript="Atom: Focus Pane on Right"), - ##"close pane": R(Key("cs-p") + Text("Window: pane close") + Pause("4") + Key("enter"), rdescript="Atom: Close Pane"), + "split above": R(Key("cs-p") + Text("Pane: Split Up") + Pause(atom_palette_wait) + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Split Up"), + "split below": R(Key("cs-p") + Text("Pane: Split Down") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Split Down"), + "split left": R(Key("cs-p") + Text("Pane: Split Left") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Split Left"), + "split right": R(Key("cs-p") + Text("Pane: Split Right") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Split Right"), + "focus [on] next [pane]": R(Key("cs-p") + Text("Window: Focus Next Pane") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Focus Next Pane"), + "focus [on] previous [pane]": R(Key("cs-p") + Text("Window: Focus Previous Pane") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Focus Previous Pane"), + "focus [pane] [on] above": R(Key("cs-p") + Text("Window: Focus Pane Above") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Focused Pane Above"), + "focus [pane] [on] below": R(Key("cs-p") + Text("Window: Focus Pane Below") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Focus Pane Below"), + "focus [pane] [on] left": R(Key("cs-p") + Text("Window: Focus Pane on Left") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Focus On left"), + "focus [pane] [on] right": R(Key("cs-p") + Text("Window: Focus Pane on Right") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Focus Pane on Right"), + ##"close pane": R(Key("cs-p") + Text("Window: pane close") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Close Pane"), #extras "[go to] pane []": R(Key("a-%(n)s"), rdescript="Atom: Go to Pane 1-9"), - "focus previous": R(Key("cs-p") + Text("Core: Focus Previous") + Pause("4") + Key("enter"), rdescript="Atom: Focus Previous"), - "next pane": R(Key("cs-p") + Text("Window: Focus Previous Pane") + Pause("4") + Key("enter"), rdescript="Atom: Next Pane"), - "previous pane": R(Key("cs-p") + Text("Window: Focus Next Pane") + Pause("4") + Key("enter"), rdescript="Atom: Previous Pane"), + "focus previous": R(Key("cs-p") + Text("Core: Focus Previous") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Focus Previous"), + "next pane": R(Key("cs-p") + Text("Window: Focus Previous Pane") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Next Pane"), + "previous pane": R(Key("cs-p") + Text("Window: Focus Next Pane") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Previous Pane"), #Developer Submenu #"open in development mode": R(Key(""), rdescript="Open in Development Mode"), "run atom [specs]": R(Key("ac-s"), rdescript="Atom: Run Atoms Specs"), @@ -129,15 +134,15 @@ class CommandRule(MappingRule): #Selection Menu "[add] selection above []": R(Key("ac-up"), rdescript="Atom: Add Selection Above #") * Repeat(extra="n"), "[add] selection below []": R(Key("ac-down"), rdescript="Atom: Add Selection Below #") * Repeat(extra="n"), - "split into lines": R(Key("cs-p") + Text("Split Into Lines") + Pause("4") + Key("enter"), rdescript="Atom: Split Into lines"), + "split into lines": R(Key("cs-p") + Text("Split Into Lines") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Split Into lines"), "single Section": R(Key("escape"), rdescript="Atom: Single Section"), "select [to] top": R(Key("cs-home"), rdescript="Atom: Select to Top"), "select [to] bottom": R(Key("cs-end"), rdescript="Atom: Select to Bottom"), "select line": R(Key("c-l"), rdescript="Atom: Select Line"), - "select word []": R(Key("cs-p") + Text("Editor: Word") + Pause("4") + Key("enter"), rdescript="Atom: Select Word") * Repeat(extra="n"), + "select word []": R(Key("cs-p") + Text("Editor: Word") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Select Word") * Repeat(extra="n"), "[select] [to] beginning [of] word []": R(Key("cs-left"), rdescript="Atom: Select to Beginning of Word #") * Repeat(extra="n"), "[select] [to] end of word []": R(Key("cs-right"), rdescript="Atom: Select to End of Word #") * Repeat(extra="n"), - "[select] [to] beginning [of] line": R(Key("cs-p") + Text("Editor: Select to Beginning of Line") + Pause("4") + Key("enter"), rdescript="Atom: Select to Beginning of line"), + "[select] [to] beginning [of] line": R(Key("cs-p") + Text("Editor: Select to Beginning of Line") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Select to Beginning of line"), "[select] [to] first character of line": R(Key("s-home"), rdescript="Atom: Select to First Character of Line"), "[select] [to] end of line": R(Key("s-end"), rdescript="Atom: Select to End of line"), "[select] inside brackets": R(Key("ac-m"), rdescript="Atom: Select Inside Brackets"), @@ -146,8 +151,8 @@ class CommandRule(MappingRule): "replacing in buffer": R(Key("ac-f"), rdescript="Atom: Replacing in Buffer"), "select next": R(Key("c-d"), rdescript="Atom: Select Next"), "find select all": R(Key("a-f3"), rdescript="Atom: Select All"), - "find replace next": R(Key("cs-p") + Text("Find and Replace: Replace Next") + Pause("4") + Key("enter"), rdescript="Atom: Replace Next"), - "find replace all": R(Key("cs-p") + Text("Find and Replace: Replace All") + Pause("4") + Key("enter"), rdescript="Atom: Replace All"), + "find replace next": R(Key("cs-p") + Text("Find and Replace: Replace Next") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Replace Next"), + "find replace all": R(Key("cs-p") + Text("Find and Replace: Replace All") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Replace All"), "find buffer": R(Key("c-b"), rdescript="Atom: Find Buffer"), "find file": R(Key("c-p"), rdescript="Atom: Find File"), "find modified file": R(Key("cs-b"), rdescript="Atom: Find Modified File"), @@ -156,34 +161,34 @@ class CommandRule(MappingRule): "bracket [go to] match": R(Key("c-m"), rdescript="Atom: Go To Matching Bracket"), ##"select inside bracket": R(Key("ac-m"), rdescript="Atom: Select inside bracket"), "bracket remove [from] selection": R(Key("c-lbrace"), rdescript="Atom: Remove Bracket from Selection"), - "close [current] tag": R(Key("cs-p") + Text("Bracket Matcher: Close Tag") + Pause("4") + Key("enter"), rdescript="Atom: Close current tag"), + "close [current] tag": R(Key("cs-p") + Text("Bracket Matcher: Close Tag") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Close current tag"), "bracket remove matching": R(Key("ac-backspace"), rdescript="Atom: Remove matching brackets"), #Command Palette Submenu "[toggle] [command] palette": R(Key("cs-p"), rdescript="Atom: Toggle Command Palette"), #Dev Live Reload Submenu "reload [all] styles": R(Key("acs-r"), rdescript="Atom: Reload All Styles"), #Git Diff Submenu - "move to next diff [different]": R(Key("cs-p") + Text("Move to Next Diff") + Pause("4") + Key("enter"), rdescript="Atom: Move to Next Diff"), - "move to previous diff [different]": R(Key("cs-p") + Text("Move to Previous Diff") + Pause("4") + Key("enter"), rdescript="Atom: Move to Previous Different"), - "[toggle] diff List": R(Key("cs-p") + Text("Toggle Diff List") + Pause("4") + Key("enter"), rdescript="Atom: Toggle Diff List"), + "move to next diff [different]": R(Key("cs-p") + Text("Move to Next Diff") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Move to Next Diff"), + "move to previous diff [different]": R(Key("cs-p") + Text("Move to Previous Diff") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Move to Previous Different"), + "[toggle] diff List": R(Key("cs-p") + Text("Toggle Diff List") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Toggle Diff List"), #Keybinding Resolver Submenu - "toggle key [binding] resolver": R(Key("cs-p") + Text("Key Binding Resolver: Toggle") + Pause("4") + Key("enter"), rdescript="Atom: Toggle Keybinding Resolver"), #Dragonfly does not contain in key names 'period' or '.' + "toggle key [binding] resolver": R(Key("cs-p") + Text("Key Binding Resolver: Toggle") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Toggle Keybinding Resolver"), #Dragonfly does not contain in key names 'period' or '.' #Markdown Preview Submenu "markdown preview": R(Key("cs-m"), rdescript="Atom: Toggle Preview"), #Package Generator Submenu - "make|generate package": R(Key("cs-p") + Text("Package Generator: Generate Package") + Pause("4") + Key("enter"), rdescript="Atom: Generate Atom Package"), - "make|generate syntax theme": R(Key("cs-p") + Text("Package Generator: Generate Syntax Theme") + Pause("4") + Key("enter"), rdescript="Atom: Generate Atom Syntax Theme"), + "make|generate package": R(Key("cs-p") + Text("Package Generator: Generate Package") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Generate Atom Package"), + "make|generate syntax theme": R(Key("cs-p") + Text("Package Generator: Generate Syntax Theme") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Generate Atom Syntax Theme"), #Settings View Submenu ##"open setting": R(Key("c-comma"), rdescript="Atom: Open Setting"), - "show key bindings": R(Key("cs-p") + Text("Settings View: Show Key Bindings") + Pause("4") + Key("enter"), rdescript="Atom: Show Keybindings"), - "installed themes": R(Key("cs-p") + Text("Settings View: Installed Themes") + Pause("4") + Key("enter"), rdescript="Atom: Install Themes"), - "uninstalled themes": R(Key("cs-p") + Text("Settings View: Uninstall Themes") + Pause("4") + Key("enter"), rdescript="Atom: Uninstall Themes"), - "installed packages": R(Key("cs-p") + Text("Settings View: Installed Packages") + Pause("4") + Key("enter"), rdescript="Atom: Install Packages"), - "uninstalled packages": R(Key("cs-p") + Text("Settings View: Uninstalled Packages") + Pause("4") + Key("enter"), rdescript="Atom: Uninstall packages/themes"), - "search packages|themes": R(Key("cs-p") + Text("Settings View: Install Packages and Themes") + Pause("4") + Key("enter"), rdescript="Atom: Install Packages/Themes"), - "update packages": R(Key("cs-p") + Text("Settings View: Check for Package Update") + Pause("4") + Key("enter"), rdescript="Atom: Check for Packages"), + "show key bindings": R(Key("cs-p") + Text("Settings View: Show Key Bindings") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Show Keybindings"), + "installed themes": R(Key("cs-p") + Text("Settings View: Installed Themes") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Install Themes"), + "uninstalled themes": R(Key("cs-p") + Text("Settings View: Uninstall Themes") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Uninstall Themes"), + "installed packages": R(Key("cs-p") + Text("Settings View: Installed Packages") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Install Packages"), + "uninstalled packages": R(Key("cs-p") + Text("Settings View: Uninstalled Packages") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Uninstall packages/themes"), + "search packages|themes": R(Key("cs-p") + Text("Settings View: Install Packages and Themes") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Install Packages/Themes"), + "update packages": R(Key("cs-p") + Text("Settings View: Check for Package Update") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Check for Packages"), #Snippets Submenu - "expand": R(Key("cs-p") + Text("Snippets: Expand") + Pause("4") + Key("enter"), rdescript="Atom: Expand Snippets"), + "expand": R(Key("cs-p") + Text("Snippets: Expand") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Expand Snippets"), "next snippet": R(Key("tab"), rdescript="Atom: Next Stop|Snippet"), "previous snippet": R(Key("a-tab"), rdescript="Atom: Previous Stop|Snippet"), "available snippet": R(Key("as-tab"), rdescript="Atom: Available Snippets"), @@ -193,25 +198,25 @@ class CommandRule(MappingRule): "find symbol": R(Key("c-r"), rdescript="Atom: Find Symbol"), "project symbol": R(Key("cs-r"), rdescript="Atom: Project Symbol"), #Timecop Submenu - "timecop": R(Key("cs-p") + Text("timecop:view") + Pause("4") + Key("enter"), rdescript="Atom: Show Timecop"), + "timecop": R(Key("cs-p") + Text("timecop:view") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Show Timecop"), #Tree View Submenu "tree focus": R(Key("c-0"), rdescript="Atom: Toggle Focus on TreeView"), "tree [View] [toggle] view": R(Key("c-backslash"), rdescript="Atom: Toggle"), "tree [View] [reveal] active file": R(Key("cs-backslash"), rdescript="Atom: Reveal Active File"), - "tree [View] [toggle] side": R(Key("cs-p") + Text("Tree View: show") + Pause("4") + Key("enter"), rdescript="Atom: Toggle Tree Side"), + "tree [View] [toggle] side": R(Key("cs-p") + Text("Tree View: show") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Toggle Tree Side"), #Extras - "tree show": R(Key("cs-p") + Text("Tree View: Show") + Pause("4") + Key("enter"), rdescript="Atom: Tree View: Show"), - "tree rename": R(Key("cs-p") + Text("Tree View: Rename") + Pause("4") + Key("enter"), rdescript="Atom: Tree View: Rename"), - "tree remove": R(Key("cs-p") + Text("Tree View: Remove") + Pause("4") + Key("enter"), rdescript="Atom: Tree View: Remove"), - "tree add file": R(Key("cs-p") + Text("Tree View: Add File") + Pause("4") + Key("enter"), rdescript="Atom: Tree View: Add File"), - "tree duplicate": R(Key("cs-p") + Text("Tree View: Duplicate") + Pause("4") + Key("enter"), rdescript="Atom: Tree View: Duplicate"), - "tree add folder": R(Key("cs-p") + Text("Tree View: Add Folder") + Pause("4") + Key("enter"), rdescript="Atom: Tree View: Add Folder"), + "tree show": R(Key("cs-p") + Text("Tree View: Show") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Tree View: Show"), + "tree rename": R(Key("cs-p") + Text("Tree View: Rename") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Tree View: Rename"), + "tree remove": R(Key("cs-p") + Text("Tree View: Remove") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Tree View: Remove"), + "tree add file": R(Key("cs-p") + Text("Tree View: Add File") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Tree View: Add File"), + "tree duplicate": R(Key("cs-p") + Text("Tree View: Duplicate") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Tree View: Duplicate"), + "tree add folder": R(Key("cs-p") + Text("Tree View: Add Folder") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Tree View: Add Folder"), #Whitespaces Submenu - "remove trailing [white] spaces": R(Key("cs-p") + Text("Whitespace: Remove Trailing Whitespace") + Pause("4") + Key("enter"), rdescript="Atom: Remove Trailing White Spaces"), - "convert tabs [to] spaces": R(Key("cs-p") + Text("Whitespace: Convert Tabs to Spaces") + Pause("4") + Key("enter"), rdescript="Atom: Convert Tabs to Spaces"), - "convert spaces [to] tabs": R(Key("cs-p") + Text("Whitespace: Convert Spaces to Tabs") + Pause("4") + Key("enter"), rdescript="Atom: Convert Spaces to Tabs"), + "remove trailing [white] spaces": R(Key("cs-p") + Text("Whitespace: Remove Trailing Whitespace") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Remove Trailing White Spaces"), + "convert tabs [to] spaces": R(Key("cs-p") + Text("Whitespace: Convert Tabs to Spaces") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Convert Tabs to Spaces"), + "convert spaces [to] tabs": R(Key("cs-p") + Text("Whitespace: Convert Spaces to Tabs") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Convert Spaces to Tabs"), #Merge Conflicts Submenu - "git [detect] [merge] conflicts": R(Key("cs-p") + Text("Merge Conflicts") + Pause("4") + Key("enter"), rdescript="Atom: Detect"), + "git [detect] [merge] conflicts": R(Key("cs-p") + Text("Merge Conflicts") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Detect"), # ----Atom Optional Third-Party Packages and Dependencies----------------------------------------------------------------------------- #Install through command prompt, Atom install manager or a .bat file at http://tinyurl.com/Atom-Dependencies @@ -237,16 +242,16 @@ class CommandRule(MappingRule): #Toggle Quotes "toggle quotes": R(Key("cs-apostrophe"), rdescript="Atom: Toggle Quotes: Single or Double"), #Script - "script run [by] line": R(Key("cs-p") + Text("Script:Run Script Line Number") + Pause("4") + Key("enter"), rdescript="Atom: Script:Run Script by Line"), - "script close view": R(Key("cs-p") + Text("Script:Close View") + Pause("4") + Key("enter"), rdescript="Atom: Script:Close View"), - "script [run] options|configure": R(Key("cs-p") + Text("Script:Run Options") + Pause("4") + Key("enter"), rdescript="Atom: Script:Run Options or Configure"), - "script kill [process]": R(Key("cs-p") + Text("Script:Kill Process") + Pause("4") + Key("enter"), rdescript="Atom: Script:Kill Process"), - "script save [options]": R(Key("cs-p") + Text("Script:Save Options") + Pause("4") + Key("enter"), rdescript="Atom: Script:Save Options"), - "script close [options]": R(Key("cs-p") + Text("Script:Close Options") + Pause("4") + Key("enter"), rdescript="Atom: Script:Close Options"), - "script run": R(Key("cs-p") + Text("Script:Run") + Pause("4") + Key("enter"), rdescript="Atom: Script:run"), - "script copy [run] [results]": R(Key("cs-p") + Text("Script:Copy Run Results") + Pause("4") + Key("enter"), rdescript="Atom: Script:Copy Run Results"), + "script run [by] line": R(Key("cs-p") + Text("Script:Run Script Line Number") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Script:Run Script by Line"), + "script close view": R(Key("cs-p") + Text("Script:Close View") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Script:Close View"), + "script [run] options|configure": R(Key("cs-p") + Text("Script:Run Options") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Script:Run Options or Configure"), + "script kill [process]": R(Key("cs-p") + Text("Script:Kill Process") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Script:Kill Process"), + "script save [options]": R(Key("cs-p") + Text("Script:Save Options") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Script:Save Options"), + "script close [options]": R(Key("cs-p") + Text("Script:Close Options") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Script:Close Options"), + "script run": R(Key("cs-p") + Text("Script:Run") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Script:run"), + "script copy [run] [results]": R(Key("cs-p") + Text("Script:Copy Run Results") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Script:Copy Run Results"), #Delete Plus - "delete words": R(Key("cs-p") + Text("Delete Plus: Delete") + Pause("4") + Key("enter"), rdescript="Atom: Delete Plus"), + "delete words": R(Key("cs-p") + Text("Delete Plus: Delete") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Delete Plus"), #Last Edit "last edit": R(Key("c-i"), rdescript="Atom: Last Edit"), #Looper @@ -258,31 +263,31 @@ class CommandRule(MappingRule): "looping up": R(Key("wa-up"), rdescript="Atom: Looping Up"), "looping down": R(Key("wa-down"), rdescript="Atom: Looping Down"), #Open on GitHub - "github [open] blame": R(Key("cs-p") + Text("Open on GitHub: Blame") + Pause("4") + Key("enter"), rdescript="Atom: Open On Github @ Blame"), - "github [open] [branch] compare": R(Key("cs-p") + Text("Open on GitHub: Branch Compare") + Pause("4") + Key("enter"), rdescript="Atom: Open On Github @ Branch Compare"), - "github [open] [copy] URL": R(Key("cs-p") + Text("Open on GitHub: Copy URL") + Pause("4") + Key("enter"), rdescript="Atom: Open On Github @ Copy URL"), - "github [open] file": R(Key("cs-p") + Text("Open on GitHub: File") + Pause("4") + Key("enter"), rdescript="Atom: Open On Github @ File"), - "github [open] history": R(Key("cs-p") + Text("Open on GitHub: History") + Pause("4") + Key("enter"), rdescript="Atom: Open On Github @ History"), - "github [open] issues": R(Key("cs-p") + Text("Open on GitHub: Issues") + Pause("4") + Key("enter"), rdescript="Atom: Open On Github @ Issues"), - "github [open] repository": R(Key("cs-p") + Text("Open on GitHub: Repository") + Pause("4") + Key("enter"), rdescript="Atom: Open On Github @ Repository"), + "github [open] blame": R(Key("cs-p") + Text("Open on GitHub: Blame") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Open On Github @ Blame"), + "github [open] [branch] compare": R(Key("cs-p") + Text("Open on GitHub: Branch Compare") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Open On Github @ Branch Compare"), + "github [open] [copy] URL": R(Key("cs-p") + Text("Open on GitHub: Copy URL") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Open On Github @ Copy URL"), + "github [open] file": R(Key("cs-p") + Text("Open on GitHub: File") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Open On Github @ File"), + "github [open] history": R(Key("cs-p") + Text("Open on GitHub: History") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Open On Github @ History"), + "github [open] issues": R(Key("cs-p") + Text("Open on GitHub: Issues") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Open On Github @ Issues"), + "github [open] repository": R(Key("cs-p") + Text("Open on GitHub: Repository") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Open On Github @ Repository"), #Git Plus - "git add": R(Key("cs-p") + Text("Git Plus: Add") + Pause("4") + Key("enter"), rdescript="Atom: Git Add"), - "git add all": R(Key("cs-p") + Text("Git plus: Add All") + Pause("4") + Key("enter"), rdescript="Atom: Git Add All"), - "git diff": R(Key("cs-p") + Text("Git Plus: Diff") + Pause("4") + Key("enter"), rdescript="Atom: Git Diff"), - "git diff all": R(Key("cs-p") + Text("Git Plus: Diff All") + Pause("4") + Key("enter"), rdescript="Atom: Git Diff All"), - "git add commit": R(Key("cs-p") + Text("Git Plus: Add Commit") + Pause("4") + Key("enter"), rdescript="Atom: Git Add Commit"), - "git add all commit": R(Key("cs-p") + Text("Git Plus: Add All Commit") + Pause("4") + Key("enter"), rdescript="Atom: Git Add All Commit"), - "git add all commit push": R(Key("cs-p") + Text("Git Plus: Add All Commit Push") + Pause("4") + Key("enter"), rdescript="Atom: Git Add All Commit Push"), - "git log": R(Key("cs-p") + Text("Git Plus: Log") + Pause("4") + Key("enter"), rdescript="Atom: Git Git Log"), - "git merge": R(Key("cs-p") + Text("Git Plus: Merge") + Pause("4") + Key("enter"), rdescript="Atom: Git Git Merge"), - "git pull using rebase": R(Key("cs-p") + Text("Git Plus: Pull Using Rebase") + Pause("4") + Key("enter"), rdescript="Atom: Git Git Pull Using Rebase"), + "git add": R(Key("cs-p") + Text("Git Plus: Add") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Git Add"), + "git add all": R(Key("cs-p") + Text("Git plus: Add All") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Git Add All"), + "git diff": R(Key("cs-p") + Text("Git Plus: Diff") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Git Diff"), + "git diff all": R(Key("cs-p") + Text("Git Plus: Diff All") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Git Diff All"), + "git add commit": R(Key("cs-p") + Text("Git Plus: Add Commit") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Git Add Commit"), + "git add all commit": R(Key("cs-p") + Text("Git Plus: Add All Commit") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Git Add All Commit"), + "git add all commit push": R(Key("cs-p") + Text("Git Plus: Add All Commit Push") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Git Add All Commit Push"), + "git log": R(Key("cs-p") + Text("Git Plus: Log") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Git Git Log"), + "git merge": R(Key("cs-p") + Text("Git Plus: Merge") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Git Git Merge"), + "git pull using rebase": R(Key("cs-p") + Text("Git Plus: Pull Using Rebase") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Git Git Pull Using Rebase"), #Project Manager - "project manager": R(Key("cs-p") + Text("Project Manager:Toggle") + Pause("4") + Key("enter"), rdescript="Atom: Project Manager: Toggle"), - "project save": R(Key("cs-p") + Text("Project Manager:Save Project") + Pause("4") + Key("enter"), rdescript="Atom: Project Manager: Save Project"), - "project edit": R(Key("cs-p") + Text("Project Manager:Edit Project") + Pause("4") + Key("enter"), rdescript="Atom: Project Manager: Edit Project"), - "project reload setting": R(Key("cs-p") + Text("Project Manager:Project Settings") + Pause("4") + Key("enter"), rdescript="Atom: Project Manager: Project Settings"), + "project manager": R(Key("cs-p") + Text("Project Manager:Toggle") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Project Manager: Toggle"), + "project save": R(Key("cs-p") + Text("Project Manager:Save Project") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Project Manager: Save Project"), + "project edit": R(Key("cs-p") + Text("Project Manager:Edit Project") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Project Manager: Edit Project"), + "project reload setting": R(Key("cs-p") + Text("Project Manager:Project Settings") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Project Manager: Project Settings"), #Menu Sidebar - "[project] sidebar": R(Key("cs-p") + Text("Project Sidebar: Toggle") + Pause("4") + Key("enter"), rdescript="Atom: Project Sidebar: Toggle"), + "[project] sidebar": R(Key("cs-p") + Text("Project Sidebar: Toggle") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: Project Sidebar: Toggle"), #Expand Selection to Quotes "expand|fill quotes": R(Key("c-apostrophe"), rdescript="Atom: Expand Selection to Quotes"), #Auto Complete @@ -297,15 +302,15 @@ class CommandRule(MappingRule): #"text for voice command": R(Key("modifier-key"), rdescript="program name: command name/description"), #"": R(Key(""), rdescript="Atom: "), # Used for command that utilizes the "command palette" shortcut in the absence of assigned keyboard shortcut. - #"text for voice command": R(Key("cs-p") + Text("text as described in command palette") + Pause("4") + Key("enter"), rdescript="command name/description"), - #"": R(Key("cs-p") + Text("") + Pause("4") + Key("enter"), + #"text for voice command": R(Key("cs-p") + Text("text as described in command palette") + Pause(atom_palette_wait) + Key("enter"), rdescript="command name/description"), + #"": R(Key("cs-p") + Text("") + Pause(atom_palette_wait) + Key("enter"), #Atom Shortcut Snippets "dev keys [input] []": R(Text(' #"": R(Key("-"), rdescript="Atom: "),') + Key("enter"), rdescript="Macro: Dev Keys #") * Repeat(extra="n"), - "dev [command] palette []": R(Text(' #"": R(Key("cs-p") + Text("") + Pause("4") + Key("enter"), rdescript="Atom: "),') + Key("enter"), rdescript="Macro: Dev Command Palette #") * Repeat(extra="n"), - "dev convert": Text('R(Key("cs-p") + Text("") + Pause("4") + Key("enter"),') + Key("delete"), + "dev [command] palette []": R(Text(' #"": R(Key("cs-p") + Text("") + Pause(atom_palette_wait) + Key("enter"), rdescript="Atom: "),') + Key("enter"), rdescript="Macro: Dev Command Palette #") * Repeat(extra="n"), + "dev convert": Text('R(Key("cs-p") + Text("") + Pause(atom_palette_wait) + Key("enter"),') + Key("delete"), #Repeatable Snippets "dev numb keys [input] []": R(Text('#" []": R(Key("-"), rdescript="Atom: ") * Repeat(extra="n"),') + Key("enter"), rdescript="Macro: Numb Dev Keys #") * Repeat(extra="n"), - "dev numb [command] palette []": R(Text('#" []": R(Key("cs-p") + Text("") + Pause("4") + Key("enter") + Pause("4"), rdescript="Atom: ") * Repeat(extra="n"),') + Key("enter"), rdescript="Macro: Dev Numb Command Palette #") * Repeat(extra="n"), + "dev numb [command] palette []": R(Text('#" []": R(Key("cs-p") + Text("") + Pause(atom_palette_wait) + Key("enter") + Pause(atom_palette_wait), rdescript="Atom: ") * Repeat(extra="n"),') + Key("enter"), rdescript="Macro: Dev Numb Command Palette #") * Repeat(extra="n"), #Basic Dragonfly Snippets "dev key []": R(Text('"": Key(""),'), rdescript="Dragonfly: Print Dev Key #") * Repeat(extra="n"), "dev text []": R(Text('"": Text(""),'), rdescript="Dragonfly: Print Dev Text #") * Repeat(extra="n"), diff --git a/caster/lib/settings.py b/caster/lib/settings.py index 7cc10fae7..dd48df4f3 100644 --- a/caster/lib/settings.py +++ b/caster/lib/settings.py @@ -196,7 +196,8 @@ def init_default_values(): ("integer_remap_opt_in", False), ("keypress_wait", 50), # milliseconds ("max_ccr_repetitions", 16), - ("enable_match_logging", False) + ("enable_match_logging", False), + ("atom_palette_wait", "30") ]) # fuzzy string matching section From 0cb5aec3486284636192263882aa5780f58f6a9b Mon Sep 17 00:00:00 2001 From: mostlyjason Date: Sat, 2 Apr 2016 12:02:24 -0700 Subject: [PATCH 2/2] Fixing the check for settings --- caster/apps/atom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/caster/apps/atom.py b/caster/apps/atom.py index e092c4d7f..35669047d 100644 --- a/caster/apps/atom.py +++ b/caster/apps/atom.py @@ -18,7 +18,7 @@ class CommandRule(MappingRule): # How long to wait for the Atom palette to load before hitting the enter key atom_palette_wait = "30" - if settings.SETTINGS["apps"]["atom"]: + if settings.SETTINGS["miscellaneous"]["atom_palette_wait"]: atom_palette_wait = settings.SETTINGS["miscellaneous"]["atom_palette_wait"] mapping = {