i3swallow/i3swallow.plugin.zsh

13 lines
280 B
Bash
Raw Normal View History

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