Skip to content

Commit

Permalink
Adding icon and changed settings.json file name
Browse files Browse the repository at this point in the history
  • Loading branch information
VinceBT committed Feb 1, 2022
1 parent 4ca3f14 commit 84f7f18
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 11 deletions.
File renamed without changes.
1 change: 1 addition & 0 deletions LBMM_stop.vbs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CreateObject("Wscript.Shell").Run "taskkill /f /im LBMM.exe", 0
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,25 @@ This is a third-party tool for [LittleBigMouse](https://github.com/mgth/LittleBi

### Basic
- Go to the [releases](https://github.com/VinceBT/LBMM/releases) page and download the latest release's `LBMM.zip` and extract it to your favorite location
- Double-click the `LBMM.vbs` script, now you should have a running `Node.js Javascript Runtime` process inside Task Manager
- Double-click the `LBMM_run.vbs` script, now you should have a running `LBMM.exe` process inside Task Manager "Details" tab
- When focusing a window that is specified in the settings, the LBM icon should turn grey and turn back green when focusing a regular one, like this
![eZmF3Np9Co](https://user-images.githubusercontent.com/1362505/151820434-05772094-632d-4884-8828-8f4b275ebee4.gif)

You can edit the `settings.json` to add a program of your choice (you just need to specify the game executable), or to adjust some other settings.
Just remember to kill the `Node.js Javascript Runtime` process and run again the `LBMM.vbs` script.
You can edit the `configuration.json` to add a program of your choice (you just need to specify the game executable), or to adjust some other settings.
Just remember to kill the `LBMM.exe` process inside Task Manager "Details" tab and run again the `LBMM_run.vbs` script.

### Automatic
If you want to make it run automatically on every startup (this method is from [this article](https://keestalkstech.com/2016/07/start-nodejs-app-windowless-windows/#vbs-to-the-rescue)).

- Make sure you followed the Basic steps first
- Open Explorer and paste `%AppData%\Microsoft\Windows\Start Menu\Programs\Startup\` into the address bar, like this
![image](https://user-images.githubusercontent.com/1362505/151819930-d2028edb-c6f0-422a-b3a1-2631f6d2fccb.png)
- Create a new shortcut and point it to the `LBMM.vbs` file inside the LBMM folder
- Create a new shortcut and point it to the `LBMM_run.vbs` file inside the LBMM folder
- Next time your computer will start, it should run automatically

## Settings

All these settings can be changed inside `settings.json`, you will have to kill the Node process and restart it apply the changes.
All these settings can be changed inside `configuration.json`, you will have to kill the Node process and restart it apply the changes.

- `daemon`: Where the LittleBigMouse_Daemon.exe file is located on your system
- `arguments`: Arguments passed to the daemon to turn it on or off, you should not have to touch this
Expand Down
Binary file added assets/iconset.ico
Binary file not shown.
Binary file added assets/image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/refresh_icon_cache.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ie4uinit.exe -show
6 changes: 5 additions & 1 deletion settings.json → configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"Gw2.exe",
"Gw2-64.exe",
"Valorant.exe",
"Rocket League.exe",
"RocketLeague.exe",
"destiny2.exe",
"ModernWarfare.exe",
"Overwatch.exe",
Expand All @@ -19,6 +19,10 @@
"FortniteClient-Win64-Shipping.exe",
"FortniteClient-Win64-Shipping_BE.exe",
"FSD.exe",
"SC2.exe",
"dota2.exe",
"war3.exe",
"Warcraft III.exe",
"Back4Blood.exe"
],
"default": true,
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
{
"name": "lbmm",
"version": "1.0.1",
"version": "1.0.2",
"description": "",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"start": "cross-env NODE_ENV=development ts-node src/index.ts",
"dev": "cross-env NODE_ENV=development nodemon src/index.ts",
"compile": "tsc",
"executable": "npm run compile && nexe dist/index.js --build --verbose",
"executable": "npm run compile && nexe dist/index.js --name LBMM --icon assets/iconset.ico --build --verbose",
"pack": "cd portable && bestzip ../LBMM.zip *",
"preportable": "rimraf portable",
"portable": "npm run executable -- -o portable/LBMM.exe",
"postportable": "copyfiles LBMM.vbs settings.json node_modules/**/addon.node node_modules/exiftool-vendored.exe/bin/exiftool.exe portable && npm run pack",
"postportable": "copyfiles LBMM_run.vbs configuration.json node_modules/**/addon.node node_modules/exiftool-vendored.exe/bin/exiftool.exe portable && npm run pack",
"build": "npm run executable -- -o LBMM.exe",
"clean": "rimraf node_modules LBMM.exe portable dist LBMM.zip",
"test": "echo \"Error: no test specified\" && exit 1"
Expand Down
2 changes: 1 addition & 1 deletion src/Configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ interface SettingsMap {
}

const settingsRaw = fs
.readFileSync(path.resolve(process.cwd(), "settings.json"))
.readFileSync(path.resolve(process.cwd(), "configuration.json"))
.toString();
const settingsJson = JSON.parse(settingsRaw) as SettingsMap;

Expand Down

0 comments on commit 84f7f18

Please sign in to comment.