diff options
| author | Alex Leferry 2 <alexherbo2@gmail.com> | 2020-02-19 16:28:35 +0100 |
|---|---|---|
| committer | Alex Leferry 2 <alexherbo2@gmail.com> | 2020-06-18 14:33:34 +0200 |
| commit | 3ccce2f23ff0001b8528fce41a7ab18ab8347bdf (patch) | |
| tree | 668ca12aebd51305050ba83417d644d7f11eb0d6 | |
| parent | aa9d5926beb0d804b0f793661e3411a4b1fb3ef4 (diff) | |
Add support for Wofi
https://hg.sr.ht/~scoopta/wofi
| -rw-r--r-- | README.md | 14 | ||||
| -rw-r--r-- | rc/modules/wofi.kak | 14 |
2 files changed, 26 insertions, 2 deletions
@@ -32,8 +32,8 @@ Connect a terminal with [`:connect-terminal`]. Open files with [`edit`] or your favorite program; buffers with the [`buffer`] command… If you loaded the [modules], [`:fzf-files`] and [`:fzf-buffers`] commands are -also available. connect.kak currently has batteries for [fzf], [dmenu], [Rofi], [lf] -and [Dolphin]. +also available. connect.kak currently has batteries for [fzf], [dmenu], [Rofi], +[Wofi], [lf] and [Dolphin]. **Note**: [`fzf`] and [`dmenu`]-like modules require [fd] for listing files. @@ -139,6 +139,7 @@ send yank-ring-load-from-file $(find $(get %opt{yank_ring_path}) -type f | sort require-module connect-fzf require-module connect-dmenu require-module connect-rofi +require-module connect-wofi require-module connect-lf require-module connect-dolphin @@ -158,6 +159,9 @@ map global normal <c-t> ': connect-terminal<ret>' - [`rofi`] - [`:rofi-files`] | [`:rofi`] - [`:rofi-buffers`] +- [`wofi`] + - [`:wofi-files`] | [`:wofi`] + - [`:wofi-buffers`] - [`lf`] - [`:lf`] - [`dolphin`] @@ -187,6 +191,11 @@ map global normal <c-t> ': connect-terminal<ret>' [`:rofi`]: rc/modules/rofi.kak [`:rofi-buffers`]: rc/modules/rofi.kak +[`wofi`]: rc/modules/wofi.kak +[`:wofi-files`]: rc/modules/wofi.kak +[`:wofi`]: rc/modules/wofi.kak +[`:wofi-buffers`]: rc/modules/wofi.kak + [`lf`]: rc/modules/lf.kak [`:lf`]: rc/modules/lf.kak @@ -217,6 +226,7 @@ See also [explore.kak]. [fzf]: https://github.com/junegunn/fzf [dmenu]: https://tools.suckless.org/dmenu/ [Rofi]: https://github.com/davatorium/rofi +[Wofi]: https://hg.sr.ht/~scoopta/wofi [lf]: https://github.com/gokcehan/lf [Dolphin]: https://dolphin.kde.org [fd]: https://github.com/sharkdp/fd diff --git a/rc/modules/wofi.kak b/rc/modules/wofi.kak new file mode 100644 index 0000000..3249822 --- /dev/null +++ b/rc/modules/wofi.kak @@ -0,0 +1,14 @@ +provide-module connect-wofi %{ + require-module connect + define-command wofi-files -params .. -file-completion -docstring 'Open selected files with Wofi' %{ + connect-shell %{ + edit $(fd --type file . "$@" | wofi --show dmenu --prompt 'Open selected files') + } -- %arg{@} + } + define-command wofi-buffers -params ..1 -buffer-completion -docstring 'Open selected buffers with Wofi' %{ + connect-shell %{ + buffer $(buffer | grep -F "$1" | wofi --show dmenu --prompt 'Open selected buffers') + } -- %arg{@} + } + alias global wofi wofi-files +} |
