Skip to content
 
 

Repository files navigation

This is a fork! For any questions or bugs you'd like to see fixed, please file an issue or discussion here or shoot a message to the official alt1 discord. You can also message me directly on discord to arrowsin.

Installation

This app is available bundled as a portable AppImage. You can find it in the releases, or by clicking here. You may save it anywhere you like.
This is a rolling-release build. To update, enable "check for updates" in the settings window, this will update the application for you. If you have issues, make sure you try this.

Wayland

If you're using wayland, the compositor is unaware of any positioning that alt1-electron does or tries to do, due to the wayland devs not wanting windows to determine their own position, instead leaving it to the user. For Hyprland (tiling window manager) for instance, specific windowrules are required to at least:

  • Pin the window
  • Disable any blur
  • Fix the position and size
  • Also fix the position and size of the rs client (or create a hook that makes them follow each other's sizes and positions)
  • Set the window to not be tiled
  • Disable any borders

On other non-tiling desktop/window managers such as KDE and gnome, it should be more straightforward, though the position issues remain. Recommended is to add window rules to keep the overlay window in the same coordinates and having the same size as the Runescape client. Again, this app is unable to do this reliably due to the way wayland works, and creating/documenting configs for every possible WM/DE is out of scope for this project. Pull requests containing documentation on how you got it working on your setup - assuming documentation for such setup do not exist yet - are allowed though.

Alt1 Electron (name pending)

This project is an experimental rewrite of the Alt1 Toolkit in Typescript, Electron and React. The project is currently in an experimental state, it will likely not become a replacement for C# Alt1 since the official devs have found their own solutions for the C# issues that were originally presented.

Build

You need a working nodejs installation including nodejs native build tools (is an option during installation) in order to compile Alt1.

# Install dependencies
npm ci

# Build native modules
# After building once you will find cpp project files for visual studio/xcode depending on your platform
# You can then build and debug using that project and IDE
npm run native

# build typescript/webpack (requires nodejs >22.6)
npm run build

# Run
npm run ui

# To create an appImage/portable exe/darwin zip (darwin is not officially supported yet):
npm run dist

# For development only, replace npm run build with:
npm run watch

Linux dependencies

Arch (pacman)

# pacman -S pkg-config libxcb xcb-util-wm

Debian/Ubuntu (apt)

# apt install pkg-config libxcb-shm0-dev libxcb-composite0-dev libxcb-ewmh-dev libxcb-record0-dev libxcb-shape0-dev libxcb-icccm4

Gentoo (portage)

# emerge --ask --noreplace dev-util/pkgconf x11-libs/libxcb x11-libs/xcb-util-wm

Nix (flake)

To run the flake:

nix run .#alt1-toolkit

Also works in a .desktop file: (fill in the install dir yourself)

[Desktop Entry]
Name=Alt1Toolkit
Exec=nix run <INSTALL DIR>#alt1-toolkit -- %u
Type=Application
Terminal=false
Categories=Application;
Icon=<INSTALL DIR>/src/imgs/alt1icon.png
Comment=Launch Alt1 electron toolkit
StartupWMClass=Alt1Toolkit

nix run github:arroquw/alt1-electron should also work

Mac

Gatekeeper, Accessibility, Screen Recording

alt1-electron will only work if the electron application has both accessibility and screen/audio recording permisisons.

Why rewrite?

Browser integration

Currently communication with apps is slow and limited. Electron has much better browser integration for stuff like error handling and complex data types. There is also the option for service worker integration and a native API to offload high performance code.

Cross-platform

This has been the most long standing request. Starting from scratch with other platforms in mind is an order of magnitude easier than trying to backport it. Electron is cross-platform by default, so only minimal platform specific code is needed.

Project status

See contributing.md for information on how to contribute to this project.

Currently functional

  • Basic app functionality
  • Overlay API
  • Capture API
  • Appconfig and saved apps
  • Window pinning
  • Multiclient support
  • OpenGL capture using old DLLs
  • mp4 works! (twitch)
    • still no widevine CDM so no netflix
  • changes in app libs use new fast capture API
  • rightclick detection
  • basic alt+1 hotkey detection
  • Toolbar
  • Settings window
    • installed apps
    • capture mode previews and troubleshoot
  • add app window
  • browser handlers
    • alt1:// protocol from internal browser
    • remove toolbar on popups
    • rightclick menu
  • Rewrite and publish OpenGL capture
  • App resize visual snapping
  • Shippableness in general
  • alt+1 hotkey
    • app triggers
  • statusdaemon
  • Independent modules
    • Screenshot sharing (alt+2)
    • Window manipulation tool (alt+3)

Platform specific

  • Windows
    • Basics
    • Window events API
    • Window pinning
    • Capture
      • OpenGL
      • Window
      • UI to toggle during runtime
  • Linux
    • Basics
    • Window events API
    • Window pinning
    • Capture
      • Window
  • MacOS
    • Basics
    • Window events API
    • Window pinning
    • Capture
      • Window

TODO

  • Actually implement capture method toggle
  • Add toggle in Injectdll for rgba capture instead of bgra
  • Improve RS client close detection
  • Fix RS client opening detection pinning on the loading screen
  • Get rid of electron resize handles
  • App frame css
  • Many little used api calls
  • Clean up native event situation for windows
  • Enable contextisolation in appwindow
  • Try to move RS specific constants from native code to ts/config files
  • Think some more about the name

Extension projects

These concepts don't exist in C# Alt1 but are now possible.

Background apps

App functionality that runs without the app being visible using service workers.

Native acceleration plugin

Direct access to JS runtime and memory of arraybuffers is now possible. Possibly capture directly into app controlled memory and implement C++ accelerated image detect fast paths.

Different app styles

Support for Guide style apps that are easy to minimize and take up the center screen. In 2019, RS Pocketbook was interested in merging into Alt1 like this, others are also possible.

About

Experimental electron implementation of Alt1 Toolkit

Resources

Contributing

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages