.tmux/popup.conf

Mon, 01 Jan 2024 14:47:38 -0600

author
Meredith Howard <mhoward@roomag.org>
date
Mon, 01 Jan 2024 14:47:38 -0600
changeset 1144
dc1def95331f
parent 1133
cb91318a522e
permissions
-rw-r--r--

skip luasnip/jsregexp build on windows (oops)

# Open a floating pane running tmux with a session named floating. If inside
# that floating window, detach.
bind '~' if-shell -F '#{==:#{session_name},floating}' {
    detach-client
} {
    set -gF '@last_session_name' '#S'
    popup -d '#{pane_current_path}' -xC -yC -w70% -h70% -E 'tmux new -A -s floating'
}

# Normal break pane, but if inside a floating session, breaks pane back into
# the most recently opened parent session.
bind ! if-shell -F '#{!=:#{session_name},floating}' {
    break-pane
} {
    run-shell 'bash -c "tmux break-pane -s floating -t \"$(tmux show -gvq '@last_session_name'):\""'
}

mercurial