Skip to content
mattmartinezPublic
forked from am-will/limux

About

GPU-accelerated terminal multiplexer for Linux

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

 
 

Repository files navigation

Limux (mattmartinez fork)

A fork of am-will/limux, the GPU-accelerated Linux terminal workspace manager powered by Ghostty. This fork brings the workspace sidebar closer to cmux, the macOS app that inspired Limux.

Limux with a blue selected workspace card and oh-my-pi running in the terminal

What this fork adds

  • cmux-style sidebar. Black sidebar and window chrome, blue selection, and workspace colors shown as a thin left rail rather than filling the card. The top-bar workspace indicators are hidden.
  • Workspace cards. See the shell's current directory and Git branch, latest notification, and linked pull request in the sidebar. Add a persistent description or let agents and scripts post live status rows.
  • Live program status. The fork's Ghostty build supports OSC 7501, so tools like oh-my-pi can show when they're working, need input, or have finished.
  • Browser startup on multi-GPU NVIDIA systems. A shared-memory rendering fallback avoids a WebKit GBM startup abort on affected secondary GPUs.

See workspace card commands and fork build and packaging notes.

For this fork's features, build this checkout from source or build the Arch limux-card package. The upstream downloads below do not include the fork's changes.

952_1080x60_shots_so.mp4

Features

  • GPU-rendered terminals via embedded Ghostty (OpenGL)
  • Workspaces with folder-based naming, persistence across restarts, and sidebar management
  • Workspace autostart commands configured directly from the workspace menu
  • Split panes (horizontal/vertical) with keyboard navigation
  • Tabbed terminals within each pane
  • Built-in browser (WebKitGTK)
  • Right-click context menu with copy, paste, split, clear
  • Drag-and-drop workspace reordering with favorites/pinning
  • Animated sidebar collapse/expand

Install

Download the latest upstream build from GitHub Releases. Each release includes x86_64 and ARM64 builds. ARM64 files are named aarch64, except the .deb, which uses arm64.

Debian/Ubuntu (.deb) — recommended:

sudo dpkg -i ./limux_*_amd64.deb   # x86_64
sudo dpkg -i ./limux_*_arm64.deb   # aarch64

AppImage — portable across Ubuntu 24.04-era desktops and newer, with no Limux installation needed:

chmod +x Limux-*-x86_64.AppImage   # or Limux-*-aarch64.AppImage
./Limux-*-x86_64.AppImage

Release AppImages are built and checked on the Ubuntu 24.04 GLIBC_2.39 floor. They bundle Limux, Ghostty resources, WebKitGTK helper processes, and AppImage-only loader modules such as the gdk-pixbuf SVG loader. They still use the host GTK4 and libadwaita runtime. The release tarball, .deb, and RPM use the same Limux host binary and also require GLIBC_2.39; choosing one of those formats does not lower the glibc requirement. For an older glibc, build from source on the target distribution or use a release built against an older baseline.

The embedded AppImage type-2 runtime statically includes FUSE 3, so the AppImage does not require a host libfuse.so.2 or libfuse.so.3. It works with versioned FUSE 3 helpers such as fusermount3 while retaining support for the traditional fusermount helper. The launcher also discovers host GBM and DRI driver directories, allowing the Ubuntu-built bundle to use Mesa correctly on Fedora- and Arch-family systems. The AppImage does not bundle the host's bwrap (bubblewrap) or xdg-dbus-proxy, which WebKitGTK needs for sandboxed browser processes. Install these tools from your distribution's packages if they are missing. The launcher creates private WebKit helper paths under /tmp and keeps their executables in ${XDG_CACHE_HOME:-$HOME/.cache}/limux. The cache must allow execution; /tmp may be mounted with noexec. Both are removed on exit.

AppImage runtime library paths are scoped to the Limux app process. Terminals spawned inside Limux restore the user's original library/loader environment so host tools such as Flatpak do not load AppImage-private libraries first.

Tarball — manual install:

tar xzf limux-*-linux-x86_64.tar.gz   # or limux-*-linux-aarch64.tar.gz
cd limux-*-linux-x86_64
sudo ./install.sh

To install into a user-writable prefix without root, use:

./install.sh --prefix="$HOME/.local"
export PATH="$HOME/.local/bin:$PATH"

Uninstall with ./install.sh --prefix="$HOME/.local" --uninstall.

Arch Linux (upstream AUR packages):

# Prebuilt release package
yay -S limux-bin

# Build Limux and Ghostty from source
yay -S limux

Both limux-bin and the source-built limux package are published by upstream for x86_64 and aarch64 (Arch Linux ARM). Thanks to Anton Barchukov for creating the original Arch packaging in PR #50.

To uninstall:

# deb
sudo apt remove limux

# tarball
sudo ./install.sh --uninstall

System dependencies

# Ubuntu/Debian
sudo apt install libgtk-4-1 libadwaita-1-0 libwebkitgtk-6.0-4

# AppImage WebKit sandbox helpers
sudo apt install bubblewrap xdg-dbus-proxy

Limux enables WebKit's browser sandbox by default. At host startup, Limux checks real WebKit startup in a disposable process before allowing in-app browser views. If the sandbox cannot start, browser tabs show an explanation and retain their saved state. Terminals remain available. The check normally completes quickly; a failed startup can take fifteen seconds plus up to two seconds for helper cleanup.

Ubuntu 24.04 and later require an application AppArmor allowance for user namespaces. The Debian and RPM packages include an allowance for the installed host. Tarball installs into /usr or /usr/local register their host path when AppArmor is active. User and custom-prefix installs print administrator instructions instead. Paths with special characters require a manually written profile. For a source build, an administrator can register the exact executable:

sudo ./scripts/install-apparmor-profile.sh --install "$(realpath target/debug/limux)"

For a portable AppImage, pass its absolute executable path instead. The helper is also included at share/limux/install-apparmor-profile.sh in native packages. Moving the executable requires updating its allowance; use --remove with the old path to remove it. Restart Limux after changing the policy.

An explicitly inherited WEBKIT_DISABLE_SANDBOX_THIS_IS_DANGEROUS=1 still disables browser isolation. Limux does not select this workaround automatically, and surface-health reports sandboxed: false when it is used.

On Wayland, also install wl-clipboard (apt install wl-clipboard, dnf install wl-clipboard or pacman -S wl-clipboard). Ctrl+Shift+V is Limux's own paste, but plain Ctrl+V goes to the program running in the terminal, and some programs read the clipboard themselves (fish's Ctrl+V, for example). Without wl-paste they fall back to X11 tools like xclip, and depending on the compositor the X11 clipboard may not have what you copied in Limux, so Ctrl+V pastes something older than Ctrl+Shift+V.

Limux Paste (Ctrl+Shift+V, or Paste in the terminal menu) can also turn a copied image into a file. In a local terminal it saves a private PNG at /tmp/limux-paste.<random>/image.png and inserts that path plus a space, so a local Codex or Claude Code composer can attach it. The file stays until you delete it or the system cleans /tmp. A persistent SSH tab uploads the image to that host instead. Paste does not press Enter. An ssh or container command you type yourself is not detected; use a persistent SSH tab when the file has to land on another machine. The Flatpak build writes a local image on the host. See docs/ssh.md for the path, lifetime, and limits.

Build from source

Prerequisites

  • Rust toolchain (stable)
  • Zig 0.16.0
  • GTK4, libadwaita, WebKitGTK dev packages
  • Initialized Ghostty submodule
# Install dev dependencies (Ubuntu/Debian)
sudo apt install libgtk-4-dev libadwaita-1-dev libwebkitgtk-6.0-dev pkg-config build-essential

# Initialize the Ghostty submodule and build the embedded library
git submodule update --init --recursive
./scripts/build-ghostty.sh

# Build limux
cargo build --release

# Run (point to libghostty-internal.so location)
LD_LIBRARY_PATH=ghostty/zig-out/lib:$LD_LIBRARY_PATH ./target/release/limux

Package a release tarball

./scripts/package.sh

This builds the binary, bundles libghostty-internal.so, icons, and an install script into a tarball. package.sh uses build-ghostty.sh to rebuild libghostty-internal.so with ReleaseFast and -Dcpu=baseline, so Zig 0.16.0 and an initialized Ghostty submodule must be present.

Development

build-ghostty.sh records the clean Ghostty commit, library checksum, and resolved library path next to the artifact. The quality gate and GTK smoke tests reject missing or stale provenance before starting Cargo or a display session. After updating the submodule, rebuild with ./scripts/build-ghostty.sh; linking an installed library into ghostty/zig-out/lib does not establish build provenance. Use ZIG=/path/to/zig to select Zig 0.16.0 and LIMUX_BUILD_JOBS to change the default four build jobs.

Run the canonical local quality gate before committing:

./scripts/check.sh

