mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-12-25 05:41:58 +00:00
feat(foot): add foot plugin
This commit is contained in:
parent
69a6359f7c
commit
957c03bc42
2 changed files with 45 additions and 0 deletions
35
plugins/foot/README.md
Normal file
35
plugins/foot/README.md
Normal file
|
@ -0,0 +1,35 @@
|
|||
# foot
|
||||
|
||||
This plugin adds shell integration for [foot, a fast, lightweight and
|
||||
minimalistic Wayland terminal emulator](https://codeberg.org/dnkl/foot).
|
||||
|
||||
To use, add `foot` to the list of plugins in your `.zshrc` file:
|
||||
|
||||
```zsh
|
||||
plugins=(... foot)
|
||||
```
|
||||
|
||||
## Spawning new terminal instances in the current working directory
|
||||
|
||||
When spawning a new terminal instance (with `ctrl+shift+n` by default), the new
|
||||
instance will start in the current working directory.
|
||||
|
||||
## Jumping between prompts
|
||||
|
||||
Foot can move the current viewport to focus prompts of already executed
|
||||
commands (bound to ctrl+shift+z/x by default).
|
||||
|
||||
## Piping last command's output
|
||||
|
||||
The key binding `pipe-command-output` can pipe the last command's output to an
|
||||
application of your choice (similar to the other `pipe-*` key bindings):
|
||||
|
||||
```
|
||||
[key-bindings]
|
||||
pipe-command-output=[sh -c "f=$(mktemp); cat - > $f; footclient emacsclient -nw $f; rm $f"] Control+Shift+g
|
||||
```
|
||||
|
||||
When pressing ctrl+shift+g, the last command's output is written to a
|
||||
temporary file, then an emacsclient is started in a new footclient instance.
|
||||
The temporary file is removed after the footclient instance has closed.
|
||||
|
10
plugins/foot/foot.plugin.zsh
Normal file
10
plugins/foot/foot.plugin.zsh
Normal file
|
@ -0,0 +1,10 @@
|
|||
function precmd {
|
||||
print -Pn "\e]133;A\e\\"
|
||||
if ! builtin zle; then
|
||||
print -n "\e]133;D\e\\"
|
||||
fi
|
||||
}
|
||||
|
||||
function preexec {
|
||||
print -n "\e]133;C\e\\"
|
||||
}
|
Loading…
Reference in a new issue