autotype-rs 1.3.2 → 1.4.0

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/README.md CHANGED
@@ -5,22 +5,33 @@ Compact Rust typing app for **Windows x64** and **Linux x64**, supporting both
5
5
  header, and dark/light themes.
6
6
 
7
7
  ```sh
8
- npx autotype-rs@1.3.2
9
- bunx --bun autotype-rs@1.3.2
8
+ npx autotype-rs@1.4.0
9
+ bunx --bun autotype-rs@1.4.0
10
10
  # or install once:
11
- npm install -g autotype-rs@1.3.2
11
+ npm install -g autotype-rs@1.4.0
12
12
  autotype-rs
13
13
  ```
14
14
 
15
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.
21
-
22
- Wayland needs a desktop portal backend with RemoteDesktop keyboard-control support
23
- (compatible GNOME/KDE installations). Xwayland does not bypass that requirement.
16
+ On Wayland, click **Enable typing** and approve the desktop keyboard-control dialog.
17
+ Cancel works during approval and typing; returning to the app also stops typing.
18
+ Escape works globally on Windows/X11 and when focused on Wayland. Global shortcuts
19
+ are handled separately.
20
+
21
+ Wayland's **Protect destination** defaults on, with adapters for GNOME, KDE Plasma,
22
+ Hyprland and Sway. GNOME needs the bundled companion extension; export it with
23
+ `autotype-rs --export-gnome-extension NEW_DIRECTORY`, then install and enable it as
24
+ explained in the [Wayland setup guide](https://github.com/Jeremiah-C27/autotype/blob/v1.4.0/docs/wayland.md).
25
+ KDE uses a temporary script. The guard stops on window changes or adapter failure;
26
+ it cannot protect individual fields/tabs or make checking and input atomic.
27
+ Explicitly disabling it allows destination changes to redirect the remaining text.
28
+ **Remember permission** saves only a private portal restore token, if the desktop
29
+ allows it. **Disconnect** closes the session and forgets the local token.
30
+
31
+ All four Wayland desktops still need a portal backend with RemoteDesktop
32
+ keyboard-control support. Focus adapters do not supply missing keyboard permission;
33
+ some Hyprland/Sway portal installations offer only screenshots/screencasts.
34
+ Xwayland does not bypass that requirement.
24
35
  Linux needs a graphical session, glibc 2.35+, OpenGL/EGL, libxkbcommon and, on X11,
25
36
  libxkbcommon-x11. On Debian/Ubuntu:
26
37
 
@@ -31,7 +42,8 @@ sudo apt install libgl1 libegl1 libxkbcommon0 libxkbcommon-x11-0
31
42
  No Rust compiler is required. Both executables are bundled; installation does not
32
43
  run an install script or download another binary. Node.js 18+ or Bun is required.
33
44
  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.
45
+ opening a window. Text stays in memory and is never uploaded or saved; only
46
+ opt-in permission restoration saves a private desktop token.
35
47
 
36
48
  For Proxmox/noVNC, match local/guest keyboard layouts and Caps Lock. Windows/X11
37
49
  use physical Shift for capitals; Unicode fallback may not work in remote consoles.
@@ -52,3 +64,17 @@ Native Linux builds need Rust and a C compiler. Native Windows builds need Rust
52
64
  and Visual Studio C++ tools. CI combines Ubuntu 22.04 and Windows builds into one
53
65
  package. Prepack validates both executable formats, metadata, hashes and Linux
54
66
  executable permissions. Registry publication requires npm sign-in.
67
+
68
+ ## Updating
69
+
70
+ Use the package manager rather than a separate app self-updater:
71
+
72
+ ```sh
73
+ npx autotype-rs@latest
74
+ bunx --bun autotype-rs@latest
75
+ # For a global npm install:
76
+ npm install -g autotype-rs@latest
77
+ ```
78
+
79
+ Explicit versions such as `@1.3.2` remain pinned. Close the app before replacing
80
+ its bundled executable. Standalone downloads are updated from GitHub releases.
package/lib/launcher.cjs CHANGED
@@ -17,7 +17,7 @@ function launch({
17
17
  setExitCode = (code) => { process.exitCode = code; },
18
18
  } = {}) {
19
19
  if (args.length === 1 && ['--help', '-h'].includes(args[0])) {
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
+ 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\nUpdate a global install: npm install -g autotype-rs@latest\nRun the latest release: npx autotype-rs@latest or bunx --bun autotype-rs@latest\n\nLinux GNOME setup: autotype-rs --export-gnome-extension NEW_DIRECTORY\n');
21
21
  return;
22
22
  }
23
23
  if (args.length === 1 && ['--version', '-v'].includes(args[0])) {
@@ -28,7 +28,8 @@ function launch({
28
28
  stderr.write(`autotype-rs: ${message}\n`);
29
29
  setExitCode(1);
30
30
  };
31
- if (args.length !== 0) {
31
+ const exportGnome = args.length === 2 && args[0] === '--export-gnome-extension' && args[1].length > 0;
32
+ if (args.length !== 0 && !exportGnome) {
32
33
  fail('Unsupported arguments. Run autotype-rs --help for usage.');
33
34
  return;
34
35
  }
@@ -36,7 +37,11 @@ function launch({
36
37
  fail('This app requires x64 Windows or Linux.');
37
38
  return;
38
39
  }
39
- if (platform === 'linux' && !env.DISPLAY && !env.WAYLAND_DISPLAY) {
40
+ if (exportGnome && platform !== 'linux') {
41
+ fail('The GNOME extension export requires Linux.');
42
+ return;
43
+ }
44
+ if (!exportGnome && platform === 'linux' && !env.DISPLAY && !env.WAYLAND_DISPLAY) {
40
45
  fail('Run this app in a Linux desktop session (X11 or Wayland).');
41
46
  return;
42
47
  }
@@ -46,16 +51,17 @@ function launch({
46
51
  return;
47
52
  }
48
53
  try {
49
- const child = spawn(executable, [], {
50
- detached: true,
51
- stdio: platform === 'linux' ? ['ignore', 'ignore', 'inherit'] : 'ignore',
54
+ const child = spawn(executable, exportGnome ? args : [], {
55
+ detached: !exportGnome,
56
+ stdio: exportGnome ? 'inherit' : platform === 'linux' ? ['ignore', 'ignore', 'inherit'] : 'ignore',
52
57
  shell: false,
53
58
  });
54
59
  child.once('error', (error) => {
55
60
  fail(`Could not start the app (${error.code || 'unknown error'}).`);
56
61
  });
62
+ if (exportGnome) child.once('exit', (code, signal) => { setExitCode(signal ? 1 : (code ?? 1)); });
57
63
  child.once('spawn', () => {
58
- child.unref();
64
+ if (!exportGnome) child.unref();
59
65
  });
60
66
  } catch (error) {
61
67
  fail(`Could not start the app (${error.code || 'unknown error'}).`);
Binary file
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.3.2",
2
+ "version": "1.4.0",
3
3
  "target": "x86_64-unknown-linux-gnu",
4
- "sha256": "7043678d65baa17ab61944c732c53cb64a580052bbe0377a322186c1c2fa0863"
4
+ "sha256": "8c2a0e59aa7b4961876951964a73cac3a326731ab87f4a9da3967ab66489e6bb"
5
5
  }
Binary file
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.3.2",
2
+ "version": "1.4.0",
3
3
  "target": "x86_64-pc-windows-msvc",
4
- "sha256": "3966067df273532e810929240f36cb606359ce550f633176116998f54c798dc3"
4
+ "sha256": "5e8c2b23a21cdd902030638eb1ddc23b462dec80e9dbc387e94125977c0c429e"
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "autotype-rs",
3
- "version": "1.3.2",
3
+ "version": "1.4.0",
4
4
  "description": "Compact Rust typing app for Windows and Linux X11/Wayland with adjustable delay and dark/light themes",
5
5
  "license": "MIT",
6
6
  "repository": {