Expand description
Putting taimux on PATH and binding the key.
This is the part that writes to a real configuration file, so the rules it follows are about not making a mess of somebody’s tmux config:
- Idempotent by the command string. A past install’s block is stripped from every file it could have touched before a new one is written, or a reinstall registers the binding twice and the popup opens twice.
- Oh My Tmux gets
.tmux.conf.local, never.tmux.conf. That file is both configuration AND a shell script (its_apply_configurationis run throughcut | sh), so appending raw config to the wrong one breaks every reload. - Inside the “user customizations” section where there is one, because in Oh My Tmux that section sits inside a heredoc and is therefore safe from that pass.
- A plugin-manager checkout is left alone entirely. There the plugin entry point binds the keys on every launch and reload, so writing to the config would be a second, stale copy of the same binding.
- The bindings call the bare launcher name, never the checkout path, so moving the checkout does not break them.
Functions§
- bind
taimux bind: bind the keys in the running server and write nothing.- bind_
live - Bind the keys in the RUNNING server, and say what got bound.
- block_
for - The block itself: a marker line saying what it is, then one bind per key.
- choose_
conf - Which file to write to.
- describe
- How the two keys read in a sentence.
- insert_
block - Insert the block, under the “user customizations” heading where there is one.
- install
taimux install: symlink the launcher and bind the key.- install_
hooks - Register the hook for the turn boundaries, and for a tool having run.
- is_
oh_ my_ tmux - Is this an Oh My Tmux configuration?
- plugin_
checkout - Is this checkout owned by a plugin manager?
- popup_
cmd #{pane_id}in there is inert on purpose:display-popupexpands no format in the command it runs, so bare like this the shell drops it as a comment and the picker asks tmux which pane it was opened from. Quoting it would hand the picker the format itself as a string.- popup_
geometry - How much of the client a popup takes: near-full on a small screen (a phone over ssh), 80% on a roomy terminal.
- strip_
block - Remove any block a past install added, under any of this tool’s former names.
- tmux_
opt - A tmux user option, or a default when it is not SET at all.