# launch-webapp Launches a web app using your default browser in app mode. ## Description launch-webapp is a shell script that launches web applications (like Discord, Spotify Web, etc.) in your default browser's "app mode". This provides a more native-like experience for web apps. ## Features - 🌐 **Auto-Detection**: Detects your default web browser - 🚀 **App Mode**: Launches in dedicated app window (no address bar) - 🎨 **Native Feel**: Removes browser chrome for app-like experience - 🔄 **Session Management**: Keeps web apps separate from regular browsing - 🖥️ **Wayland Support**: Works with Wayland session managers (via `uwsm`) ## Installation ### Via Overlay ```nix {pkgs, ...}: { environment.systemPackages = with pkgs; [ launch-webapp ]; } ``` ### Direct Reference ```nix {pkgs, ...}: { environment.systemPackages = with pkgs; [ inputs.m3ta-nixpkgs.packages.${pkgs.system}.launch-webapp ]; } ``` ### Run Directly ```bash nix run git+https://code.m3ta.dev/m3tam3re/nixpkgs#launch-webapp ``` ## Usage ### Basic Usage ```bash # Launch web app launch-webapp https://web.telegram.org # Launch with additional arguments launch-webapp https://web.whatsapp.com --app-name="WhatsApp" ``` ### Examples #### Launch Discord Web ```bash launch-webapp https://discord.com/app ``` #### Launch Spotify Web ```bash launch-webapp https://open.spotify.com ``` #### Launch Google Chat ```bash launch-webapp https://chat.google.com ``` ## Configuration ### Supported Browsers The script auto-detects and supports: - Google Chrome - Brave Browser - Microsoft Edge - Opera - Vivaldi - Chromium (fallback) ### Default Browser The script uses `xdg-settings` to detect your default browser. ```bash # Check your default browser xdg-settings get default-web-browser ``` ### Wayland Support The script uses `uwsm` (Wayland Session Manager) for proper Wayland support. Ensure `uwsm` is installed and configured. ## Desktop Integration ### Create Desktop Entry Create `~/.local/share/applications/webapp-discord.desktop`: ```ini [Desktop Entry] Name=Discord Web Comment=Discord Web App Exec=launch-webapp https://discord.com/app Icon=discord Type=Application Categories=Network;InstantMessaging; ``` ### Add to Menu The desktop entry will appear in your application menu after creating it. ## Requirements - `xdg-utils`: For default browser detection - `uwsm`: Wayland session manager - Your preferred browser (Chrome, Brave, etc.) ## Platform Support - Linux (primary, requires Wayland) - macOS (not tested) - Windows (not supported) ## Build Information - **Version**: 0.1.0 - **Type**: Shell script - **License**: MIT ## Troubleshooting ### Browser Not Found If the script doesn't find your browser, ensure it's installed: ```nix {pkgs, ...}: { environment.systemPackages = with pkgs; [ google-chrome # or brave-browser, microsoft-edge, etc. ]; } ``` ### Wayland Issues If you encounter Wayland issues: ```bash # Check uwsm is installed which uwsm # Check Wayland session echo $XDG_SESSION_TYPE # Should be "wayland" ``` ### App Won't Launch Check the browser supports app mode: ```bash # Test manually google-chrome --app=https://example.com ``` ## Related - [Adding Packages](../guides/adding-packages.md) - How to add new packages - [Quick Start](../QUICKSTART.md) - Getting started guide