Repository maintainability rules live in docs/maintainability.md. The contributing guide documents the CPU-only Rust formatting workflow. Release procedure lives in docs/releasing.md.

Workspace autostart

Right-click a workspace in the sidebar and select Set Autostart… to run a command whenever Limux creates a terminal in that workspace. The command is stored as part of the workspace session and runs inside the terminal, so interactive commands such as ssh user@server work without modifying .bashrc. Open Edit Autostart… and save an empty command to disable it.

Limux writes the command to a private, self-deleting /bin/sh script and asks the interactive terminal shell to source it, so changes such as cd and export remain in that shell. Autostart is enabled only when both command and initial-command in Ghostty's finalized configuration launch a recognized POSIX-compatible shell with no arguments other than interactive/login flags. Non-shell commands such as command = direct:/usr/bin/vim and non-interactive wrappers such as command = direct:/bin/bash -lc "exec /usr/bin/vim" skip autostart, so Limux does not inject keystrokes into the launched program.

Agent integrations

Background terminal tabs show an activity spinner for five seconds after receiving output, including animated titles from tools such as Codex and output in renamed tabs. Viewing a tab clears its activity; leaving it does not restart the spinner until new output arrives. A notification dot replaces the spinner until the notification is read. In Settings > General, turn off Tab activity indicators or adjust Tab activity timeout from 1 to 60 seconds. Cursor blinking and scrolling alone do not count as output.

Limux ships first-class hooks for coding agents (Codex, Claude Code, Gemini CLI, and Antigravity (agy)). Every terminal limux spawns auto-exports LIMUX_WORKSPACE_ID / LIMUX_SURFACE_ID / LIMUX_PANE_ID / LIMUX_TAB_ID / LIMUX_SOCKET, so the CLI auto-targets the right place with no flags needed from inside the agent's own terminal.

Click Save Sessions next to Open Folder in the toolbar to capture running agents and save the window's workspace layout. The confirmation shows how many agents can be restored and whether any running agents were skipped.

# Fire a libadwaita toast + tab/workspace unread badges from any agent
limux notify --subtitle "needs review" --body "blocked on auth choice" "Input needed"

# Install Limux session-restore and notification hooks for supported agents
limux hooks setup
# Or configure just the agents you use:
limux hooks setup claude
limux hooks setup omp

# Snapshot already-running Limux-hosted agent sessions before a restart/upgrade
# and flush the host's session.json:
limux hooks snapshot --save-session
# Or flush session.json directly:
limux save-session

# Drop-in hook handlers translate hook JSON on stdin into notify/session state
echo '{"event":"stop"}' | limux claude-hook --event stop
echo '{"event":"finished"}' | limux gemini-hook --event finished
echo '{"conversationId":"conv-1","terminationReason":"NO_TOOL_CALL","fullyIdle":true}' | limux agy-hook --event stop

# Spin up a multi-agent collaboration team (supports codex, claude, opencode,
# gemini, agy) that launches each agent's CLI and writes AGENTS.md describing
# the <agent-msg> XML protocol so peers can talk to each other:
limux agent-team --agents codex,claude --cwd "$PWD"
# → Codex and Claude can now do:
#   limux send --workspace claude $'<agent-msg from="codex" to="claude" id="…" ts="…">…</agent-msg>\n'

# Or split the current agent's pane and launch another terminal agent.
# Inside Limux, workspace/surface/pane default from LIMUX_*:
limux new-pane --direction right --command claude
# Live GTK self-spawn currently supports terminal panes only.

# Explicit source targets are also accepted and serialized unchanged:
limux new-pane --surface "$LIMUX_SURFACE_ID" \
  --pane "$LIMUX_PANE_ID" --direction down --command "codex"

# Keep both agents in the same workspace on separate splits/tabs:
limux identify --json
limux list-panels --workspace "$LIMUX_WORKSPACE_ID"
# A named surface is found in any workspace; --workspace would restrict the search.
limux send --surface "<peer-surface-id>" \
  $'<agent-msg from="codex" to="claude" id="…" ts="…">…</agent-msg>\n'

See the auto-generated AGENTS.md (written into the shared cwd) for the full protocol spec, peer table, and editable Policies section. agent-team refuses to replace an existing AGENTS.md, including one from a previous team, before creating any panes. Preserve or move existing instructions before running it again, then merge any project policies you want to keep. limux --json agent-team --dry-run previews the protocol in agents_md_preview without writing files or contacting the host.

Workspace cards

