-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit a0fdde9
Showing
25 changed files
with
1,050 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = crlf | ||
indent_size = 4 | ||
indent_style = space | ||
insert_final_newline = true | ||
max_line_length = 120 | ||
tab_width = 4 | ||
|
||
ij_javascript_force_quote_style = true | ||
ij_javascript_use_double_quotes = false | ||
ij_javascript_force_semicolon_style = true | ||
|
||
[*.js] | ||
indent_size = 2 | ||
|
||
[*.json] | ||
indent_size = 2 | ||
|
||
[*.css] | ||
indent_size = 2 | ||
|
||
[*.html] | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.idea/ | ||
output/ | ||
venv/ | ||
__pycache__/ | ||
*.pyc | ||
file_version_info.txt |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Mouseee | ||
|
||
Control your mouse from your phone in the faster way possible. | ||
|
||
## Installation | ||
|
||
Download the latest release on your computer (device you want to control). | ||
|
||
## Usage | ||
|
||
Run the `Mouseee.exe` file, and you should see the local network address to visit via phone browser. | ||
|
||
## Features | ||
|
||
- Move your computer mouse with your phone. | ||
- Tap to click and tab with 2 fingers to right-click. | ||
|
||
## Contact Us | ||
|
||
Email us at hello@savandbros.com and share your experience or feedback. | ||
|
||
## Built with | ||
|
||
Here's a list of cool things made Mouseee possible. | ||
|
||
- [Python](https://www.python.org/) | ||
- [JetBrains](https://www.jetbrains.com/) | ||
- [PyCharm](https://www.jetbrains.com/pycharm/) | ||
|
||
## About | ||
|
||
Made with 💖 by [Savand Bros](https://savandbros.com) © 2022. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
__version__ = "1.0.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
from os import getcwd, path | ||
|
||
import mouse | ||
from flask import Flask, render_template, json | ||
from flask_sock import Sock | ||
|
||
from __init__ import __version__ | ||
|
||
|
||
def get_path(file: str): | ||
return path.join(getcwd(), file) | ||
|
||
|
||
app = Flask(__name__, template_folder=get_path("templates"), static_folder=get_path("static")) | ||
app.config.from_file(get_path("config.json"), load=json.load) | ||
|
||
sock = Sock(app) | ||
|
||
|
||
@app.route("/") | ||
def index(): | ||
return render_template("index.html") | ||
|
||
|
||
@sock.route("/") | ||
def handle(instance): | ||
while True: | ||
data = json.loads(instance.receive()) | ||
if data["event"] == "click": | ||
mouse.click(data["data"]["button"]) | ||
elif data["event"] == "move": | ||
mouse.move(data["data"]["x"], data["data"]["y"], False) | ||
|
||
|
||
if __name__ == "__main__": | ||
print(f"Mouseee v{__version__}\n") | ||
app.run(host="0.0.0.0", port=5555) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
{ | ||
"version": "auto-py-to-exe-configuration_v1", | ||
"pyinstallerOptions": [ | ||
{ | ||
"optionDest": "noconfirm", | ||
"value": true | ||
}, | ||
{ | ||
"optionDest": "filenames", | ||
"value": "C:/dev/AmirSavand/mouseee/app.py" | ||
}, | ||
{ | ||
"optionDest": "onefile", | ||
"value": false | ||
}, | ||
{ | ||
"optionDest": "console", | ||
"value": true | ||
}, | ||
{ | ||
"optionDest": "icon_file", | ||
"value": "C:/dev/AmirSavand/mouseee/static/icon.ico" | ||
}, | ||
{ | ||
"optionDest": "name", | ||
"value": "Mouseee" | ||
}, | ||
{ | ||
"optionDest": "ascii", | ||
"value": false | ||
}, | ||
{ | ||
"optionDest": "clean_build", | ||
"value": true | ||
}, | ||
{ | ||
"optionDest": "loglevel", | ||
"value": "INFO" | ||
}, | ||
{ | ||
"optionDest": "strip", | ||
"value": false | ||
}, | ||
{ | ||
"optionDest": "noupx", | ||
"value": false | ||
}, | ||
{ | ||
"optionDest": "disable_windowed_traceback", | ||
"value": false | ||
}, | ||
{ | ||
"optionDest": "version_file", | ||
"value": "C:/dev/AmirSavand/mouseee/file_version_info.txt" | ||
}, | ||
{ | ||
"optionDest": "embed_manifest", | ||
"value": true | ||
}, | ||
{ | ||
"optionDest": "uac_admin", | ||
"value": false | ||
}, | ||
{ | ||
"optionDest": "uac_uiaccess", | ||
"value": false | ||
}, | ||
{ | ||
"optionDest": "win_private_assemblies", | ||
"value": false | ||
}, | ||
{ | ||
"optionDest": "win_no_prefer_redirects", | ||
"value": false | ||
}, | ||
{ | ||
"optionDest": "bootloader_ignore_signals", | ||
"value": false | ||
}, | ||
{ | ||
"optionDest": "datas", | ||
"value": "C:/dev/AmirSavand/mouseee/static;static/" | ||
}, | ||
{ | ||
"optionDest": "datas", | ||
"value": "C:/dev/AmirSavand/mouseee/templates;templates/" | ||
}, | ||
{ | ||
"optionDest": "datas", | ||
"value": "C:/dev/AmirSavand/mouseee/config.json;." | ||
}, | ||
{ | ||
"optionDest": "datas", | ||
"value": "C:/dev/AmirSavand/mouseee/README.md;." | ||
}, | ||
{ | ||
"optionDest": "datas", | ||
"value": "C:/dev/AmirSavand/mouseee/LICENSE;." | ||
}, | ||
{ | ||
"optionDest": "datas", | ||
"value": "C:/dev/AmirSavand/mouseee/__init__.py;." | ||
} | ||
], | ||
"nonPyinstallerOptions": { | ||
"increaseRecursionLimit": true, | ||
"manualArguments": "" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
./version.sh &&\ | ||
cd .. &&\ | ||
echo "Opening builder" &&\ | ||
auto-py-to-exe --config=bin/build.json &&\ | ||
echo "Built into dir (/output/Mouseee/)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
echo "Cleaning build output" &&\ | ||
rm -rf ../output &&\ | ||
echo "Cleaning version file" &&\ | ||
rm -rf ../file_version_info.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
echo "Generating version file" &&\ | ||
create-version-file version.yml --outfile ../file_version_info.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Version: 1.0.0.0 | ||
CompanyName: Savand Bros | ||
FileDescription: Control your mouse from your phone in the faster way possible. | ||
InternalName: Mouseee | ||
LegalCopyright: Savand Bros © 2022 | ||
OriginalFilename: Mouseee.exe | ||
ProductName: Mouseee |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"ENVIRONMENT": "production", | ||
"TESTING": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
-r requirements.txt | ||
|
||
auto-py-to-exe==2.18.1 | ||
pyinstaller-versionfile==2.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Flask==2.1.1 | ||
Jinja2==3.1.1 | ||
flask-sock==0.5.2 | ||
mouse==0.7.1 |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"theme_color": "#00A885", | ||
"background_color": "#00A885", | ||
"display": "fullscreen", | ||
"scope": "/", | ||
"start_url": "/", | ||
"name": "Mouseee", | ||
"short_name": "Mouseee", | ||
"author": "Savand Bros", | ||
"description": "Control your mouse from your phone in the faster way possible.", | ||
"icons": [ | ||
{ | ||
"src": "/static/manifest/icon-192x192.png", | ||
"sizes": "192x192", | ||
"type": "image/png" | ||
}, | ||
{ | ||
"src": "/static/manifest/icon-256x256.png", | ||
"sizes": "256x256", | ||
"type": "image/png" | ||
}, | ||
{ | ||
"src": "/static/manifest/icon-384x384.png", | ||
"sizes": "384x384", | ||
"type": "image/png" | ||
}, | ||
{ | ||
"src": "/static/manifest/icon-512x512.png", | ||
"sizes": "512x512", | ||
"type": "image/png" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
window.addEventListener('load', () => { | ||
console.log('Remoteee Web v1.0.0'); | ||
|
||
const sensor = document.querySelector('#sensor'); | ||
const ws = new WebSocket(`ws://${location.host}`); | ||
const touch = { | ||
start: {x: 0, y: 0}, | ||
}; | ||
const send = (event, data) => { | ||
ws.send(JSON.stringify({event, data})); | ||
}; | ||
|
||
ws.addEventListener('open', () => { | ||
console.debug('Connected to server'); | ||
sensor.classList.add('on'); | ||
sensor.classList.remove('off'); | ||
}); | ||
|
||
ws.addEventListener('close', (event) => { | ||
console.debug(`Disconnected from server (code ${event.code})`); | ||
sensor.classList.remove('on'); | ||
sensor.classList.add('off'); | ||
}); | ||
|
||
sensor.addEventListener('click', () => { | ||
send('click', {button: 'left'}); | ||
}); | ||
|
||
sensor.addEventListener('touchstart', (event) => { | ||
touch.start.x = event.touches[0].screenX; | ||
touch.start.y = event.touches[0].screenY; | ||
|
||
if (event.touches.length === 2) { | ||
send('click', {button: 'right'}); | ||
} | ||
}); | ||
|
||
sensor.addEventListener('touchmove', (event) => { | ||
const data = { | ||
x: (event.changedTouches[0].screenX - touch.start.x) * 1.8, | ||
y: (event.changedTouches[0].screenY - touch.start.y) * 1.8, | ||
}; | ||
if (!data.x && !data.y) { | ||
return; | ||
} | ||
send('move', data); | ||
touch.start.x = event.touches[0].screenX; | ||
touch.start.y = event.touches[0].screenY; | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
html { | ||
touch-action: manipulation; | ||
} | ||
|
||
body { | ||
overscroll-behavior: contain; | ||
} | ||
|
||
html, | ||
body { | ||
width: 100%; | ||
height: 100%; | ||
margin: 0; | ||
padding: 0; | ||
} | ||
|
||
#sensor { | ||
position: fixed; | ||
top: 0; | ||
left: 0; | ||
width: 100%; | ||
height: 100%; | ||
background: #00A885; | ||
border: none; | ||
border-radius: 0; | ||
padding: 0; | ||
margin: 0; | ||
} | ||
|
||
#sensor.off { | ||
pointer-events: none; | ||
touch-action: none; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport"> | ||
<meta content="ie=edge" http-equiv="X-UA-Compatible"> | ||
<meta name="theme-color" content="#00A885"> | ||
<link rel="icon" type="image/png" sizes="1024x1024" href="/static/icon.png"> | ||
<link href="/static/styles.css" rel="stylesheet"> | ||
<link rel="manifest" href="/static/manifest/manifest.json"> | ||
<title>Mouseee</title> | ||
</head> | ||
<body> | ||
<button class="off" id="sensor"></button> | ||
<script src="/static/scripts.js"></script> | ||
</body> | ||
</html> |