Skip to content

intechstudio/package-launcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

App Launcher Package

This package allows you to launch applications directly from your Grid controller. It automatically detects installed applications on your system and allows you to add custom applications.

Features

  • Automatic App Detection: Automatically scans for installed applications on Windows and macOS
  • Launch System Apps: Quick access to common system applications
  • Installed Applications: Browse and launch any detected installed application
  • Custom Applications: Add any application or command you want to launch
  • Command Arguments: Support for passing arguments to applications
  • Launch History: Quick access to recently launched applications
  • Grid Action: Easy-to-use action block for configuring app launches
  • Cross-Platform: Works on Windows and macOS (Linux support with manual configuration)

Installation

  1. Clone the repository or download the package
  2. Run npm install in the root folder to install dependencies
  3. Run npm run build to build the necessary files
  4. In the Grid Editor, go to the Package Manager panel
  5. Either approve the package at the top of the list or use the + Add external package button to add the root path of the package

Usage

Launch App Action

  1. In the Grid Editor, select an element (button, encoder, etc.)
  2. Add the "Launch App" action from the "launcher" category
  3. Configure the action:
    • Application: Select from the dropdown or enter a custom command/path
    • Arguments: Optionally add command-line arguments

App Categories

The dropdown shows apps with icons indicating their type:

  • 📌 System Apps: Built-in OS applications
  • 📦 Installed Apps: Detected installed applications
  • Custom Apps: User-added custom applications

Windows System Applications

The package includes these pre-configured Windows applications:

  • Notepad
  • Calculator
  • Paint
  • File Explorer
  • Command Prompt
  • PowerShell
  • Task Manager
  • Control Panel
  • Settings
  • Snipping Tool

macOS System Applications

On macOS, the package includes:

  • Finder
  • Safari
  • System Preferences
  • Terminal
  • TextEdit
  • Calculator
  • Preview
  • Activity Monitor

Installed Application Detection

The package automatically detects installed applications using:

Windows:

  • Windows Registry (HKLM/HKCU Uninstall keys)
  • Start Menu shortcuts (.lnk files)

macOS:

  • /Applications folder
  • ~/Applications folder
  • /System/Applications folder
  • mdfind spotlight search

Click the Refresh button in the preferences panel to re-scan for applications.

Adding Custom Applications

  1. Click on the package in the left sidebar to open preferences
  2. Click "+ Add" in the Custom Applications section
  3. Fill in:
    • App Name: A friendly name for the application
    • Command/Path: The full path to the executable or the command name
    • Arguments: (Optional) Default arguments to pass

Examples

Launch a specific file with Notepad:

  • Command: notepad.exe
  • Arguments: C:\Users\YourName\Documents\notes.txt

Open a specific folder:

  • Command: explorer.exe
  • Arguments: C:\Projects

Launch a game from Steam:

  • Command: steam://run/123456 (where 123456 is the Steam App ID)

Open a URL in the default browser:

  • Command: start
  • Arguments: https://www.google.com

LUA Code Format

The action generates LUA code in this format:

gps("package-launcher", "launch", "command", "arguments")

For example:

gps("package-launcher", "launch", "notepad.exe", "")
gps("package-launcher", "launch", "C:\\Program Files\\App\\app.exe", "--fullscreen")

Development

Project Structure

package-launcher/
├── index.js                 # Main package code (Node.js)
├── package.json             # Package configuration
├── README.md                # This file
├── components/              # Svelte web components
│   ├── src/
│   │   ├── main.js         # Component exports
│   │   ├── Preferences.svelte
│   │   └── LaunchAppAction.svelte
│   ├── package.json
│   └── vite.config.js
└── build.js                 # Build script for distribution

Building

# Install all dependencies
npm install

# Build the components
npm run build

# Development mode with hot reload
npm run dev

Customization

To modify this package:

  1. Package ID: Update the package name in:

    • package.json: name field
    • index.js: References to "package-launcher"
    • components/src/Preferences.svelte: createPackageMessagePort() call and customElement tag
    • components/src/LaunchAppAction.svelte: createPackageMessagePort() call, actionRegex, actualCode(), and customElement tag
  2. Add More Actions: In index.js, call createAction() with new action configurations

  3. Add More Default Apps: Modify the commonApps and commonMacApps arrays in index.js

Troubleshooting

App doesn't launch:

  • Verify the path is correct
  • Ensure the application is installed
  • Check if the path contains spaces (use quotes if needed)
  • For system apps, just the executable name (e.g., notepad.exe) usually works

Custom app not appearing:

  • Make sure you clicked "Add Application" after filling in the form
  • Try restarting the package using "Force restart" in Package Manager

Arguments not working:

  • Separate multiple arguments with spaces
  • For paths with spaces, the application may need them quoted

License

ISC

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors