Conversation
Add dismissable tmux popup windows per project. Popup sessions persist in the background when dismissed and reappear on toggle.
Popup sessions nest a tmux client inside display-popup, which means
OSC 52 clipboard escape sequences get sent to the popup's pseudo-terminal
rather than the real terminal, breaking clipboard integration.
Additionally, the custom "popup" key-table replaced the root key-table
entirely, which broke all mouse bindings (scroll, drag-to-select, click)
since they live in the root table.
Changes:
- Drop the custom popup key-table in favor of conditional root bindings
using tmux's #{m:} pattern matching against the _popup_ session prefix
- Rely on `prefix None` to disable prefix-based bindings
- Move clipboard handling to tmux.conf via `copy-command` server option,
which pipes all copy operations through pbcopy globally
See:
- tmux/tmux#2921
- tmux/tmux#3817 (comment)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add tmux popup session management — lightweight, ephemeral overlay sessions that float above the current tmux session.
z tmux popup use <name>— creates and opens a named popup session attached to the current parent session, displayed viatmux display-popup. Configurable width/height. Popup sessions have status bar and prefix disabled, withS-F1to detach andM-[for copy-mode (conditionally bound so they pass through to applications when not in a popup).z tmux popup list— lists popup sessions belonging to the current parent session.z tmux popup kill [name] [--all] [--zombies]— kills a specific popup, all popups for the current session, or orphaned popups whose parent session no longer exists.z tmux session listandz tmux session usenow hide popup sessions from selection.z tmux session killautomatically cleans up associated popup sessions when killing a parent._popup_<parent>__<name>, with helpers inpkg/tmux/popup.gofor parsing and matching.CurrentSessionName,HasSession,NewSessionDetached,SetSessionOption,BindKey,DisplayPopup, and improvedKillSessionto accept name or ID.Test plan
z tmux popup use scratch— verify popup opens,S-F1detaches itS-F1works normally (passes through) when not in a popup sessionz tmux popup list— verify it showsscratchz tmux popup kill scratch— verify it's removedz tmux session kill— verify associated popups are cleaned upz tmux popup kill --zombiesafter manually killing a parent sessionz tmux session listandz tmux session usedon't show popup sessions