autotype-rs 1.2.0 → 1.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Jeremiah-C27
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,48 +1,54 @@
1
1
  # autotype-rs
2
2
 
3
- Launch the Rust autotype app on **Windows x64**. Enter text, set the delay, click **Start typing**, then click the destination
4
- field. Press Escape to cancel.
5
-
6
- Version 1.2.0 includes the compact window, custom draggable header, and dark/light
7
- theme toggle. The delay defaults to 2 seconds and supports 0.1–3600 seconds.
8
-
9
- No Rust compiler is required to run the packaged app. The executable is bundled;
10
- installation does not download another binary or execute an install script.
11
-
12
- Run the current version:
13
-
14
- ```powershell
15
- npx autotype-rs@1.2.0
16
- bunx --bun autotype-rs@1.2.0
3
+ Compact Rust typing app for **Windows x64** and **Linux x64**, supporting both
4
+ **X11/Xorg** and **Wayland**. Adjustable delay (0.1–3600 seconds, default 2), custom
5
+ header, and dark/light themes.
6
+
7
+ ```sh
8
+ npx autotype-rs@1.3.2
9
+ bunx --bun autotype-rs@1.3.2
10
+ # or install once:
11
+ npm install -g autotype-rs@1.3.2
12
+ autotype-rs
17
13
  ```
18
14
 
19
- For a local package archive downloaded to your Windows PC:
15
+ Enter text, choose a delay, click **Start typing**, and focus your destination.
16
+ On Wayland, click **Enable typing** and approve the desktop keyboard-control dialog
17
+ first. Cancel or return to the app to stop; Escape works globally on Windows/X11
18
+ and when the app is focused on Wayland. Windows/X11 stop if the destination window
19
+ changes. Wayland cannot monitor other windows' focus, so changing destinations can
20
+ redirect the remaining text.
20
21
 
21
- ```powershell
22
- npm install -g .\autotype-rs-1.2.0.tgz
23
- autotype-rs
22
+ Wayland needs a desktop portal backend with RemoteDesktop keyboard-control support
23
+ (compatible GNOME/KDE installations). Xwayland does not bypass that requirement.
24
+ Linux needs a graphical session, glibc 2.35+, OpenGL/EGL, libxkbcommon and, on X11,
25
+ libxkbcommon-x11. On Debian/Ubuntu:
26
+
27
+ ```sh
28
+ sudo apt install libgl1 libegl1 libxkbcommon0 libxkbcommon-x11-0
24
29
  ```
25
30
 
26
- With Bun, use `bun add -g .\autotype-rs-1.2.0.tgz`, then `autotype-rs`.
27
- Node.js 18+ or Bun is required. The GUI runs independently of the terminal.
28
- `autotype-rs --help` and `autotype-rs --version` display information without starting it.
31
+ No Rust compiler is required. Both executables are bundled; installation does not
32
+ run an install script or download another binary. Node.js 18+ or Bun is required.
33
+ The GUI runs independently of the terminal. `--help` and `--version` work without
34
+ opening a window. Text stays in memory and is never uploaded or saved.
29
35
 
30
- Capital letters use actual Shift key presses. For Proxmox/noVNC, match the local
31
- and guest keyboard layouts and Caps Lock state. Characters unavailable as simple
32
- physical keys use Unicode input, which remote consoles may not support.
36
+ For Proxmox/noVNC, match local/guest keyboard layouts and Caps Lock. Windows/X11
37
+ use physical Shift for capitals; Unicode fallback may not work in remote consoles.
38
+ Wayland passes key symbols through the desktop compositor.
33
39
 
34
- ## Build and pack from the source repository
40
+ ## Build a package from the repository
35
41
 
36
- ```powershell
42
+ ```sh
43
+ npm run build:native --prefix npm
44
+ # On Linux with the Rust Windows GNU target and MinGW installed:
45
+ npm run build:native --prefix npm -- --target x86_64-pc-windows-gnu
46
+ npm test --prefix npm
37
47
  cd npm
38
- npm run build:native
39
- npm test
40
48
  npm pack
