Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ scrollback previews. When given root directories to search, it also lists any
git or jj repositories beneath them. Selecting a session attaches to it;
selecting a repository starts a numbered session inside it.

<img width="2400" height="1120" alt="Animated demo of the zp session picker" src="https://github.com/user-attachments/assets/6bcd625c-916c-48d0-92bb-e7176f2d5b6c" />
<img width="2400" height="1120" alt="Animated demo of the zp session picker" src="https://github.com/user-attachments/assets/c80ce837-25eb-4c1f-b394-d9f6f1daed54" />

[zmx]: https://github.com/neurosnap/zmx
[fzf]: https://github.com/junegunn/fzf
Expand Down
12 changes: 11 additions & 1 deletion demo/bin/zmx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,20 @@

case $1 in
list)
# After the tape's attach, $ZMX_SESSION names a session (e.g.
# whatchord.2) that the canned data doesn't know; list it as the
# attached one so the reopened picker shows a current session.
if [ "${2:-}" = "--short" ]; then
printf 'whatchord.1\nzmx-picker.1\nscratch\n'
printf 'whatchord.1\n'
if [ -n "${ZMX_SESSION:-}" ]; then
printf '%s\n' "$ZMX_SESSION"
fi
printf 'zmx-picker.1\nscratch\n'
else
printf ' name=whatchord.1\tpid=52341\tclients=0\tcreated=1\tstart_dir=%s/src/whatchord\n' "$HOME"
if [ -n "${ZMX_SESSION:-}" ]; then
printf '\342\206\222 name=%s\tpid=53347\tclients=1\tcreated=4\tstart_dir=%s/src/whatchord\n' "$ZMX_SESSION" "$HOME"
fi
printf ' name=zmx-picker.1\tpid=52502\tclients=0\tcreated=2\tstart_dir=%s/src/zmx-picker\n' "$HOME"
printf ' name=scratch\tpid=53113\tclients=0\tcreated=3\tstart_dir=%s\n' "$HOME"
fi
Expand Down
9 changes: 9 additions & 0 deletions demo/demo.tape
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,12 @@ Type "jj st"
Sleep 500ms
Enter
Sleep 3s

# Reopen the picker from inside the session: whatchord.2 carries
# the arrow marker and a "you are here" preview.
Type "zp"
Sleep 500ms
Enter
Sleep 2.5s
Down
Sleep 4s
3 changes: 3 additions & 0 deletions demo/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,8 @@ sh demo/setup.sh
export ZP_ROOT=/tmp/zp-demo/src
export PATH="$PWD:$PWD/demo/bin:$PATH"
export HOME=/tmp/zp-demo
# The render may itself run inside a real zmx session; the demo
# starts outside any, so drop the inherited session environment.
unset ZMX_SESSION ZMX_SESSION_PREFIX
export PS1='\n\w \[\e[38;2;250;179;135m\]❯\[\e[0m\] '
cd "$HOME" || return
Loading