Each workspace card in the sidebar can carry more than its name, the way cmux cards do. Agents, hooks and scripts write it over the socket; inside a Limux terminal the commands target their own workspace through LIMUX_WORKSPACE_ID.

Long workspace titles wrap to fit the sidebar. Hover over a title to see it in a tooltip.

# Keyed status rows, highest priority first. The flags match `cmux set-status`.
limux set-status claude Running --icon bolt.fill --color '#5c9cf5' --priority 10
limux set-status build "tests passing" --icon checkmark --color green
limux clear-status build          # one row; `clear-status` alone clears them all
limux list-status

# A free-text line under the title; also "Edit Description…" in the card menu.
limux set-description "PROD DEPLOYS STILL PENDING"
limux set-description --clear

# Show the branch's pull request (needs `gh`) as the `pr` row.
limux refresh-pr
  • Status rows are kept in memory only: they describe a running agent, so they are gone after a restart. A workspace holds up to 16. Values are plain text; --icon takes a few cmux SF Symbol names (bolt.fill, pause.circle.fill, bell.fill, checkmark, arrow.triangle.pull, ...) or up to four characters, and --color takes #rrggbb or a name.
  • The description is saved with the session.
  • Notifications from limux notify stay on the card after they are read unless --no-sidebar-preview is passed. Agent hooks use the unread marker and desktop notification without adding a second status line. Previews aren't saved across restarts.
  • Session merging. Automatic title changes do not conflict with edits in another window. If both windows make incompatible edits, Limux leaves the shared session intact and keeps a recovery file for the other window.
  • The git branch of the workspace's current directory is shown on its own line above its path, read from .git/HEAD (worktrees included) without running git. A pull request row comes after the path.
  • Program status (OSC 7501). Programs that speak the program status protocol, such as omp, write their state to the terminal, and the card shows the workspace's most urgent record as one row, as cmux does: omp · Working (⚡, with a percentage when given), omp · Done (✓), omp · Needs permission (🔔) or Failed (⚠). Working and blocked records end at the next shell prompt or when the tab's process exits; done and error records stay until you come back to that tab. Limux answers the protocol's support query, and its terminfo lists Pst. LIMUX_DEBUG_PROGRAM_STATUS=1 logs each report.
  • Agent lifecycle. The card shows one built-in activity line. It prefers OSC status to hook updates unless a hook reports a more urgent request for input. Passive idle reminders do not count as requests. A completed OSC status clears when you return to the tab. Scripted status rows and PRs stay separate. Opt out with LIMUX_CARD_STATUS_DISABLED=1 (hook updates) or LIMUX_PR_STATUS_DISABLED=1 (PR row).
  • oh-my-pi (omp). Run limux hooks setup omp to install the bundled extension. It remembers each interactive tab's exact saved conversation, even when several tabs use the same folder, and updates the binding after /resume, /new, or a fork. Limux resumes those conversations in their original tabs after reopening. For an already-running omp tab, reopen the conversation once with omp --resume after installing the extension. Verify the binding with limux hooks snapshot omp --dry-run. The extension also sends a desktop notification and refreshes the PR row after a turn; omp reports its own status over OSC 7501.
  • limux --json list-workspaces includes each workspace's description, statuses and git_branch.

Checked-in hook templates live in hooks/. They mirror limux hooks setup for Codex, Claude Code, Gemini CLI, and Antigravity (agy). OpenCode and omp are opt-in via limux hooks setup opencode and limux hooks setup omp.

Coding agents working on limux itself should read AGENTS.md and CLAUDE.md in the repo root — those cover the build loop, crate map, and the feat/cmux-parity roadmap tracked in docs/cmux-parity-plan.md.

Activate an existing window

Bind a desktop global shortcut to limux activate to bring the running Limux window forward without opening another instance or changing its selected workspace or tab. Use the full executable path in your shortcut if your desktop does not include Limux's install directory in PATH.

The command uses the existing control socket. To target a particular instance:

limux --socket /path/to/instance.sock activate

An explicit --socket takes precedence over LIMUX_SOCKET, LIMUX_SOCKET_PATH, and the default runtime socket. If no instance is listening there, activation fails with a socket connection error; it never launches an instance. Running plain limux still launches the app, and independent instances remain supported.