41
49
  ```
42
50
 
43
- Building requires Rust and the Windows C++ tools. Linux cross compilation requires
44
- MinGW-w64 and the `x86_64-pc-windows-gnu` Rust target. `prepack` checks the bundled
45
- file's Windows x64 GUI format, version, and SHA-256 before creating the archive.
46
-
47
- Registry publication requires npm sign-in. The unscoped npm package is public
48
- when published; it contains the launcher and executable, not the Rust source.
51
+ Native Linux builds need Rust and a C compiler. Native Windows builds need Rust
52
+ and Visual Studio C++ tools. CI combines Ubuntu 22.04 and Windows builds into one
53
+ package. Prepack validates both executable formats, metadata, hashes and Linux
54
+ executable permissions. Registry publication requires npm sign-in.
package/lib/launcher.cjs CHANGED
@@ -8,6 +8,7 @@ function launch({
8
8
  platform = process.platform,
9
9
  arch = process.arch,
10
10
  args = process.argv.slice(2),
11
+ env = process.env,
11
12
  packageRoot = path.resolve(__dirname, '..'),
12
13
  existsSync = fs.existsSync,
13
14
  spawn = childProcess.spawn,
@@ -16,7 +17,7 @@ function launch({
16
17
  setExitCode = (code) => { process.exitCode = code; },
17
18
  } = {}) {
18
19
  if (args.length === 1 && ['--help', '-h'].includes(args[0])) {
19
- stdout.write('autotype-rs\n\nOpens the Windows x64 typing app. Enter text, set the delay, click Start typing,\nthen click the destination field. Escape cancels typing.\n');
20
+ stdout.write('autotype-rs\n\nOpens the Windows or Linux x64 typing app. Enter text, set the delay, click Start typing,\nthen click the destination field. On Wayland, enable keyboard control first.\n');
20
21
  return;
21
22
  }
22
23
  if (args.length === 1 && ['--version', '-v'].includes(args[0])) {
@@ -31,11 +32,15 @@ function launch({
31
32
  fail('Unsupported arguments. Run autotype-rs --help for usage.');
32
33
  return;
33
34
  }
34
- if (platform !== 'win32' || arch !== 'x64') {
35
- fail('This app requires 64-bit Windows. Run it on the Windows PC where you want to type.');
35
+ if (!['win32', 'linux'].includes(platform) || arch !== 'x64') {
36
+ fail('This app requires x64 Windows or Linux.');
36
37
  return;
37
38
  }
38
- const executable = path.join(packageRoot, 'native', 'win32-x64', 'autotype.exe');
39
+ if (platform === 'linux' && !env.DISPLAY && !env.WAYLAND_DISPLAY) {
40
+ fail('Run this app in a Linux desktop session (X11 or Wayland).');
41
+ return;
42
+ }
43
+ const executable = path.join(packageRoot, 'native', `${platform}-x64`, platform === 'win32' ? 'autotype.exe' : 'autotype');
39
44
  if (!existsSync(executable)) {
40
45
  fail('The bundled executable is missing. Reinstall this package.');
41
46
  return;
@@ -43,7 +48,7 @@ function launch({
43
48
  try {
44
49
  const child = spawn(executable, [], {
45
50
  detached: true,
46
- stdio: 'ignore',
51
+ stdio: platform === 'linux' ? ['ignore', 'ignore', 'inherit'] : 'ignore',
47
52
  shell: false,
48
53
  });
49
54
  child.once('error', (error) => {
Binary file
@@ -0,0 +1,5 @@
1
+ {
2
+ "version": "1.3.2",
3
+ "target": "x86_64-unknown-linux-gnu",
4
+ "sha256": "7043678d65baa17ab61944c732c53cb64a580052bbe0377a322186c1c2fa0863"
5
+ }
Binary file
@@ -1,6 +1,5 @@
1
1
  {
2
- "version": "1.2.0",
3
- "target": "x86_64-pc-windows-gnu",
4
- "sha256": "8c00844da8e55e9be80419bd7021eba671b125cf178944b29fa0e884cccb20b2",
5
- "sourceCommit": "e6889ea001579088da9561b6dfb213f63466e08a"
2
+ "version": "1.3.2",
3
+ "target": "x86_64-pc-windows-msvc",
4
+ "sha256": "3966067df273532e810929240f36cb606359ce550f633176116998f54c798dc3"
6
5
  }
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "autotype-rs",
3
- "version": "1.2.0",
4
- "description": "Rust Windows typing app with adjustable delay, compact UI, and dark/light themes",
5
- "license": "UNLICENSED",
3
+ "version": "1.3.2",
4
+ "description": "Compact Rust typing app for Windows and Linux X11/Wayland with adjustable delay and dark/light themes",
5
+ "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/Jeremiah-C27/autotype.git",
@@ -15,10 +15,12 @@
15
15
  "bin/",
16
16
  "lib/",
17
17
  "native/",
18
- "README.md"
18
+ "README.md",
19
+ "LICENSE"
19
20
  ],
20
21
  "os": [
21
- "win32"
22
+ "win32",
23
+ "linux"
22
24
  ],
23
25
  "cpu": [
24
26
  "x64"