hunter/README.md

288 lines
16 KiB
Markdown
Raw Normal View History

2019-04-06 17:07:03 +02:00
hunter
======
2019-05-22 20:04:46 +02:00
![hunter](https://raw.githubusercontent.com/rabite0/hunter-stuff/master/player.png)
2019-04-06 17:07:03 +02:00
2019-06-15 22:57:35 +02:00
NEW
2019-06-19 20:12:59 +02:00
- [Previews] New and improved preview customization
2019-06-15 22:57:35 +02:00
- [**[IRC channel](https://webchat.freenode.net/?channels=hunter)**] Problems? Bugs? Praise? Chat with us: [#hunter @ Freenode](https://webchat.freenode.net/?channels=hunter)!
- [Quick Actions] Run specific actions based on file type
2019-05-28 00:50:15 +02:00
hunter is a fast and lag-free file browser/manager for the terminal. It features a heavily asynchronous and multi-threaded design and all disk IO happens off the main thread in a non-blocking fashion, so that hunter will always stay responsive, even under heavy load on a slow spinning rust disk, even with all the previews enabled.
2019-04-06 17:07:03 +02:00
2019-04-06 17:26:16 +02:00
It's heavily inspired by the excellent ranger, but a little more Emacs-flavoured, and written in Rust to make sure it starts up quickly and to take advantage of its strong guarantees around concurrency. It's so fast I actually built in animations for some parts as a joke, but in fact it turned out to look really nice and makes it look much smoother. YMMV, of course, and this can be disabled.
2019-04-06 17:07:03 +02:00
Most things you would expect are implemented, among them tabs, bookmarks (with ranger-import), search/filter, previews of files/directories (including size information in previewed directories), a minibuffer at the bottom with file name completion, multi file selection, etc., etc. There are also a few original ideas, especially around subprocess handling. The process viewer actually shows the output of started subprocesses, their pids and exit codes, notifies on new output and process completion. It's somewhat of a primitive TUI shell. File names are handled using raw OsString, so there is no file it can't handle, no matter what garbage the name contains. It also sets the tmux/terminal title to the current directory on supported terminals.
2019-04-06 17:07:03 +02:00
To speed up the loading of directories metadata in the preview/backview is only loaded for files you can see, except in the main view. Still, metadata is also loaded asynchronously, so you can sometimes see it updating file listings while browsing through your files. I think this is better than waiting though :).
2019-04-06 17:07:03 +02:00
2019-04-06 17:26:16 +02:00
Technically hunter is not a file "manager" itself. It has no built in primitives for file manipulation like delete, rename, move, and so on. Instead it relies on its easy and extensive integration with the standard cli tools to do its job. For that purpose there are various file name/path substitution patterns and an auto-completing for executables you want to run.
2019-04-06 17:07:03 +02:00
2019-05-28 00:50:15 +02:00
It also features a "quick action" mode in which you can execute customizable actions based on the file's MIME type. These can be shell-scripts or other executables. It's possible to to make hunter ask for input before these are run. The input will be put in an environment variable for the process to use. For example, you can select a few files, run a "create archive" action and you will be asked for a name for the resulting archive. You can find a more detailed explanation below.
2019-04-06 17:07:03 +02:00
This is a young project and probably (definitely) has some bugs and edge cases. It hasn't been tested on a lot of terminals, but at least alacritty, kitty and urxvt work fine. It should work on most Unix-flavoured systems supported by Rust, but was only tested on GNU/Linux. I haven't lost any files so far, at least.
2019-04-13 18:47:31 +02:00
A big thanks to ranger and its developers. Without its inspiration this wouldn't have been possible. hunter is not a drop-in replacement and doesn't cover every use-care, especially if you're into advanced customization, since hunter has basically none unless you modify the code, but if you just need fast above all else it might be a good choice.
2019-04-06 17:07:03 +02:00
## Features:
* Lag-free architecture, always responsive
* Asynchronous multi-threaded IO
* Tabs
* Multi-file selection
* Customizable Quick Actions based on file type
* Enter directories/select files using external command like fzf
2019-04-06 17:07:03 +02:00
* ranger import for bookmarks/tags
2019-05-11 17:36:52 +02:00
* Minibuffer with completion and filename/selection/tab/directory substitution
* Subprocess viewer that shows output of started subprocesses
* Exit and cd into last directory and put selected files into shell variables
* Slide up animation for previews for a smoother experience (configurable)
* Can show icons with the [right fonts](https://github.com/ryanoasis/nerd-fonts)
merge in media-preview stuff Squashed commit of the following: commit 4087cee2f2a72bc2d3e44832809cbe99d25a3309 Author: rabite <rabite@posteo.de> Date: Tue May 21 20:40:27 2019 +0200 rename to preview-gen commit 275fd420a01c24393ae9cc07287204fde309130a Author: rabite <rabite@posteo.de> Date: Tue May 21 20:30:50 2019 +0200 update Cargo.toml and README commit bf4c3fec0f8e0ff4628153297ac64fe165b4e443 Author: rabite <rabite@posteo.de> Date: Tue May 21 20:30:33 2019 +0200 add config options for media commit 3bf681cd078177d634507c51d04a45bdae184f1b Author: rabite <rabite@posteo.de> Date: Tue May 21 13:46:00 2019 +0200 always use unicode icons for play/pause/mute commit ed2a0b31d1911e4d42086699ca1db636c327bacf Author: rabite <rabite@posteo.de> Date: Tue May 21 13:04:11 2019 +0200 rename to mediaview and some fixups commit bda3f8f83bec07c3f52d06cf5f8eaad7fdbd85a0 Author: rabite <rabite@posteo.de> Date: Tue May 21 11:44:52 2019 +0200 fix warnings commit 9c917903cfa958b225f268ed4fb9f55f27162be0 Author: rabite <rabite@posteo.de> Date: Tue May 21 01:10:58 2019 +0200 play audio through viedo widget commit 9fe208b213710fae889f7701bdb3bf96d599c9a8 Author: rabite <rabite@posteo.de> Date: Tue May 21 00:15:12 2019 +0200 fixed play when autoplay is off commit d4036d52864d0a4e08f7da2cf6f7419ef070c1a9 Author: rabite <rabite@posteo.de> Date: Mon May 20 13:15:44 2019 +0200 add icons for play/pause/mute commit 29f0d203cfd7501b50d80501de146da9d89388bb Author: rabite <rabite@posteo.de> Date: Mon May 20 12:26:53 2019 +0200 add basic gif support commit 8d28e4c23a91b0ef83739554c3a2f6671a9ff6f5 Author: rabite <rabite@posteo.de> Date: Mon May 20 11:43:57 2019 +0200 fixed play after pause commit 142017df78de77bcfffd8f3dd9612a06927e183b Author: rabite <rabite@posteo.de> Date: Sun May 19 14:22:16 2019 +0200 change to stale on drop commit c0026c7f56f6a841df18e41bd1c9b33543e26cfb Author: rabite <rabite@posteo.de> Date: Sat May 18 23:46:27 2019 +0200 handle errors in gstreamer closure commit ef37f872c54b9d21ed5505c2edb480c793afaef9 Author: rabite <rabite@posteo.de> Date: Sat May 18 23:40:24 2019 +0200 add image-only mode to preview-gen commit 15752464563463c6ecf892c1d8a14651bf32e1e5 Author: rabite <rabite@posteo.de> Date: Sat May 18 23:28:33 2019 +0200 add copyright note commit 4c9f08fc4de5d3bffefd42284b60aa81cfbae9f7 Author: rabite <rabite@posteo.de> Date: Sat May 18 23:27:30 2019 +0200 make image/video previews optional commit 9c2c2db2b20ecd4c30acbb1c77ad18c71f528c4c Author: rabite <rabite@posteo.de> Date: Sat May 18 22:13:25 2019 +0200 remove blank space under video commit f7056d70fbe9147b3b95d7c10950653eadbb4f48 Author: rabite <rabite@posteo.de> Date: Sat May 18 22:06:49 2019 +0200 remove dbg commit cce820657ff1258cdb78d455dd3cf04564450cea Author: rabite <rabite@posteo.de> Date: Sat May 18 21:50:25 2019 +0200 added error handling to preview-gen commit 80bbe15bacb99d1f4f97504a5d10ecf59544993f Author: rabite <rabite@posteo.de> Date: Sat May 18 21:04:31 2019 +0200 add time and visual seek bars to videoview commit 4349945cc5549334f246be64bc7c8e2db43f9150 Author: rabite <rabite@posteo.de> Date: Thu May 16 22:39:19 2019 +0200 fix sneaky process commit 373128b7096d4de29924617e549a613a3aeea5b2 Author: rabite <rabite@posteo.de> Date: Thu May 16 22:07:27 2019 +0200 fix out of controll processes commit e061e065e913ab3923ffac1079a9f0a2be0df532 Author: rabite <rabite@posteo.de> Date: Thu May 16 20:51:56 2019 +0200 add media_preview commit f68c754895a9718d1a962980de9fbf02e5cb48cd Author: rabite <rabite@posteo.de> Date: Thu May 16 19:37:04 2019 +0200 beta image/video previews commit 9a5460e553dd26ebccffaf819c64a8dc6ba74818 Author: rabite <rabite@posteo.de> Date: Tue May 14 20:36:25 2019 +0200 external img preview commit 3c4edfcb7611b36f6e537c73743e0b6bd269037b Author: rabite <rabite@posteo.de> Date: Tue May 14 20:35:12 2019 +0200 video preview
2019-05-21 20:50:54 +02:00
* Optional support for previews of image/video/audio files using Unicode half-block drawing
2019-05-11 17:36:52 +02:00
2019-04-06 17:07:03 +02:00
2019-04-15 12:01:34 +02:00
## Known to work on:
* GNU/Linux
* macOS
* Windows (WSL)
If it works on a system not mentioned here, please open an issue. Also feel free to open an issue if it doesn't work on your system, if it's reasonably Unix-like.
## PREREQUISITES:
* gcc
* libmagic-dev
* Rust-nighly compiler
merge in media-preview stuff Squashed commit of the following: commit 4087cee2f2a72bc2d3e44832809cbe99d25a3309 Author: rabite <rabite@posteo.de> Date: Tue May 21 20:40:27 2019 +0200 rename to preview-gen commit 275fd420a01c24393ae9cc07287204fde309130a Author: rabite <rabite@posteo.de> Date: Tue May 21 20:30:50 2019 +0200 update Cargo.toml and README commit bf4c3fec0f8e0ff4628153297ac64fe165b4e443 Author: rabite <rabite@posteo.de> Date: Tue May 21 20:30:33 2019 +0200 add config options for media commit 3bf681cd078177d634507c51d04a45bdae184f1b Author: rabite <rabite@posteo.de> Date: Tue May 21 13:46:00 2019 +0200 always use unicode icons for play/pause/mute commit ed2a0b31d1911e4d42086699ca1db636c327bacf Author: rabite <rabite@posteo.de> Date: Tue May 21 13:04:11 2019 +0200 rename to mediaview and some fixups commit bda3f8f83bec07c3f52d06cf5f8eaad7fdbd85a0 Author: rabite <rabite@posteo.de> Date: Tue May 21 11:44:52 2019 +0200 fix warnings commit 9c917903cfa958b225f268ed4fb9f55f27162be0 Author: rabite <rabite@posteo.de> Date: Tue May 21 01:10:58 2019 +0200 play audio through viedo widget commit 9fe208b213710fae889f7701bdb3bf96d599c9a8 Author: rabite <rabite@posteo.de> Date: Tue May 21 00:15:12 2019 +0200 fixed play when autoplay is off commit d4036d52864d0a4e08f7da2cf6f7419ef070c1a9 Author: rabite <rabite@posteo.de> Date: Mon May 20 13:15:44 2019 +0200 add icons for play/pause/mute commit 29f0d203cfd7501b50d80501de146da9d89388bb Author: rabite <rabite@posteo.de> Date: Mon May 20 12:26:53 2019 +0200 add basic gif support commit 8d28e4c23a91b0ef83739554c3a2f6671a9ff6f5 Author: rabite <rabite@posteo.de> Date: Mon May 20 11:43:57 2019 +0200 fixed play after pause commit 142017df78de77bcfffd8f3dd9612a06927e183b Author: rabite <rabite@posteo.de> Date: Sun May 19 14:22:16 2019 +0200 change to stale on drop commit c0026c7f56f6a841df18e41bd1c9b33543e26cfb Author: rabite <rabite@posteo.de> Date: Sat May 18 23:46:27 2019 +0200 handle errors in gstreamer closure commit ef37f872c54b9d21ed5505c2edb480c793afaef9 Author: rabite <rabite@posteo.de> Date: Sat May 18 23:40:24 2019 +0200 add image-only mode to preview-gen commit 15752464563463c6ecf892c1d8a14651bf32e1e5 Author: rabite <rabite@posteo.de> Date: Sat May 18 23:28:33 2019 +0200 add copyright note commit 4c9f08fc4de5d3bffefd42284b60aa81cfbae9f7 Author: rabite <rabite@posteo.de> Date: Sat May 18 23:27:30 2019 +0200 make image/video previews optional commit 9c2c2db2b20ecd4c30acbb1c77ad18c71f528c4c Author: rabite <rabite@posteo.de> Date: Sat May 18 22:13:25 2019 +0200 remove blank space under video commit f7056d70fbe9147b3b95d7c10950653eadbb4f48 Author: rabite <rabite@posteo.de> Date: Sat May 18 22:06:49 2019 +0200 remove dbg commit cce820657ff1258cdb78d455dd3cf04564450cea Author: rabite <rabite@posteo.de> Date: Sat May 18 21:50:25 2019 +0200 added error handling to preview-gen commit 80bbe15bacb99d1f4f97504a5d10ecf59544993f Author: rabite <rabite@posteo.de> Date: Sat May 18 21:04:31 2019 +0200 add time and visual seek bars to videoview commit 4349945cc5549334f246be64bc7c8e2db43f9150 Author: rabite <rabite@posteo.de> Date: Thu May 16 22:39:19 2019 +0200 fix sneaky process commit 373128b7096d4de29924617e549a613a3aeea5b2 Author: rabite <rabite@posteo.de> Date: Thu May 16 22:07:27 2019 +0200 fix out of controll processes commit e061e065e913ab3923ffac1079a9f0a2be0df532 Author: rabite <rabite@posteo.de> Date: Thu May 16 20:51:56 2019 +0200 add media_preview commit f68c754895a9718d1a962980de9fbf02e5cb48cd Author: rabite <rabite@posteo.de> Date: Thu May 16 19:37:04 2019 +0200 beta image/video previews commit 9a5460e553dd26ebccffaf819c64a8dc6ba74818 Author: rabite <rabite@posteo.de> Date: Tue May 14 20:36:25 2019 +0200 external img preview commit 3c4edfcb7611b36f6e537c73743e0b6bd269037b Author: rabite <rabite@posteo.de> Date: Tue May 14 20:35:12 2019 +0200 video preview
2019-05-21 20:50:54 +02:00
* GStreamer for video/audio previews
2019-06-19 19:30:28 +02:00
### PREVIEWERS
hunter comes with definitions to enable previewing certain file typse. To use this you need to install some programs first. You can also define your own. See below. Defaults are:
* bat / highlight for syntax highlighting
* 7z for archives
* w3m / links / elinks / lynx for html
* pdftotext / mutool for pdf
### Debian/Ubuntu
merge in media-preview stuff Squashed commit of the following: commit 4087cee2f2a72bc2d3e44832809cbe99d25a3309 Author: rabite <rabite@posteo.de> Date: Tue May 21 20:40:27 2019 +0200 rename to preview-gen commit 275fd420a01c24393ae9cc07287204fde309130a Author: rabite <rabite@posteo.de> Date: Tue May 21 20:30:50 2019 +0200 update Cargo.toml and README commit bf4c3fec0f8e0ff4628153297ac64fe165b4e443 Author: rabite <rabite@posteo.de> Date: Tue May 21 20:30:33 2019 +0200 add config options for media commit 3bf681cd078177d634507c51d04a45bdae184f1b Author: rabite <rabite@posteo.de> Date: Tue May 21 13:46:00 2019 +0200 always use unicode icons for play/pause/mute commit ed2a0b31d1911e4d42086699ca1db636c327bacf Author: rabite <rabite@posteo.de> Date: Tue May 21 13:04:11 2019 +0200 rename to mediaview and some fixups commit bda3f8f83bec07c3f52d06cf5f8eaad7fdbd85a0 Author: rabite <rabite@posteo.de> Date: Tue May 21 11:44:52 2019 +0200 fix warnings commit 9c917903cfa958b225f268ed4fb9f55f27162be0 Author: rabite <rabite@posteo.de> Date: Tue May 21 01:10:58 2019 +0200 play audio through viedo widget commit 9fe208b213710fae889f7701bdb3bf96d599c9a8 Author: rabite <rabite@posteo.de> Date: Tue May 21 00:15:12 2019 +0200 fixed play when autoplay is off commit d4036d52864d0a4e08f7da2cf6f7419ef070c1a9 Author: rabite <rabite@posteo.de> Date: Mon May 20 13:15:44 2019 +0200 add icons for play/pause/mute commit 29f0d203cfd7501b50d80501de146da9d89388bb Author: rabite <rabite@posteo.de> Date: Mon May 20 12:26:53 2019 +0200 add basic gif support commit 8d28e4c23a91b0ef83739554c3a2f6671a9ff6f5 Author: rabite <rabite@posteo.de> Date: Mon May 20 11:43:57 2019 +0200 fixed play after pause commit 142017df78de77bcfffd8f3dd9612a06927e183b Author: rabite <rabite@posteo.de> Date: Sun May 19 14:22:16 2019 +0200 change to stale on drop commit c0026c7f56f6a841df18e41bd1c9b33543e26cfb Author: rabite <rabite@posteo.de> Date: Sat May 18 23:46:27 2019 +0200 handle errors in gstreamer closure commit ef37f872c54b9d21ed5505c2edb480c793afaef9 Author: rabite <rabite@posteo.de> Date: Sat May 18 23:40:24 2019 +0200 add image-only mode to preview-gen commit 15752464563463c6ecf892c1d8a14651bf32e1e5 Author: rabite <rabite@posteo.de> Date: Sat May 18 23:28:33 2019 +0200 add copyright note commit 4c9f08fc4de5d3bffefd42284b60aa81cfbae9f7 Author: rabite <rabite@posteo.de> Date: Sat May 18 23:27:30 2019 +0200 make image/video previews optional commit 9c2c2db2b20ecd4c30acbb1c77ad18c71f528c4c Author: rabite <rabite@posteo.de> Date: Sat May 18 22:13:25 2019 +0200 remove blank space under video commit f7056d70fbe9147b3b95d7c10950653eadbb4f48 Author: rabite <rabite@posteo.de> Date: Sat May 18 22:06:49 2019 +0200 remove dbg commit cce820657ff1258cdb78d455dd3cf04564450cea Author: rabite <rabite@posteo.de> Date: Sat May 18 21:50:25 2019 +0200 added error handling to preview-gen commit 80bbe15bacb99d1f4f97504a5d10ecf59544993f Author: rabite <rabite@posteo.de> Date: Sat May 18 21:04:31 2019 +0200 add time and visual seek bars to videoview commit 4349945cc5549334f246be64bc7c8e2db43f9150 Author: rabite <rabite@posteo.de> Date: Thu May 16 22:39:19 2019 +0200 fix sneaky process commit 373128b7096d4de29924617e549a613a3aeea5b2 Author: rabite <rabite@posteo.de> Date: Thu May 16 22:07:27 2019 +0200 fix out of controll processes commit e061e065e913ab3923ffac1079a9f0a2be0df532 Author: rabite <rabite@posteo.de> Date: Thu May 16 20:51:56 2019 +0200 add media_preview commit f68c754895a9718d1a962980de9fbf02e5cb48cd Author: rabite <rabite@posteo.de> Date: Thu May 16 19:37:04 2019 +0200 beta image/video previews commit 9a5460e553dd26ebccffaf819c64a8dc6ba74818 Author: rabite <rabite@posteo.de> Date: Tue May 14 20:36:25 2019 +0200 external img preview commit 3c4edfcb7611b36f6e537c73743e0b6bd269037b Author: rabite <rabite@posteo.de> Date: Tue May 14 20:35:12 2019 +0200 video preview
2019-05-21 20:50:54 +02:00
* ```apt install gcc libmagic-dev gstreamer1.0-devel gst-plugins-base gst-plugins-good```
## INSTALLATION:
2019-05-07 01:20:42 +02:00
Compiling hunter currently requires a nightly Rust compiler!
The easiest way to get a nightly compiler is with [rustup](https://rustup.rs/). If you have rustup installed it will automatically download and use a version that is known to work when you run cargo.
By default it will install a full-featured version with support for media-previews. You can control this using the feature flags ```img```, and ```video```. These can be disabled by calling cargo with ```--no-default-features```. You can then enable image previews with ```--features=img``` and add video/audio with ```--feature=img,video```. Note that video requires img!
merge in media-preview stuff Squashed commit of the following: commit 4087cee2f2a72bc2d3e44832809cbe99d25a3309 Author: rabite <rabite@posteo.de> Date: Tue May 21 20:40:27 2019 +0200 rename to preview-gen commit 275fd420a01c24393ae9cc07287204fde309130a Author: rabite <rabite@posteo.de> Date: Tue May 21 20:30:50 2019 +0200 update Cargo.toml and README commit bf4c3fec0f8e0ff4628153297ac64fe165b4e443 Author: rabite <rabite@posteo.de> Date: Tue May 21 20:30:33 2019 +0200 add config options for media commit 3bf681cd078177d634507c51d04a45bdae184f1b Author: rabite <rabite@posteo.de> Date: Tue May 21 13:46:00 2019 +0200 always use unicode icons for play/pause/mute commit ed2a0b31d1911e4d42086699ca1db636c327bacf Author: rabite <rabite@posteo.de> Date: Tue May 21 13:04:11 2019 +0200 rename to mediaview and some fixups commit bda3f8f83bec07c3f52d06cf5f8eaad7fdbd85a0 Author: rabite <rabite@posteo.de> Date: Tue May 21 11:44:52 2019 +0200 fix warnings commit 9c917903cfa958b225f268ed4fb9f55f27162be0 Author: rabite <rabite@posteo.de> Date: Tue May 21 01:10:58 2019 +0200 play audio through viedo widget commit 9fe208b213710fae889f7701bdb3bf96d599c9a8 Author: rabite <rabite@posteo.de> Date: Tue May 21 00:15:12 2019 +0200 fixed play when autoplay is off commit d4036d52864d0a4e08f7da2cf6f7419ef070c1a9 Author: rabite <rabite@posteo.de> Date: Mon May 20 13:15:44 2019 +0200 add icons for play/pause/mute commit 29f0d203cfd7501b50d80501de146da9d89388bb Author: rabite <rabite@posteo.de> Date: Mon May 20 12:26:53 2019 +0200 add basic gif support commit 8d28e4c23a91b0ef83739554c3a2f6671a9ff6f5 Author: rabite <rabite@posteo.de> Date: Mon May 20 11:43:57 2019 +0200 fixed play after pause commit 142017df78de77bcfffd8f3dd9612a06927e183b Author: rabite <rabite@posteo.de> Date: Sun May 19 14:22:16 2019 +0200 change to stale on drop commit c0026c7f56f6a841df18e41bd1c9b33543e26cfb Author: rabite <rabite@posteo.de> Date: Sat May 18 23:46:27 2019 +0200 handle errors in gstreamer closure commit ef37f872c54b9d21ed5505c2edb480c793afaef9 Author: rabite <rabite@posteo.de> Date: Sat May 18 23:40:24 2019 +0200 add image-only mode to preview-gen commit 15752464563463c6ecf892c1d8a14651bf32e1e5 Author: rabite <rabite@posteo.de> Date: Sat May 18 23:28:33 2019 +0200 add copyright note commit 4c9f08fc4de5d3bffefd42284b60aa81cfbae9f7 Author: rabite <rabite@posteo.de> Date: Sat May 18 23:27:30 2019 +0200 make image/video previews optional commit 9c2c2db2b20ecd4c30acbb1c77ad18c71f528c4c Author: rabite <rabite@posteo.de> Date: Sat May 18 22:13:25 2019 +0200 remove blank space under video commit f7056d70fbe9147b3b95d7c10950653eadbb4f48 Author: rabite <rabite@posteo.de> Date: Sat May 18 22:06:49 2019 +0200 remove dbg commit cce820657ff1258cdb78d455dd3cf04564450cea Author: rabite <rabite@posteo.de> Date: Sat May 18 21:50:25 2019 +0200 added error handling to preview-gen commit 80bbe15bacb99d1f4f97504a5d10ecf59544993f Author: rabite <rabite@posteo.de> Date: Sat May 18 21:04:31 2019 +0200 add time and visual seek bars to videoview commit 4349945cc5549334f246be64bc7c8e2db43f9150 Author: rabite <rabite@posteo.de> Date: Thu May 16 22:39:19 2019 +0200 fix sneaky process commit 373128b7096d4de29924617e549a613a3aeea5b2 Author: rabite <rabite@posteo.de> Date: Thu May 16 22:07:27 2019 +0200 fix out of controll processes commit e061e065e913ab3923ffac1079a9f0a2be0df532 Author: rabite <rabite@posteo.de> Date: Thu May 16 20:51:56 2019 +0200 add media_preview commit f68c754895a9718d1a962980de9fbf02e5cb48cd Author: rabite <rabite@posteo.de> Date: Thu May 16 19:37:04 2019 +0200 beta image/video previews commit 9a5460e553dd26ebccffaf819c64a8dc6ba74818 Author: rabite <rabite@posteo.de> Date: Tue May 14 20:36:25 2019 +0200 external img preview commit 3c4edfcb7611b36f6e537c73743e0b6bd269037b Author: rabite <rabite@posteo.de> Date: Tue May 14 20:35:12 2019 +0200 video preview
2019-05-21 20:50:54 +02:00
Note that this only works if hunter can find the "preview-gen" tool somewhere in $PATH!
### Install rustup
```
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
```
### Build with cargo
```
cargo install (--no-default-features --features=...) hunter
```
### Build from source
```
merge in media-preview stuff Squashed commit of the following: commit 4087cee2f2a72bc2d3e44832809cbe99d25a3309 Author: rabite <rabite@posteo.de> Date: Tue May 21 20:40:27 2019 +0200 rename to preview-gen commit 275fd420a01c24393ae9cc07287204fde309130a Author: rabite <rabite@posteo.de> Date: Tue May 21 20:30:50 2019 +0200 update Cargo.toml and README commit bf4c3fec0f8e0ff4628153297ac64fe165b4e443 Author: rabite <rabite@posteo.de> Date: Tue May 21 20:30:33 2019 +0200 add config options for media commit 3bf681cd078177d634507c51d04a45bdae184f1b Author: rabite <rabite@posteo.de> Date: Tue May 21 13:46:00 2019 +0200 always use unicode icons for play/pause/mute commit ed2a0b31d1911e4d42086699ca1db636c327bacf Author: rabite <rabite@posteo.de> Date: Tue May 21 13:04:11 2019 +0200 rename to mediaview and some fixups commit bda3f8f83bec07c3f52d06cf5f8eaad7fdbd85a0 Author: rabite <rabite@posteo.de> Date: Tue May 21 11:44:52 2019 +0200 fix warnings commit 9c917903cfa958b225f268ed4fb9f55f27162be0 Author: rabite <rabite@posteo.de> Date: Tue May 21 01:10:58 2019 +0200 play audio through viedo widget commit 9fe208b213710fae889f7701bdb3bf96d599c9a8 Author: rabite <rabite@posteo.de> Date: Tue May 21 00:15:12 2019 +0200 fixed play when autoplay is off commit d4036d52864d0a4e08f7da2cf6f7419ef070c1a9 Author: rabite <rabite@posteo.de> Date: Mon May 20 13:15:44 2019 +0200 add icons for play/pause/mute commit 29f0d203cfd7501b50d80501de146da9d89388bb Author: rabite <rabite@posteo.de> Date: Mon May 20 12:26:53 2019 +0200 add basic gif support commit 8d28e4c23a91b0ef83739554c3a2f6671a9ff6f5 Author: rabite <rabite@posteo.de> Date: Mon May 20 11:43:57 2019 +0200 fixed play after pause commit 142017df78de77bcfffd8f3dd9612a06927e183b Author: rabite <rabite@posteo.de> Date: Sun May 19 14:22:16 2019 +0200 change to stale on drop commit c0026c7f56f6a841df18e41bd1c9b33543e26cfb Author: rabite <rabite@posteo.de> Date: Sat May 18 23:46:27 2019 +0200 handle errors in gstreamer closure commit ef37f872c54b9d21ed5505c2edb480c793afaef9 Author: rabite <rabite@posteo.de> Date: Sat May 18 23:40:24 2019 +0200 add image-only mode to preview-gen commit 15752464563463c6ecf892c1d8a14651bf32e1e5 Author: rabite <rabite@posteo.de> Date: Sat May 18 23:28:33 2019 +0200 add copyright note commit 4c9f08fc4de5d3bffefd42284b60aa81cfbae9f7 Author: rabite <rabite@posteo.de> Date: Sat May 18 23:27:30 2019 +0200 make image/video previews optional commit 9c2c2db2b20ecd4c30acbb1c77ad18c71f528c4c Author: rabite <rabite@posteo.de> Date: Sat May 18 22:13:25 2019 +0200 remove blank space under video commit f7056d70fbe9147b3b95d7c10950653eadbb4f48 Author: rabite <rabite@posteo.de> Date: Sat May 18 22:06:49 2019 +0200 remove dbg commit cce820657ff1258cdb78d455dd3cf04564450cea Author: rabite <rabite@posteo.de> Date: Sat May 18 21:50:25 2019 +0200 added error handling to preview-gen commit 80bbe15bacb99d1f4f97504a5d10ecf59544993f Author: rabite <rabite@posteo.de> Date: Sat May 18 21:04:31 2019 +0200 add time and visual seek bars to videoview commit 4349945cc5549334f246be64bc7c8e2db43f9150 Author: rabite <rabite@posteo.de> Date: Thu May 16 22:39:19 2019 +0200 fix sneaky process commit 373128b7096d4de29924617e549a613a3aeea5b2 Author: rabite <rabite@posteo.de> Date: Thu May 16 22:07:27 2019 +0200 fix out of controll processes commit e061e065e913ab3923ffac1079a9f0a2be0df532 Author: rabite <rabite@posteo.de> Date: Thu May 16 20:51:56 2019 +0200 add media_preview commit f68c754895a9718d1a962980de9fbf02e5cb48cd Author: rabite <rabite@posteo.de> Date: Thu May 16 19:37:04 2019 +0200 beta image/video previews commit 9a5460e553dd26ebccffaf819c64a8dc6ba74818 Author: rabite <rabite@posteo.de> Date: Tue May 14 20:36:25 2019 +0200 external img preview commit 3c4edfcb7611b36f6e537c73743e0b6bd269037b Author: rabite <rabite@posteo.de> Date: Tue May 14 20:35:12 2019 +0200 video preview
2019-05-21 20:50:54 +02:00
// Clone the git repo
git clone https://github.com/rabite0/hunter.git
// Go into the repos directory
cd {source_dir}/hunter/
merge in media-preview stuff Squashed commit of the following: commit 4087cee2f2a72bc2d3e44832809cbe99d25a3309 Author: rabite <rabite@posteo.de> Date: Tue May 21 20:40:27 2019 +0200 rename to preview-gen commit 275fd420a01c24393ae9cc07287204fde309130a Author: rabite <rabite@posteo.de> Date: Tue May 21 20:30:50 2019 +0200 update Cargo.toml and README commit bf4c3fec0f8e0ff4628153297ac64fe165b4e443 Author: rabite <rabite@posteo.de> Date: Tue May 21 20:30:33 2019 +0200 add config options for media commit 3bf681cd078177d634507c51d04a45bdae184f1b Author: rabite <rabite@posteo.de> Date: Tue May 21 13:46:00 2019 +0200 always use unicode icons for play/pause/mute commit ed2a0b31d1911e4d42086699ca1db636c327bacf Author: rabite <rabite@posteo.de> Date: Tue May 21 13:04:11 2019 +0200 rename to mediaview and some fixups commit bda3f8f83bec07c3f52d06cf5f8eaad7fdbd85a0 Author: rabite <rabite@posteo.de> Date: Tue May 21 11:44:52 2019 +0200 fix warnings commit 9c917903cfa958b225f268ed4fb9f55f27162be0 Author: rabite <rabite@posteo.de> Date: Tue May 21 01:10:58 2019 +0200 play audio through viedo widget commit 9fe208b213710fae889f7701bdb3bf96d599c9a8 Author: rabite <rabite@posteo.de> Date: Tue May 21 00:15:12 2019 +0200 fixed play when autoplay is off commit d4036d52864d0a4e08f7da2cf6f7419ef070c1a9 Author: rabite <rabite@posteo.de> Date: Mon May 20 13:15:44 2019 +0200 add icons for play/pause/mute commit 29f0d203cfd7501b50d80501de146da9d89388bb Author: rabite <rabite@posteo.de> Date: Mon May 20 12:26:53 2019 +0200 add basic gif support commit 8d28e4c23a91b0ef83739554c3a2f6671a9ff6f5 Author: rabite <rabite@posteo.de> Date: Mon May 20 11:43:57 2019 +0200 fixed play after pause commit 142017df78de77bcfffd8f3dd9612a06927e183b Author: rabite <rabite@posteo.de> Date: Sun May 19 14:22:16 2019 +0200 change to stale on drop commit c0026c7f56f6a841df18e41bd1c9b33543e26cfb Author: rabite <rabite@posteo.de> Date: Sat May 18 23:46:27 2019 +0200 handle errors in gstreamer closure commit ef37f872c54b9d21ed5505c2edb480c793afaef9 Author: rabite <rabite@posteo.de> Date: Sat May 18 23:40:24 2019 +0200 add image-only mode to preview-gen commit 15752464563463c6ecf892c1d8a14651bf32e1e5 Author: rabite <rabite@posteo.de> Date: Sat May 18 23:28:33 2019 +0200 add copyright note commit 4c9f08fc4de5d3bffefd42284b60aa81cfbae9f7 Author: rabite <rabite@posteo.de> Date: Sat May 18 23:27:30 2019 +0200 make image/video previews optional commit 9c2c2db2b20ecd4c30acbb1c77ad18c71f528c4c Author: rabite <rabite@posteo.de> Date: Sat May 18 22:13:25 2019 +0200 remove blank space under video commit f7056d70fbe9147b3b95d7c10950653eadbb4f48 Author: rabite <rabite@posteo.de> Date: Sat May 18 22:06:49 2019 +0200 remove dbg commit cce820657ff1258cdb78d455dd3cf04564450cea Author: rabite <rabite@posteo.de> Date: Sat May 18 21:50:25 2019 +0200 added error handling to preview-gen commit 80bbe15bacb99d1f4f97504a5d10ecf59544993f Author: rabite <rabite@posteo.de> Date: Sat May 18 21:04:31 2019 +0200 add time and visual seek bars to videoview commit 4349945cc5549334f246be64bc7c8e2db43f9150 Author: rabite <rabite@posteo.de> Date: Thu May 16 22:39:19 2019 +0200 fix sneaky process commit 373128b7096d4de29924617e549a613a3aeea5b2 Author: rabite <rabite@posteo.de> Date: Thu May 16 22:07:27 2019 +0200 fix out of controll processes commit e061e065e913ab3923ffac1079a9f0a2be0df532 Author: rabite <rabite@posteo.de> Date: Thu May 16 20:51:56 2019 +0200 add media_preview commit f68c754895a9718d1a962980de9fbf02e5cb48cd Author: rabite <rabite@posteo.de> Date: Thu May 16 19:37:04 2019 +0200 beta image/video previews commit 9a5460e553dd26ebccffaf819c64a8dc6ba74818 Author: rabite <rabite@posteo.de> Date: Tue May 14 20:36:25 2019 +0200 external img preview commit 3c4edfcb7611b36f6e537c73743e0b6bd269037b Author: rabite <rabite@posteo.de> Date: Tue May 14 20:35:12 2019 +0200 video preview
2019-05-21 20:50:54 +02:00
// (Optional) Build
// cargo build --release (--no-default-features --features=...)
merge in media-preview stuff Squashed commit of the following: commit 4087cee2f2a72bc2d3e44832809cbe99d25a3309 Author: rabite <rabite@posteo.de> Date: Tue May 21 20:40:27 2019 +0200 rename to preview-gen commit 275fd420a01c24393ae9cc07287204fde309130a Author: rabite <rabite@posteo.de> Date: Tue May 21 20:30:50 2019 +0200 update Cargo.toml and README commit bf4c3fec0f8e0ff4628153297ac64fe165b4e443 Author: rabite <rabite@posteo.de> Date: Tue May 21 20:30:33 2019 +0200 add config options for media commit 3bf681cd078177d634507c51d04a45bdae184f1b Author: rabite <rabite@posteo.de> Date: Tue May 21 13:46:00 2019 +0200 always use unicode icons for play/pause/mute commit ed2a0b31d1911e4d42086699ca1db636c327bacf Author: rabite <rabite@posteo.de> Date: Tue May 21 13:04:11 2019 +0200 rename to mediaview and some fixups commit bda3f8f83bec07c3f52d06cf5f8eaad7fdbd85a0 Author: rabite <rabite@posteo.de> Date: Tue May 21 11:44:52 2019 +0200 fix warnings commit 9c917903cfa958b225f268ed4fb9f55f27162be0 Author: rabite <rabite@posteo.de> Date: Tue May 21 01:10:58 2019 +0200 play audio through viedo widget commit 9fe208b213710fae889f7701bdb3bf96d599c9a8 Author: rabite <rabite@posteo.de> Date: Tue May 21 00:15:12 2019 +0200 fixed play when autoplay is off commit d4036d52864d0a4e08f7da2cf6f7419ef070c1a9 Author: rabite <rabite@posteo.de> Date: Mon May 20 13:15:44 2019 +0200 add icons for play/pause/mute commit 29f0d203cfd7501b50d80501de146da9d89388bb Author: rabite <rabite@posteo.de> Date: Mon May 20 12:26:53 2019 +0200 add basic gif support commit 8d28e4c23a91b0ef83739554c3a2f6671a9ff6f5 Author: rabite <rabite@posteo.de> Date: Mon May 20 11:43:57 2019 +0200 fixed play after pause commit 142017df78de77bcfffd8f3dd9612a06927e183b Author: rabite <rabite@posteo.de> Date: Sun May 19 14:22:16 2019 +0200 change to stale on drop commit c0026c7f56f6a841df18e41bd1c9b33543e26cfb Author: rabite <rabite@posteo.de> Date: Sat May 18 23:46:27 2019 +0200 handle errors in gstreamer closure commit ef37f872c54b9d21ed5505c2edb480c793afaef9 Author: rabite <rabite@posteo.de> Date: Sat May 18 23:40:24 2019 +0200 add image-only mode to preview-gen commit 15752464563463c6ecf892c1d8a14651bf32e1e5 Author: rabite <rabite@posteo.de> Date: Sat May 18 23:28:33 2019 +0200 add copyright note commit 4c9f08fc4de5d3bffefd42284b60aa81cfbae9f7 Author: rabite <rabite@posteo.de> Date: Sat May 18 23:27:30 2019 +0200 make image/video previews optional commit 9c2c2db2b20ecd4c30acbb1c77ad18c71f528c4c Author: rabite <rabite@posteo.de> Date: Sat May 18 22:13:25 2019 +0200 remove blank space under video commit f7056d70fbe9147b3b95d7c10950653eadbb4f48 Author: rabite <rabite@posteo.de> Date: Sat May 18 22:06:49 2019 +0200 remove dbg commit cce820657ff1258cdb78d455dd3cf04564450cea Author: rabite <rabite@posteo.de> Date: Sat May 18 21:50:25 2019 +0200 added error handling to preview-gen commit 80bbe15bacb99d1f4f97504a5d10ecf59544993f Author: rabite <rabite@posteo.de> Date: Sat May 18 21:04:31 2019 +0200 add time and visual seek bars to videoview commit 4349945cc5549334f246be64bc7c8e2db43f9150 Author: rabite <rabite@posteo.de> Date: Thu May 16 22:39:19 2019 +0200 fix sneaky process commit 373128b7096d4de29924617e549a613a3aeea5b2 Author: rabite <rabite@posteo.de> Date: Thu May 16 22:07:27 2019 +0200 fix out of controll processes commit e061e065e913ab3923ffac1079a9f0a2be0df532 Author: rabite <rabite@posteo.de> Date: Thu May 16 20:51:56 2019 +0200 add media_preview commit f68c754895a9718d1a962980de9fbf02e5cb48cd Author: rabite <rabite@posteo.de> Date: Thu May 16 19:37:04 2019 +0200 beta image/video previews commit 9a5460e553dd26ebccffaf819c64a8dc6ba74818 Author: rabite <rabite@posteo.de> Date: Tue May 14 20:36:25 2019 +0200 external img preview commit 3c4edfcb7611b36f6e537c73743e0b6bd269037b Author: rabite <rabite@posteo.de> Date: Tue May 14 20:35:12 2019 +0200 video preview
2019-05-21 20:50:54 +02:00
// Install
cargo install (--no-default-features --features=...) --path .
```
2019-04-06 17:07:03 +02:00
## Configuration
2019-05-21 20:58:28 +02:00
hunter reads $XDG_CONFIG_HOME/hunter/config at startup. On macOS it simply reads ~/.config/hunter/config. There are a few options which can be set. The configuration file is read asynchronously, so if it's not read by the time hunter starts drawing you will see its default configuration until the config file is read. Options can be set like this (default config):
2019-04-06 17:07:03 +02:00
2019-04-13 18:47:31 +02:00
```
animation=on
2019-04-06 17:07:03 +02:00
show_hidden=off
select_cmd=find -type f | fzf -m
cd_cmd=find -type d | fzf
2019-05-11 17:36:52 +02:00
icons=off
merge in media-preview stuff Squashed commit of the following: commit 4087cee2f2a72bc2d3e44832809cbe99d25a3309 Author: rabite <rabite@posteo.de> Date: Tue May 21 20:40:27 2019 +0200 rename to preview-gen commit 275fd420a01c24393ae9cc07287204fde309130a Author: rabite <rabite@posteo.de> Date: Tue May 21 20:30:50 2019 +0200 update Cargo.toml and README commit bf4c3fec0f8e0ff4628153297ac64fe165b4e443 Author: rabite <rabite@posteo.de> Date: Tue May 21 20:30:33 2019 +0200 add config options for media commit 3bf681cd078177d634507c51d04a45bdae184f1b Author: rabite <rabite@posteo.de> Date: Tue May 21 13:46:00 2019 +0200 always use unicode icons for play/pause/mute commit ed2a0b31d1911e4d42086699ca1db636c327bacf Author: rabite <rabite@posteo.de> Date: Tue May 21 13:04:11 2019 +0200 rename to mediaview and some fixups commit bda3f8f83bec07c3f52d06cf5f8eaad7fdbd85a0 Author: rabite <rabite@posteo.de> Date: Tue May 21 11:44:52 2019 +0200 fix warnings commit 9c917903cfa958b225f268ed4fb9f55f27162be0 Author: rabite <rabite@posteo.de> Date: Tue May 21 01:10:58 2019 +0200 play audio through viedo widget commit 9fe208b213710fae889f7701bdb3bf96d599c9a8 Author: rabite <rabite@posteo.de> Date: Tue May 21 00:15:12 2019 +0200 fixed play when autoplay is off commit d4036d52864d0a4e08f7da2cf6f7419ef070c1a9 Author: rabite <rabite@posteo.de> Date: Mon May 20 13:15:44 2019 +0200 add icons for play/pause/mute commit 29f0d203cfd7501b50d80501de146da9d89388bb Author: rabite <rabite@posteo.de> Date: Mon May 20 12:26:53 2019 +0200 add basic gif support commit 8d28e4c23a91b0ef83739554c3a2f6671a9ff6f5 Author: rabite <rabite@posteo.de> Date: Mon May 20 11:43:57 2019 +0200 fixed play after pause commit 142017df78de77bcfffd8f3dd9612a06927e183b Author: rabite <rabite@posteo.de> Date: Sun May 19 14:22:16 2019 +0200 change to stale on drop commit c0026c7f56f6a841df18e41bd1c9b33543e26cfb Author: rabite <rabite@posteo.de> Date: Sat May 18 23:46:27 2019 +0200 handle errors in gstreamer closure commit ef37f872c54b9d21ed5505c2edb480c793afaef9 Author: rabite <rabite@posteo.de> Date: Sat May 18 23:40:24 2019 +0200 add image-only mode to preview-gen commit 15752464563463c6ecf892c1d8a14651bf32e1e5 Author: rabite <rabite@posteo.de> Date: Sat May 18 23:28:33 2019 +0200 add copyright note commit 4c9f08fc4de5d3bffefd42284b60aa81cfbae9f7 Author: rabite <rabite@posteo.de> Date: Sat May 18 23:27:30 2019 +0200 make image/video previews optional commit 9c2c2db2b20ecd4c30acbb1c77ad18c71f528c4c Author: rabite <rabite@posteo.de> Date: Sat May 18 22:13:25 2019 +0200 remove blank space under video commit f7056d70fbe9147b3b95d7c10950653eadbb4f48 Author: rabite <rabite@posteo.de> Date: Sat May 18 22:06:49 2019 +0200 remove dbg commit cce820657ff1258cdb78d455dd3cf04564450cea Author: rabite <rabite@posteo.de> Date: Sat May 18 21:50:25 2019 +0200 added error handling to preview-gen commit 80bbe15bacb99d1f4f97504a5d10ecf59544993f Author: rabite <rabite@posteo.de> Date: Sat May 18 21:04:31 2019 +0200 add time and visual seek bars to videoview commit 4349945cc5549334f246be64bc7c8e2db43f9150 Author: rabite <rabite@posteo.de> Date: Thu May 16 22:39:19 2019 +0200 fix sneaky process commit 373128b7096d4de29924617e549a613a3aeea5b2 Author: rabite <rabite@posteo.de> Date: Thu May 16 22:07:27 2019 +0200 fix out of controll processes commit e061e065e913ab3923ffac1079a9f0a2be0df532 Author: rabite <rabite@posteo.de> Date: Thu May 16 20:51:56 2019 +0200 add media_preview commit f68c754895a9718d1a962980de9fbf02e5cb48cd Author: rabite <rabite@posteo.de> Date: Thu May 16 19:37:04 2019 +0200 beta image/video previews commit 9a5460e553dd26ebccffaf819c64a8dc6ba74818 Author: rabite <rabite@posteo.de> Date: Tue May 14 20:36:25 2019 +0200 external img preview commit 3c4edfcb7611b36f6e537c73743e0b6bd269037b Author: rabite <rabite@posteo.de> Date: Tue May 14 20:35:12 2019 +0200 video preview
2019-05-21 20:50:54 +02:00
media_autostart=off
media_mute=off
2019-04-13 18:47:31 +02:00
```
2019-04-06 17:07:03 +02:00
2019-06-19 19:30:28 +02:00
## Previews
Defining previews is easy. You just need a shell script that takes a path as first parameter and prints out what you want to see in the preview column. Put that shell script in
```$HOME/.config/hunter/previewers/definitions```
and create a symlink to it in
```$HOME/.config/hunter/previewers/```
with the extension of the file type you want to preview. Make sure the script is executable. That's it.
2019-05-28 00:50:15 +02:00
## Quick Actions
These are executables you can run by pressing ```a```. Which actions you can see depends on the MIME type of the files you have selected. If you have multiple files selected, hunter will try to use the most specific MIME type possible. For example, if you have selected a bunch of images with different types you will see actions for "image/". You can see the computed MIME type in the header bar.
2019-06-19 19:30:28 +02:00
There are "universal", "base-type", and "sub-type" actions. These are stored in
```~/.config/hunter/actions/<base-type>/<sub-type>/```
Universal actions are always available. These are stored right in the "actions" directory. "Base-type" actions are stored in directories like "text", "image", "video". These correspond to the part left of the "/" in a full MIME-type like "image/png". These will be available to all "text", "image", or "video" files. This list is not exhaustive, there are a lot more base-types. In addition to that you can create a directory in those base-type directories to store "sub-type" actions, which are only available to a specific file type..
2019-05-28 00:50:15 +02:00
2019-06-19 19:30:28 +02:00
For example, if you want to define an action only available to PNG images, you can store that in
2019-05-28 00:50:15 +02:00
```~/.config/hunter/actions/image/png/custom_pngcrush.sh```
2019-05-28 00:50:15 +02:00
You can also ask for input before those actions are run. This input will be entered through hunter's minibuffer. To ask for input append "?question" to the file name, but before the extension. hunter will then set an environment variable named after whatever you put after the question mark. You can also ask for multiple things to be entered.
2019-06-19 19:30:28 +02:00
For example, you could name an action
2019-05-28 00:50:15 +02:00
```download_stuff?url?destination.sh```
hunter will ask for the "url" and the "destination" before running your script. The values will be available through the $url and $destination environment variables.
2019-06-19 19:30:28 +02:00
You can also make the action run in the foreground, so that it will take over the terminal while it runs. To do that simply append "!" to the file name before the extension. It should look like this:
```action?query1?query2!.sh```
This will ask two questions and then run the script in the foreground until it quits.
2019-05-28 00:50:15 +02:00
There are a few examples in extras/actions. You can copy the whole directory into ~/.config/hunter/ and try it out.
2019-05-22 18:54:37 +02:00
## Startup options
You can set a few options when hunter starts. These override the configuration file. You can also tell hunter to start in a certain directory.
**USAGE: hunter [FLAGS] [path]**
2019-05-25 21:28:56 +02:00
| **FLAGS: ** | |
------------------------|-------------------------------------|
2019-05-22 18:54:37 +02:00
| -a, --animation-off | Turn off animations |
| --help | Prints help information |
| -i, --icons | Show icons for different file types |
2019-06-13 15:01:22 +02:00
| -h, --show-hidden | Show hidden files |
2019-05-22 18:54:37 +02:00
| -V, --version | Prints version information |
2019-04-06 17:31:43 +02:00
## Drop into hunter cwd on quit
To change the directory of your shell when quitting hunter with Q you need to source extra/hunter_cd.sh, which is a wrapper that runs hunter and checks for ~/.hunter_cwd after hunter exits and cd's into the contained directory if it exists.
2019-04-06 17:07:03 +02:00
2019-04-06 18:02:41 +02:00
## Filename Substitution
| Pattern | Substituted with |
|-----------|:------------------------|
| $s | selected file(s) |
| $n | tab directory |
| $ns | selected files in tab |
2019-04-06 17:07:03 +02:00
Keybindings:
============
## holy mode
2019-05-06 17:09:05 +02:00
By default hunter uses vi-style keybindings. If you use a QWERTY-like keyboard layout this is probably what you want. Most people will want this, so I made it the default. If you have a different keyboard layout this might not be the best choice. The holy-branch changes the movement keys to the emacs keybindings, which is more ergonomic on e.g. Colemak.
2019-04-06 17:07:03 +02:00
## Main view:
| Key | Action |
| ------------------- | :--------------------------------- |
| j/k (holy: n/p) | move down/up |
| J/K (holy: N/P) | 5x move down/5x move up |
2019-05-07 01:20:42 +02:00
| ]/[ | move down/up on left column |
| < | move to top |
| > | move to bottom |
| l/h (holy: f/b) | open/go back |
| S | search file |
| Alt(s) | search next |
| Alt(S) | search prev |
| Ctrl(f) | filter |
| space | multi select file |
| Alt(space) | select with external program |
| v | invert selections |
2019-06-18 13:34:15 +02:00
| V | clear all selections |
2019-06-30 14:53:44 +02:00
| Alt(v) | only show selected files |
| t | toggle tag |
| h | toggle show hidden |
| r | reverse sort |
| s | cycle sort (name/size/mtime) |
| K | select next by mtime |
| k | select prev by mtime |
| d | toggle dirs first |
2019-06-18 13:42:17 +02:00
| ~ | go to $HOME |
| / | turbo cd |
| Alt(/) | enter dir with external program |
| Q | quit with dir/selections |
2019-04-13 19:09:08 +02:00
| L | run in background |
2019-04-13 14:46:21 +02:00
| ~ | goto prev cwd |
| ` | goto bookmark |
| m | add bookmark |
| w | show processes |
2019-04-13 19:09:08 +02:00
| g holy(l) | show log |
2019-05-28 00:50:15 +02:00
| a | show quick actions |
| z | open subshell in cwd |
| c | toggle columns |
| F(n) | switch to tab |
merge in media-preview stuff Squashed commit of the following: commit 4087cee2f2a72bc2d3e44832809cbe99d25a3309 Author: rabite <rabite@posteo.de> Date: Tue May 21 20:40:27 2019 +0200 rename to preview-gen commit 275fd420a01c24393ae9cc07287204fde309130a Author: rabite <rabite@posteo.de> Date: Tue May 21 20:30:50 2019 +0200 update Cargo.toml and README commit bf4c3fec0f8e0ff4628153297ac64fe165b4e443 Author: rabite <rabite@posteo.de> Date: Tue May 21 20:30:33 2019 +0200 add config options for media commit 3bf681cd078177d634507c51d04a45bdae184f1b Author: rabite <rabite@posteo.de> Date: Tue May 21 13:46:00 2019 +0200 always use unicode icons for play/pause/mute commit ed2a0b31d1911e4d42086699ca1db636c327bacf Author: rabite <rabite@posteo.de> Date: Tue May 21 13:04:11 2019 +0200 rename to mediaview and some fixups commit bda3f8f83bec07c3f52d06cf5f8eaad7fdbd85a0 Author: rabite <rabite@posteo.de> Date: Tue May 21 11:44:52 2019 +0200 fix warnings commit 9c917903cfa958b225f268ed4fb9f55f27162be0 Author: rabite <rabite@posteo.de> Date: Tue May 21 01:10:58 2019 +0200 play audio through viedo widget commit 9fe208b213710fae889f7701bdb3bf96d599c9a8 Author: rabite <rabite@posteo.de> Date: Tue May 21 00:15:12 2019 +0200 fixed play when autoplay is off commit d4036d52864d0a4e08f7da2cf6f7419ef070c1a9 Author: rabite <rabite@posteo.de> Date: Mon May 20 13:15:44 2019 +0200 add icons for play/pause/mute commit 29f0d203cfd7501b50d80501de146da9d89388bb Author: rabite <rabite@posteo.de> Date: Mon May 20 12:26:53 2019 +0200 add basic gif support commit 8d28e4c23a91b0ef83739554c3a2f6671a9ff6f5 Author: rabite <rabite@posteo.de> Date: Mon May 20 11:43:57 2019 +0200 fixed play after pause commit 142017df78de77bcfffd8f3dd9612a06927e183b Author: rabite <rabite@posteo.de> Date: Sun May 19 14:22:16 2019 +0200 change to stale on drop commit c0026c7f56f6a841df18e41bd1c9b33543e26cfb Author: rabite <rabite@posteo.de> Date: Sat May 18 23:46:27 2019 +0200 handle errors in gstreamer closure commit ef37f872c54b9d21ed5505c2edb480c793afaef9 Author: rabite <rabite@posteo.de> Date: Sat May 18 23:40:24 2019 +0200 add image-only mode to preview-gen commit 15752464563463c6ecf892c1d8a14651bf32e1e5 Author: rabite <rabite@posteo.de> Date: Sat May 18 23:28:33 2019 +0200 add copyright note commit 4c9f08fc4de5d3bffefd42284b60aa81cfbae9f7 Author: rabite <rabite@posteo.de> Date: Sat May 18 23:27:30 2019 +0200 make image/video previews optional commit 9c2c2db2b20ecd4c30acbb1c77ad18c71f528c4c Author: rabite <rabite@posteo.de> Date: Sat May 18 22:13:25 2019 +0200 remove blank space under video commit f7056d70fbe9147b3b95d7c10950653eadbb4f48 Author: rabite <rabite@posteo.de> Date: Sat May 18 22:06:49 2019 +0200 remove dbg commit cce820657ff1258cdb78d455dd3cf04564450cea Author: rabite <rabite@posteo.de> Date: Sat May 18 21:50:25 2019 +0200 added error handling to preview-gen commit 80bbe15bacb99d1f4f97504a5d10ecf59544993f Author: rabite <rabite@posteo.de> Date: Sat May 18 21:04:31 2019 +0200 add time and visual seek bars to videoview commit 4349945cc5549334f246be64bc7c8e2db43f9150 Author: rabite <rabite@posteo.de> Date: Thu May 16 22:39:19 2019 +0200 fix sneaky process commit 373128b7096d4de29924617e549a613a3aeea5b2 Author: rabite <rabite@posteo.de> Date: Thu May 16 22:07:27 2019 +0200 fix out of controll processes commit e061e065e913ab3923ffac1079a9f0a2be0df532 Author: rabite <rabite@posteo.de> Date: Thu May 16 20:51:56 2019 +0200 add media_preview commit f68c754895a9718d1a962980de9fbf02e5cb48cd Author: rabite <rabite@posteo.de> Date: Thu May 16 19:37:04 2019 +0200 beta image/video previews commit 9a5460e553dd26ebccffaf819c64a8dc6ba74818 Author: rabite <rabite@posteo.de> Date: Tue May 14 20:36:25 2019 +0200 external img preview commit 3c4edfcb7611b36f6e537c73743e0b6bd269037b Author: rabite <rabite@posteo.de> Date: Tue May 14 20:35:12 2019 +0200 video preview
2019-05-21 20:50:54 +02:00
| Alt(m) | toggle media pause and autoplay |
| Alt(M) | toggle media mute |
| Alt(>) | seek media +5s |
| Alt(<) | seek media -5s |
2019-04-06 17:07:03 +02:00
## Keybindings in bookmark popup:
| Key | Action |
| ------------------- |:---------------------------------|
|(key) |open bookmark |
|` |goto last cwd |
|Ctrl(c) |cancel |
2019-04-11 15:05:47 +02:00
|Alt(key) |delete bookmark |
2019-04-06 17:07:03 +02:00
## Keybindings in process viewer:
| Key | Action |
| ------------------- |:---------------------------------|
|w |close process viewer |
|d |remove process |
|k |kill process |
|k holy(p) |move up |
|j holy(n) |move down |
2019-04-08 16:11:33 +02:00
|f |toggle follow output |
|Ctrl(j) holy(Ctrl(n) |scroll output down |
|Ctrl(k) holy(Ctrl(p) |scroll output up |
2019-04-06 17:07:03 +02:00
|Ctrl(v) |page down |
|Alt(v) |page up |
|< |scroll to bottom |
|> |scroll to top |
## Keybindings in minibuffer:
| Key | Action |
| ------------------- |:---------------------------------|
|Esc/Ctrl(c) |cancel input |
|Tab |complete |
|F(n) |insert tab substitution |
|Ctrl(d) |delete char |
|Ctrl(b) |move cursor left |
2019-04-06 17:07:03 +02:00
|Ctrl(f) |move cursor right |
|Ctrl(p)/Alt(p) |history up |
|Ctrl(n)/Alt(n) |history down |
|Ctrl(u) |clear line |
|Ctrl(h) |delete word |
|Ctrl(a) |move cursor to beginning |
|Ctrl(e) |move cursor to end |