Limux forwards XDG_ACTIVATION_TOKEN, or DESKTOP_STARTUP_ID when no token is available, to GTK. Your compositor decides whether to grant focus, especially on Wayland where a global shortcut may need a valid activation token. A successful command means presentation was requested, not that focus was guaranteed. Socket authentication is unchanged: the default localUser policy permits a shortcut run by the same user; LIMUX_SOCKET_MODE=limuxOnly rejects commands from outside that Limux process's descendants, including desktop shortcuts.

Terminal mouse scrolling

Hold the middle mouse button in a terminal pane and move above or below the press point to scroll. Moving farther scrolls faster; release to stop. Middle-click no longer pastes. Use Ctrl+Shift+V or the right-click Paste menu.

Keyboard shortcuts

Most host-owned defaults use Ctrl+Alt so plain terminal Ctrl editing keys pass through. Fullscreen defaults to F11. Custom remaps may also use Cmd, which Limux maps to either the Linux Meta or Super modifier. Opt maps to Alt.

App

Shortcut Action
Ctrl+Alt+Q Quit Limux
Ctrl+Alt+N Open a new Limux instance
F11 Toggle fullscreen

Browser

Shortcut Action
Ctrl+Shift+L Open the focused browser page in a new split
Ctrl+L Focus browser address bar
Ctrl+[ Browser back
Ctrl+] Browser forward
Ctrl+R Browser reload
Ctrl+Alt+I Open Web Inspector
Ctrl+Alt+C Open Web Inspector (console-only targeting is not exposed by WebKitGTK)

Find

Shortcut Action
Ctrl+Alt+F Open find on the focused terminal or browser
Ctrl+Alt+G Find next
Ctrl+Alt+Shift+G Find previous
Ctrl+Alt+Shift+F Hide find
Ctrl+Alt+E Use selection for find

Terminal

Shortcut Action
Ctrl+Alt+K Clear scrollback
Ctrl+Shift+C Copy selection
Ctrl+Shift+V Paste
Ctrl+Alt++ Increase font size
Ctrl+Alt+- Decrease font size
Ctrl+Alt+Shift+0 Reset font size

Workspace And Pane

Use + for a workspace in your home folder. Select the folder icon beside it to open a workspace from a chosen folder. To make + ask for a folder each time, enable Settings → General → Ask for folder on new workspace.

Shortcut Action
Ctrl+Alt+Shift+N New workspace (uses the configured folder prompt)
Ctrl+Alt+Shift+W Close workspace
Ctrl+Alt+Shift+Left/Right Cycle tabs in focused pane
Ctrl+Alt+Shift+D Split down
Ctrl+Shift+T New terminal tab in the focused pane
Ctrl+Alt+D Split right
Ctrl+Shift+W Close focused tab
Ctrl+Alt+W Close focused pane
Ctrl+Shift+Z Toggle focused pane zoom
Ctrl+Alt+M Toggle sidebar
Ctrl+Alt+Shift+M Toggle top bar
Ctrl+Alt+T New terminal tab
Ctrl+Alt+Arrow Focus pane in direction
Ctrl+Alt+PageDown/Up Next or previous workspace
Ctrl+Alt+1-9 Switch to workspace by number
Ctrl+Alt+O Switch to the most recent workspace, back to the pane you left
Ctrl+Alt+U Go to the next unread terminal, across workspaces and collapsed groups
Ctrl+Alt+Shift+U Go to the previous unread terminal

Switching back to a workspace returns to the pane you last used there, with its active tab.

When a terminal's process ends

A terminal you are looking at closes when its process ends, as in any terminal; the workspace closes with its last terminal unless Keep workspace open is on. A process that ends while you are not looking (another workspace, a background tab, or another window in front) keeps its tab, output and workspace, marks them unread, and shows Restart and Close. If it failed (a non-zero exit or a signal), it also raises a desktop notification when notifications are on; a clean exit is only marked in the sidebar. Restart runs the same command again, including the workspace's autostart command. A command that fails right after it starts is kept the same way, so its error stays readable.

Architecture

rust/
  limux-host-linux/    # GTK4/Adwaita UI (window, sidebar, panes, tabs)
  limux-ghostty-sys/   # FFI bindings to libghostty
  limux-core/          # Command dispatcher and state engine
  limux-protocol/      # Socket wire format types
  limux-control/       # Unix socket server
  limux-cli/           # CLI client

The terminal rendering is handled entirely by Ghostty's embedded library (libghostty-internal.so), which provides GPU-accelerated OpenGL rendering. The UI layer is native GTK4 with libadwaita.

License

MIT

About

GPU-accelerated terminal multiplexer for Linux

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages