Skip to content

Commit

Permalink
README: update
Browse files Browse the repository at this point in the history
  • Loading branch information
xalexalex committed Aug 4, 2019
1 parent cbfee61 commit 09e6290
Showing 1 changed file with 31 additions and 19 deletions.
50 changes: 31 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,54 +4,66 @@

Everything should be at most a few keystrokes away.

Once you get used to it, the time from when you decide to open a file (or application or website) to when you have it open in front of you will easily be less than one second.

Nobody should ever:

- browse folders searching for a file
- reach for the mouse to open a file or launch an application
- waste time doing things that should be done by a computer.
- browse folders searching for a file;
- search for the application to open in a launcher;
- reach for the mouse to open a file or launch an application;
- waste time doing things that can be done instantly by a computer.

If you have a document at `~/docs/work/drafts/letter.odt` you should _not_ hunt for it in your file manager and open it. You should run `via` (`Alt-space`), type "let" (or "work odt", or any combination of substrings), press `ENTER` and do what you wanted to do with that document.

# Usage

`via` can:

- open files (`/home/user/file.txt`)
- open folders (`/home/user/music`)
- open websites (`https://example.com`)
- launch applications (`passmenu`, `gimp`, `st mutt`)
- run shell commands (`pkill hung`)
- open files (`/home/user/file.txt`);
- open folders (`/home/user/music`);
- open websites (`https://example.com`);
- search the web (`https://duckduckgo.com/?q=`, `https://en.wikipedia.org/wiki/Special:Search?search=`);
- launch applications (`passmenu`, `gimp`, `st mutt`);
- run shell commands (`pkill hung`).

It is advisable to bind `via` to a hotkey such as `Alt-Space`.

When run, `via-menu` will be displayed. Type a few characters to select the entry you want to open and press `ENTER`. `via` will know if that's a file to open, program to launch, website or shell command.

To search the web, assuming your search engine is `via`'s first entry, just launch via, press `TAB`, type your query and press `ENTER`.

With appropriate URLs (such as `https://en.wikipedia.org/wiki/Special:Search?search=`) you will also be able to use `via` to run custom web searches and have your browser open the result directly.

# Configuration

`via` is made up of three parts:

- `via-feed` generates a list of menu options
- `via-menu` interacts with the user and records his choice
- `via-open` opens or launches the choice
- `via-feed` generates a list of menu options;
- `via-menu` interacts with you and records your choice;
- `via-open` opens or launches the choice.

However, `via` is a concept and as such it is implementation-independent.

`via-feed`, `via-menu`, and `via-open` are all configurable. To do so, copy them to `$HOME/.config/via` and edit them to your liking. Your version will automatically be used in place of the default executable.
`via-feed`, `via-menu`, and `via-open` are all configurable. To do so, copy them to `$HOME/.config/via` and edit them to your liking. Your version will automatically be used.

## via-feed

`via-feed` is a simple script that writes the menu options to standard output.
`via-feed` writes the menu options to standard output.

In its default state, the user can conveniently edit the `shortcuts` and `websites` files, but he is encouraged to edit `via-feed` itself.
In particular, the `find` command may be tweaked to exclude big folders that shouldn't be indexed (such as hidden folders and source code directories).
If you use the default `via-feed`, you can tweak it by editing the `shortcuts` and `websites` files, but you are encouraged to edit `via-feed` itself.
In particular, the `find` command may be tweaked to exclude big folders that shouldn't be indexed (such as hidden folders, source code directories, and anything you are unlikely to open with `via`).

## via-menu

`via-menu` is a simple script that reads options on standard input and outputs the choice(s) to standard output, separated by newlines.
`via-menu` reads options on standard input, presents them to you, and outputs your choice(s) to standard output.

By default, `dmenu` is used. However, you can use `fzf`, `rofi`, or even a combination of these (for example, `fzf` when run in a terminal and `dmenu` when run in a graphical environment).

## via-open

`via-open` is a simple script that reads newline-separated strings and:
`via-open` reads newline-separated strings and:

- opens URLs in the user's favorite browser;
- opens URLs in your favorite browser;
- opens files according to extension or mimetype, as specified in `via-open` itself;
- opens folders in the user's file manager;
- opens folders in your file manager;
- runs shell commands.

0 comments on commit 09e6290

Please sign in to comment.