# tmux - `tmux new-session -d -s -x -y ` - create a new session (with bash) - `tmux send-keys -t "your_command" Enter` - run the provided command - `tmux capture-pane -e -p -t ` - `-e`: include escape sequences - `-p`: send to stdout - `tmux display -p -t '#{pane_width} #{pane_height} #{cursor_y} #{cursor_x}'` - get the panes current size, and cursor position - `-p`: send to stdout - `tmux resize-window -t -x -y ` - resizes the window - `-x`: columns - `-y`: rows - `tmux kill-session -t ` - kills the session # flow - kakoune starts `kak-popup` with command and fifo information - `kak-popup` starts tmux server and daemonizes itself - on cleanup tmux server must be killed - `kak-popup` will poll tmux at some frequency and (if buffer is different) will send changes as `:info` commands to kakoune through `stdout_fifo` - on any keypress, kakoune will send the key to `kak-popup` through `stdin_fifo` - if the command quits or exits, `kak-popup` will send `popup-close` to kakoune - maybe the error should be displayed or something, and then the user can exit the modal manually - if the user hits some "cancel" key (maybe ) `kak-popup` will quit. - some kakoune command should be run on successful command termination ## TODO - [-] switch to channels and processors - [x] add ability to pipe into command - [x] add cursor - [x] add colors - there's a small bug where (i think) if the cursor is on the last character an ending escape sequence isn't sent by tmux, so attributes like underline continue for the entirety of the modal (or until the next escape sequence, which could be on the following line). - [ ] switch to tmux socket - [ ] add persistence feature, where the popup can be dismissed and re-attached