Terminal Multiplexers (tmux and screen)
Master mobile multitasking with tmux and GNU screen using Casshper's latched modifier keys, custom keycode soft bars, and touch gestures.
Mobile Multitasking with Terminal Multiplexers
Terminal multiplexers like tmux and GNU screen are essential tools for remote administration, allowing you to run multiple persistent shell sessions, split panes, and detach long-running jobs. However, using multiplexers on a mobile touchscreen is often frustrating because traditional multiplexer control relies heavily on chorded prefix combinations like Ctrl+B (tmux) or Ctrl+A (screen).
Casshper eliminates touchscreen friction with One-Shot Latched Keys, Dedicated Multiplexer Soft-Key Bars, and Touch Gesture Sequences.
Running tmux or screen on your remote host keeps your build pipelines, database migrations, and development servers active if your connection drops. Pairing this with Casshper's background session persistence prevents Android from terminating your local shell session when swapping between mobile apps or running long tasks.
One-Shot Latched Modifier Control
Instead of struggling to hold down a touch modifier while typing another character, use Latch Mode on your soft key bar:
- Tap the Ctrl button on your soft-key bar. The button illuminates with an active highlight indicator, showing it is armed.
- Tap b on your on-screen keyboard (or a for screen). This sends
Ctrl+B, and the latch immediately releases. - Tap your multiplexer command key:
- c — Create a new window.
- % — Split the active pane vertically.
- " — Split the active pane horizontally.
- n / p — Jump to the next or previous window.
- o — Rotate through active panes.
- d — Detach the session cleanly.
Dedicated Multiplexer Soft-Key Bar (Pro Admin)
For maximum speed, create a dedicated tmux Soft-Key Bar with Multi-Soft Key Bars (Pro Admin) that turns complex prefix sequences into single-tap actions:
| Button Label | Binding Type | Target / Value | Operational Mode | Purpose |
|---|---|---|---|---|
Ctrl+B | Keycode (KEYCODE) | ASCII Hex 0x42 ('B') + Ctrl | Press / Latch | Sends tmux prefix directly without opening keyboard |
Ctrl+A | Keycode (KEYCODE) | ASCII Hex 0x41 ('A') + Ctrl | Press / Latch | Sends GNU screen prefix directly |
New Win | Text (TEXT) | tmux new-window | Press | Creates a new window via direct command execution |
Split | | Text (TEXT) | tmux split-window -h | Press | Splits pane horizontally / side-by-side |
Split — | Text (TEXT) | tmux split-window -v | Press | Splits pane vertically / top-and-bottom |
Next → | Text (TEXT) | tmux next-window | Press | Switches to next window |
← Prev | Text (TEXT) | tmux previous-window | Press | Switches to previous window |
Detach | Text (TEXT) | tmux detach-client | Press | Detaches session cleanly to background |
Default ⇥ | Action (ACTION) | Swap Soft-Key Bar (Default) | Press | Returns to your default navigation bar |
Touch Gestures and Headless Key Control (Pro Admin)
Combine soft keys with Casshper's Custom Gestures (Pro Admin) for keyboard-free terminal and multiplexer control:
- One-Shot Latched Prefix Gestures: Configure a gesture (like
Tap + Swipe Right) to dispatchCtrl+BorCtrl+Ain Latch mode. A quick flick arms your multiplexer prefix for the very next keystroke—tap % or c on your on-screen keyboard to execute splits or create windows without complex finger gymnastics. - Emergency Interrupts (
Ctrl+C): Map a downward flick (Tap + Swipe Down ⚡) to sendCtrl+Cimmediately, killing runaway jobs or stuck processes inside any tmux pane. - Modal Escaping (
Escape): Map an upward flick (Tap + Swipe Up ⚡) to sendEscape, dropping out of copy mode, search mode, or Vim insert mode inside a pane without touching the keyboard. - Multiplexer Soft Bar Swapping: Map a gesture like
Double Tap + Swipe Upto Swap Soft-Key Bar, instantly toggling your dedicated tmux soft-key bar into view when needed and hiding it when you need full screen space. - Session and Window Navigation: Use
Double Tap + Swipe Left/Rightto jump across active Casshper sessions or tmux windows effortlessly.
Mobile-Optimized Multiplexer Configuration
Recommended ~/.tmux.conf
Add these configuration directives to your remote server's ~/.tmux.conf for the best mobile experience:
# Enable native touch scrolling and tap-to-focus panes
set -g mouse on
# Eliminate escape delay for responsive Neovim/Vim editing
set -s escape-time 0
# Start window and pane numbering at 1 for easier thumb access
set -g base-index 1
setw -g pane-base-index 1
# Modern 24-bit True Color support matching Ghostty engine
set -g default-terminal "tmux-256color"
set -ag terminal-overrides ",xterm-ghostty:RGB"
Casshper is powered by the Ghostty engine and advertises TERM=xterm-ghostty. When connecting to remote servers, ensuring the remote host has the proper terminfo entry guarantees full 24-bit True Color and rich escape sequence fidelity. See our Terminfo Troubleshooting Guide for instructions on copying xterm-ghostty to your remote host via SSH.
Recommended ~/.screenrc
If you use GNU screen, add the following to your ~/.screenrc:
# Disable startup copyright splash screen
startup_message off
# Set generous scrollback buffer
defscrollback 10000
# Top caption line for active window indicators
caption always "%{= kw}%-w%{= kG}%{+b}[%n %t]%{-b}%{= kw}%+w"
Reconnecting to Persistent Sessions
When reconnecting to an SSH host from Casshper, use this one-line command or add it to your ~/.zshrc alias list to automatically attach to an existing session or start a new one:
tmux attach-session -t main || tmux new-session -s main
When working with multiple split panes in tmux on smaller mobile screens, adjust Casshper's Render Knobs (Columns and Render Scale) to fit high-density dashboards without font clipping.