diff options
author | Donovan Glover <donovan@dglover.co> | 2023-07-01 17:16:56 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-01 13:16:56 -0400 |
commit | 269478e78c46c58c2cc192975c764f48bc3afaf8 (patch) | |
tree | 297e6eefb8d30296d9eb5c1963b47552f79252c6 | |
parent | 09bd69e4b1094f0ed9df40ce7c890e1bf55af7f4 (diff) |
docs: Add "Using joshuto with qutebrowser" (#345)
-rw-r--r-- | docs/misc.md | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/docs/misc.md b/docs/misc.md index 8a58e08..6252c46 100644 --- a/docs/misc.md +++ b/docs/misc.md @@ -69,3 +69,34 @@ Unlike ranger, it’s currently not possible to scroll the children-panel or a p with the mouse wheel. Unlike ranger, Joshuto allows to set the cursor in the children-panel with a right click. + +## Using joshuto with [qutebrowser](https://qutebrowser.org/) + +In order to use joshuto as the file picker in qutebrowser, you need to first add a quit +keybind that outputs the selected files. You can do this in `keymap.toml` like so: + + +```toml +[default_view] + +keymap = [ + { keys = ["o"], command = "quit --output-selected-files" }, + # other keybinds... +] +``` + +Next, you need to edit qutebrowser's `config.py` to open joshuto in your terminal of choice, +then output the resulting directory, file, or files to a file named `{}`. Here's an example +with [kitty](https://sw.kovidgoyal.net/kitty/index.html): + +```python +# Use joshuto as the file selector +c.fileselect.handler = 'external' +c.fileselect.folder.command = ['kitty', '-e', 'joshuto', '--output-file', '{}'] +c.fileselect.multiple_files.command = ['kitty', '-e', 'joshuto', '--output-file', '{}'] +c.fileselect.single_file.command = ['kitty', '-e', 'joshuto', '--output-file', '{}'] +``` + +Now when the file picker opens in qutebrowser, you should see joshuto in your terminal emulator +of choice. Use the visual selector (default `V`) if you need to select multiple files and press +the key you defined earlier to send the file or files you highlighted back to qutebrowser. |