Genesis
This commit is contained in:
commit
73fa9df70e
2 changed files with 17 additions and 0 deletions
5
README.md
Normal file
5
README.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
# i3-swallow zsh plugin
|
||||
|
||||
prefixes a command with `i3-swallow` by pressing <kbd>Pos1</kbd> twice
|
||||
|
||||
requires [i3-swallows](https://github.com/jamesofarrell/i3-swallow)
|
12
i3swallow.plugin.zsh
Normal file
12
i3swallow.plugin.zsh
Normal file
|
@ -0,0 +1,12 @@
|
|||
_i3swallow() {
|
||||
[[ -z $BUFFER ]] && zle up-history
|
||||
if [[ $BUFFER == i3-swallow\ * ]]; then
|
||||
LBUFFER="${LBUFFER#sudo }"
|
||||
else
|
||||
LBUFFER="i3-swallow $LBUFFER"
|
||||
fi
|
||||
}
|
||||
zle -N _i3swallow
|
||||
|
||||
# Defined shortcut keys: [Pos1][Pos1]
|
||||
bindkey "OHOH" _i3swallow
|
Loading…
Reference in a new issue