2018-07-13 09:30:56 +00:00
|
|
|
|
i3swallow-command-line() {
|
2018-05-11 22:00:33 +00:00
|
|
|
|
[[ -z $BUFFER ]] && zle up-history
|
|
|
|
|
if [[ $BUFFER == i3-swallow\ * ]]; then
|
2018-05-13 09:34:52 +00:00
|
|
|
|
LBUFFER="${LBUFFER#i3-swallow }"
|
2018-05-11 22:00:33 +00:00
|
|
|
|
else
|
|
|
|
|
LBUFFER="i3-swallow $LBUFFER"
|
|
|
|
|
fi
|
|
|
|
|
}
|
2018-07-13 09:30:56 +00:00
|
|
|
|
zle -N i3swallow-command-line
|
2018-05-11 22:00:33 +00:00
|
|
|
|
|
|
|
|
|
# Defined shortcut keys: [Pos1][Pos1]
|
2018-07-13 09:30:56 +00:00
|
|
|
|
bindkey "OHOH" i3swallow-command-line
|