mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-01-31 16:47:02 +00:00
This command will update docs/tmux-keybindings.md file that contains all configured tmux keybindings.
23 lines
556 B
Bash
Executable File
23 lines
556 B
Bash
Executable File
#!/usr/bin/env bash
|
|
#
|
|
# x-xterm-update-keybindings
|
|
# Updates $HOME/.dotfiles/docs/tmux.md with my keybindings.
|
|
|
|
# shellcheck source=./../../scripts/shared.sh
|
|
source "$HOME/.dotfiles/scripts/shared.sh"
|
|
|
|
have tmux || {
|
|
msg_err "tmux not found" && exit 0
|
|
}
|
|
|
|
TMUX_KEYBINDINGS_DOCS="$DOTFILES/docs/tmux-keybindings.md"
|
|
|
|
CB="\n\`\`\`\n"
|
|
KB=$(tmux list-keys)
|
|
H="# tmux keybindings\n"
|
|
L="\n\nLeader: \`<ctrl><space>\`\n\n"
|
|
|
|
msg "Outputting tmux keybindings to $TMUX_KEYBINDINGS_DOCS"
|
|
echo -e "${H}${L}${CB}${KB}${CB}" > "$TMUX_KEYBINDINGS_DOCS"
|
|
msg_done "Done!"
|