i3swallow/i3swallow.plugin.zsh

12 lines
280 B
Bash
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

_i3swallow() {
[[ -z $BUFFER ]] && zle up-history
if [[ $BUFFER == i3-swallow\ * ]]; then
LBUFFER="${LBUFFER#i3-swallow }"
else
LBUFFER="i3-swallow $LBUFFER"
fi
}
zle -N _i3swallow
# Defined shortcut keys: [Pos1][Pos1]
bindkey "OHOH" _i3swallow