Skip to content

Commit

Permalink
Merge pull request #3 from projectstorm/device_events
Browse files Browse the repository at this point in the history
Add device events (attach and detach) with better logger and config storage
  • Loading branch information
dylanvorster authored Feb 26, 2024
2 parents 2a83d06 + 7de65cb commit 1de7583
Show file tree
Hide file tree
Showing 19 changed files with 670 additions and 208 deletions.
File renamed without changes.
3 changes: 3 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ jobs:
with:
version: latest

- name: 'Some tooling for GYP libs'
run: sudo -H pip install setuptools

- name: PNPM install
run: pnpm install

Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/prettier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ jobs:


- uses: actions/checkout@v2 # Check out the repository first.
- uses: actionsx/prettier@v2
- uses: creyD/[email protected]
with:
# prettier CLI arguments.
args: --check --ignore-path .prettierignore --config .prettierrc '**/*.{ts,tsx,js,jsx}'
dry: true
prettier_options: --check --config .prettierrc 'src/**/*.{ts,tsx}'
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"semi": true,
"singleQuote": true,
"tabWidth": 2,
"useTabs": false,
"printWidth": 120,
"trailingComma": "none"
}
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,17 @@

## Intro

Finally, a system for Mac that allows you to have multiple mice, multiple monitors and assign each to one another.
While Mac allows for multiple mice plugged-in at the same time, it doesn't allow multiple _cursors_ at the same time.
Finally, a system for Mac that allows you to have multiple mice, multiple monitors and assign each to one another.
While Mac allows for multiple mice plugged-in at the same time, it doesn't allow multiple _cursors_ at the same time.

DynaMouse allows you to assign a specific display to a dedicated mouse device (including the built-in mac trackpads) so that when you have multiple screens in a studio-like/complex workstation setup (and far apart from each other), you don't have to drag your mouse over to the other screen.

Behold:

![](screenshots/screenshot.png)
![](screenshots/screenshot1.png)
![](screenshots/screenshot2.png)

When you first start DynaMouse and start configuring it, you will be asked to enable a few settings in System Preferences so that DynaMouse can:

* Input monitoring (Access HID devices)
* Accessibility (Control the mouse position)
When you first start DynaMouse and start configuring it, you will be asked to enable Accessibility permissions in System Preferences so that DynaMouse can monitor usb pointer devices and also control the mouse position on the screen. Dynamouse will wait for these permissions to be enabled before continuing to boot up :)

## Features

Expand All @@ -27,6 +25,8 @@ When you first start DynaMouse and start configuring it, you will be asked to en
* Each mouse's position is remembered on each screen
* Non-obtrusive: doesn't lock the mouse to screen bounds, i.e. you can still drag a mouse to a different screen.
* Can be configured to launch on login.
* Can handle usb devices being attached / detached
* Specify a startup delay (useful when various devices are busy booting up after login)

## Devices tested

Expand Down Expand Up @@ -58,4 +58,4 @@ I would appreciate some help on fixing this :)

### Releasing

Binaries are auto-created and a release is published when a new tag is pushed to master.
Binaries are auto-created and a release is published when a new tag is pushed to master.
28 changes: 17 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"build": "tsc",
"watch": "tsc --watch",
"start": "electron .",
"format": "prettier --write \"**/*.{ts,tsx,js,jsx}\"",
"format": "prettier --config .prettierrc --write \"src/**/*.{ts,tsx}\"",
"app:dir": "electron-builder --dir",
"app:dist": "electron-builder",
"prepare": "rm -rf node_modules/electron/dist && node node_modules/electron/install.js"
Expand All @@ -33,23 +33,29 @@
}
},
"dependencies": {
"uuid": "^9.0.1",
"node-hid": "^3.0.0",
"@jitsi/robotjs": "^0.6.13",
"auto-launch": "^5.0.6",
"async": "^3.2.5",
"electron-json-storage": "^4.6.0",
"usb": "^2.11.0",
"lodash": "^4.17.21",
"@jitsi/robotjs": "^0.6.13",
"auto-launch": "^5.0.6"
"node-hid": "^3.0.0",
"source-map-support": "^0.5.21",
"usb": "^2.11.0",
"uuid": "^9.0.1",
"winston": "^3.11.0",
"node-mac-permissions": "^2.3.0"
},
"devDependencies": {
"@types/async": "^3.2.24",
"@types/auto-launch": "^5.0.5",
"@types/electron-json-storage": "^4.5.4",
"@types/lodash": "^4.14.202",
"@types/node": "^20.11.20",
"@types/uuid": "^9.0.8",
"@types/node": "^20.11.10",
"electron": "^28.2.0",
"electron-builder": "^24.9.1",
"electron": "^29.0.1",
"electron-builder": "^24.12.0",
"prettier": "^3.2.5",
"typescript": "^5.3.3",
"prettier": "^3.2.4",
"@types/lodash": "^4.14.202"
"husky": "^9.0.11"
}
}
Loading

0 comments on commit 1de7583

Please sign in to comment.