Skip to content

WalkerRout/dispatch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dispatch

Define global keyboard shortcuts to execute shell commands

Platforms

  • ✔️ Windows

  • ✔️ Linux

  • ❓MacOS (untested)

Binary expects that file dispatch.json exists in the same directory as the executable, dispatch.log will be automatically generated on each run.

Example dispatch.json

Modifier keys are: 'Ctrl', 'Shift', 'Alt', and 'Super'. There is no built in exit key, but you can send b"shutdown" to localhost:3599 to gracefully terminate the application.

{
  "keybinds": [
    {
      "keys": ["Ctrl", "Shift", "Alt", "E"],
      "script": "powershell -Command \"echo shutdown | ncat 127.0.0.1 3599\""
    },
    {
      "keys": ["Ctrl", "Shift", "Alt", "T"],
      "script": "PowerShell -Command \"Add-Type -AssemblyName PresentationFramework;[System.Windows.MessageBox]::Show('Daemon Running')\""
    },
    {
      "keys": ["Shift", "Super", "R"],
      "script": "firefox -private-window https://www.rust-lang.org/"
    },
    {
      "keys": ["Shift", "Q", "W", "E"],
      "script": "..."
    }
  ]
}

Bugs

  • Adding comments to the dispatch.json file will result in an invalid config

About

Global keybind listener with hot reloading for configuration files

Topics

Resources

License

Stars

1 star

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages