Native-Like Web Apps on Wayland
On most desktop environments, the default Alt+Tab
window-switching shortcut is functional, but often inefficient when working across multiple contexts. After switching to Wayland, I began using the run-or-raise GNOME extension to bind keys that launch or focus windows based on their title or class.
This provides a fast, predictable, keyboard-driven workflow. But what happens when the app you want to switch to isn’t a desktop binary, but a web app like ChatGPT? With Brave’s app mode, isolated user profiles, and a few custom keybindings, you can make web apps behave like native applications: fast, focused and workspace-aware.
In this post, I’ll walk you through the steps to create two shortcut commands, one for opening a standalone, sandboxed ChatGPT window with Super+C
, and another for opening a regular Brave browser window with Super+Q
, keeping user profiles fully isolated to prevent unintended data sharing. Let’s get started.
Step 1: Launch Brave in App Mode
To start, try opening a chrome-less window for the target URL using Brave’s --app
flag. When combined with --user-data-dir
, it launches the app with a self-contained profile that shares no cookies, login credentials, or storage with other sessions.
brave-browser --app=https://chat.openai.com \ --user-data-dir="$HOME/.local/share/chatgpt"
Now let’s make it accessible via a keybinding.
Step 2: Identify Window Class
On Wayland, run-or-raise
lets you bind specific key combos to launch or focus windows, but here’s the trick. To ensure that the ChatGPT window won’t be confused with regular Brave, you will need to extract its window class (not its title) by running:
xprop | grep WM_CLASS
Clicking the ChatGPT window should give you:
WM_CLASS(STRING) = "chat.openai.com", "Brave-browser"
Do the same for a standard Brave window, and it should give you “brave-browser” in place of “chat.openai.com”. This is the information we need for run-or-raise
to uniquely target the right window.
Step 3: Configure run-or-raise shortcuts
Finally, edit ~/.config/run-or-raise/shortcuts.conf
to include:
<Super>q,brave-browser,brave-browser,
<Super>c,brave-browser --app=https://chat.openai.com --user-data-dir=$HOME/.local/share/chatgpt,chat.openai.com,
This binds Super+Q
to the regular Brave session and Super+C
to a dedicated ChatGPT window. Repeat the process for other web apps as needed.