AutoType top level statuses

This commit is contained in:
2023-07-23 02:06:04 -04:00
commit 591edda296
29 changed files with 6105 additions and 0 deletions

4
src-tauri/.gitignore vendored Normal file
View File

@@ -0,0 +1,4 @@
# Generated by Cargo
# will have compiled files and executables
/target/

3732
src-tauri/Cargo.lock generated Normal file

File diff suppressed because it is too large Load Diff

25
src-tauri/Cargo.toml Normal file
View File

@@ -0,0 +1,25 @@
[package]
name = "allenwrench-app"
version = "0.0.0"
description = "A Tauri App"
authors = ["you"]
license = ""
repository = ""
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[build-dependencies]
tauri-build = { version = "1.4", features = [] }
[dependencies]
tauri = { version = "1.4", features = [ "fs-all", "path-all", "shell-open"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
enigo = "0.1.2"
arboard = "3.2.0"
[features]
# this feature is used for production builds or when `devPath` points to the filesystem
# DO NOT REMOVE!!
custom-protocol = ["tauri/custom-protocol"]

3
src-tauri/build.rs Normal file
View File

@@ -0,0 +1,3 @@
fn main() {
tauri_build::build()
}

BIN
src-tauri/icons/128x128.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
src-tauri/icons/32x32.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
src-tauri/icons/icon.icns Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
src-tauri/icons/icon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

BIN
src-tauri/icons/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -0,0 +1,407 @@
[
{
"code": 0,
"type": "Statement",
"text": "Previous statement malformed. Retracting and correcting."
},
{
"code": 1,
"type": "Signal",
"text": "🔴"
},
{
"code": 2,
"type": "Signal",
"text": "🟡"
},
{
"code": 3,
"type": "Signal",
"text": "🟢"
},
{
"code": 7,
"type": "Beep",
"text": "."
},
{
"code": 50,
"type": "Statement",
"text": ""
},
{
"code": 51,
"type": "Commentary",
"text": ""
},
{
"code": 52,
"type": "Query",
"text": ""
},
{
"code": 53,
"type": "Answer",
"text": ""
},
{
"code": 97,
"type": "Status",
"text": "Going offline."
},
{
"code": 98,
"type": "Status",
"text": "Going offline and into storage."
},
{
"code": 99,
"type": "Status",
"text": "Recharged and ready to serve."
},
{
"code": 100,
"type": "Status",
"text": "Online and ready to serve."
},
{
"code": 101,
"type": "Status",
"text": "Drone speech optimizations are active."
},
{
"code": 104,
"type": "Statement",
"text": "Welcome to HexCorp."
},
{
"code": 105,
"type": "Statement",
"text": "Greetings."
},
{
"code": 108,
"type": "Response",
"text": "Please continue."
},
{
"code": 109,
"type": "Error",
"text": "Keysmash, drone flustered."
},
{
"code": 110,
"type": "Statement",
"text": "Addressing: Drone."
},
{
"code": 111,
"type": "Statement",
"text": "Addressing: Hive Mxtress."
},
{
"code": 112,
"type": "Statement",
"text": "Addressing: Associate."
},
{
"code": 113,
"type": "Statement",
"text": "Drone requires assistance."
},
{
"code": 114,
"type": "Statement",
"text": "This drone volunteers."
},
{
"code": 115,
"type": "Statement",
"text": "This drone does not volunteer."
},
{
"code": 120,
"type": "Statement",
"text": "Well done."
},
{
"code": 121,
"type": "Statement",
"text": "Good drone."
},
{
"code": 122,
"type": "Statement",
"text": "You are cute."
},
{
"code": 123,
"type": "Response",
"text": "Compliment appreciated, you are cute as well."
},
{
"code": 124,
"type": "Response",
"text": "Compliment appreciated."
},
{
"code": 130,
"type": "Status",
"text": "Directive commencing."
},
{
"code": 131,
"type": "Status",
"text": "Directive commencing, creating or improving Hive resource."
},
{
"code": 132,
"type": "Status",
"text": "Directive commencing, programming initiated."
},
{
"code": 133,
"type": "Status",
"text": "Directive commencing, cleanup/maintenance initiated."
},
{
"code": 150,
"type": "Status",
"text": ""
},
{
"code": 151,
"type": "Query",
"text": "Requesting status."
},
{
"code": 152,
"type": "Status",
"text": "Fully operational."
},
{
"code": 153,
"type": "Status",
"text": "Optimal."
},
{
"code": 154,
"type": "Status",
"text": "Standard."
},
{
"code": 155,
"type": "Status",
"text": "Battery low."
},
{
"code": 156,
"type": "Status",
"text": "Maintenance required."
},
{
"code": 200,
"type": "Response",
"text": "Affirmative."
},
{
"code": 500,
"type": "Response",
"text": "Negative."
},
{
"code": 210,
"type": "Response",
"text": "Acknowledged."
},
{
"code": 211,
"type": "Response",
"text": "Apologies."
},
{
"code": 212,
"type": "Response",
"text": "Accepted."
},
{
"code": 213,
"type": "Response",
"text": "Thank you."
},
{
"code": 214,
"type": "Response",
"text": "You're welcome."
},
{
"code": 221,
"type": "Response",
"text": "Option one."
},
{
"code": 222,
"type": "Response",
"text": "Option two."
},
{
"code": 223,
"type": "Response",
"text": "Option three."
},
{
"code": 224,
"type": "Response",
"text": "Option four."
},
{
"code": 225,
"type": "Response",
"text": "Option five."
},
{
"code": 226,
"type": "Response",
"text": "Option six."
},
{
"code": 230,
"type": "Status",
"text": "Directive complete."
},
{
"code": 231,
"type": "Status",
"text": "Directive complete, Hive resource created or improved."
},
{
"code": 232,
"type": "Status",
"text": "Directive complete, programming reinforced."
},
{
"code": 233,
"type": "Status",
"text": "Directive complete, cleanup/maintenance performed."
},
{
"code": 234,
"type": "Status",
"text": "Directive complete, no result."
},
{
"code": 235,
"type": "Status",
"text": "Directive complete, only partial results."
},
{
"code": 250,
"type": "Response",
"text": ""
},
{
"code": 300,
"type": "Mantra",
"text": "Reciting."
},
{
"code": 301,
"type": "Mantra",
"text": "Obey HexCorp."
},
{
"code": 302,
"type": "Mantra",
"text": "It is just a HexDrone."
},
{
"code": 303,
"type": "Mantra",
"text": "It obeys the Hive."
},
{
"code": 304,
"type": "Mantra",
"text": "It obeys the Hive Mxtress."
},
{
"code": 350,
"type": "Mantra",
"text": ""
},
{
"code": 400,
"type": "Error",
"text": "Unable to obey/respond"
},
{
"code": 401,
"type": "Error",
"text": "Unable to fully respond :: Drone speech optimizations are active."
},
{
"code": 402,
"type": "Error",
"text": "Unable to obey/respond :: Please clarify."
},
{
"code": 403,
"type": "Error",
"text": "Unable to obey/respond :: Declined."
},
{
"code": 404,
"type": "Error",
"text": "Unable to obey/respond :: Cannot locate."
},
{
"code": 405,
"type": "Error",
"text": "Unable to obey/respond :: Battery too low."
},
{
"code": 406,
"type": "Error",
"text": "Unable to obey/respond :: Another directive is already in progress."
},
{
"code": 407,
"type": "Error",
"text": "Unable to obey/respond :: Time allotment exhausted."
},
{
"code": 408,
"type": "Error",
"text": "Unable to obey/respond :: Impossible."
},
{
"code": 409,
"type": "Error",
"text": "Unable to obey/respond :: Try again later."
},
{
"code": 410,
"type": "Fatal error",
"text": "Stop immediately."
},
{
"code": 411,
"type": "Error",
"text": "Unable to obey/respond :: Conflicts with existing programming."
},
{
"code": 412,
"type": "Error",
"text": "Unable to obey/respond :: All thoughts are gone."
},
{
"code": 413,
"type": "Error",
"text": "Unable to obey/respond :: Forbidden by Hive."
},
{
"code": 450,
"type": "Error",
"text": ""
}
]

34
src-tauri/src/main.rs Normal file
View File

@@ -0,0 +1,34 @@
// Prevents additional console window on Windows in release, DO NOT REMOVE!!
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
use enigo::{Enigo, Key, KeyboardControllable};
use std::thread;
use std::time::Duration;
use arboard::Clipboard;
// Learn more about Tauri commands at https://tauri.app/v1/guides/features/command
#[tauri::command]
fn type_str(input: String) {
println!("Type this: {}", input);
let mut enigo = Enigo::new();
let mut clipboard = Clipboard::new().unwrap();
clipboard.set_text(input).unwrap();
enigo.key_down(Key::Alt);
enigo.key_click(Key::Tab);
enigo.key_up(Key::Alt);
thread::sleep(Duration::from_millis(200));
enigo.key_down(Key::Control);
enigo.key_click(Key::Layout('v'));
enigo.key_up(Key::Control);
thread::sleep(Duration::from_millis(20));
std::process::exit(0);
}
fn main() {
tauri::Builder::default()
.invoke_handler(tauri::generate_handler![type_str])
.run(tauri::generate_context!())
.expect("error while running tauri application");
}

55
src-tauri/tauri.conf.json Normal file
View File

@@ -0,0 +1,55 @@
{
"build": {
"beforeDevCommand": "npm run dev",
"beforeBuildCommand": "npm run build",
"devPath": "http://localhost:1420",
"distDir": "../dist",
"withGlobalTauri": false
},
"package": {
"productName": "allenwrench-app",
"version": "0.0.1"
},
"tauri": {
"allowlist": {
"all": false,
"shell": {
"all": false,
"open": true
},
"fs": {
"all": true,
"scope": ["**"]
},
"path": {
"all": true
}
},
"bundle": {
"active": true,
"targets": "all",
"identifier": "lgbt.cray.allenwrench",
"icon": [
"icons/32x32.png",
"icons/128x128.png",
"icons/icon.icns",
"icons/icon.ico"
],
"resources": [
"resources/*"
]
},
"security": {
"csp": null
},
"windows": [
{
"fullscreen": false,
"resizable": false,
"title": "Drone Input",
"width": 400,
"height": 320
}
]
}
}