Giter Club home page Giter Club logo

onusbconnect's Introduction

OnUSBConnect

Executes action when USB device of specified Vendor and Product ID is connected to the computer. The rationale for this was easy swithing of input and monitors between two computers. A common device for both machines was a USB hub switch providing mouse and keyboard. Unfortunately the hub has only a single button switching connection but provides no extra feedback or message. However switching monitors can be triggered on event of keyboard being plugged in.

Usage

OnUSBConnect runs as windowless tray app. It will wait until a specified USB device is connected to the computer. Once it is it will run the command passed to it.

Syntax & options:

onusbconnect vendorid:productid command

Installation

Place onusbconnect.exe somewhere safe and run it, for example like this:

onusbconnect.exe 413c:2107 controlmymonitor.exe /SetValue Primary 60h 17 /SetValue Secondary 60h 17

To find the monitor options use https://www.nirsoft.net/utils/control_my_monitor.html To get vendorid:productid use https://www.nirsoft.net/utils/usb_devices_view.html

Building

Clone the repo and build running:

compile.bat 

csc.exe should be in path. Image Magick's magick.exe is optional, as ico file is already in repo.

License

MIT

USB_icon.svg is taken from Wikipedia

onusbconnect's People

Watchers

rostok avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.