Commit Graph

316 Commits

Author SHA1 Message Date
Arijit Basu
be0a96abae
Update awesome-plugins.md 2021-06-28 18:43:38 +05:30
Arijit Basu
7e373972f4
Update integration.md 2021-06-28 15:08:24 +05:30
Arijit Basu
ed0ca1009d
Update writing-plugins.md 2021-06-28 15:05:48 +05:30
Arijit Basu
5779c3447b
Fix doc 2021-06-28 11:53:54 +05:30
Arijit Basu
8ad962214a
Fix doc 2021-06-28 11:01:23 +05:30
Arijit Basu
fb8f60c822
Add trash-cli.xplr plugin 2021-06-28 10:50:15 +05:30
Arijit Basu
67f604e4f0
Fix typos 2021-06-28 09:33:54 +05:30
Arijit Basu
4d61f2e9ad
Improve docs
Add features and integration docs.
2021-06-28 09:28:42 +05:30
Arijit Basu
ea9c33539a
Update node_types.md 2021-06-26 14:57:47 +05:30
Arijit Basu
8da9cf23b2
Update fzf.xplr 2021-06-26 10:02:21 +05:30
Arijit Basu
3771dc9efe
Update awesome-plugins.md 2021-06-25 10:57:51 +05:30
Arijit Basu
8d576ba629
Update sorting.md 2021-06-25 07:06:15 +05:30
Arijit Basu
18b7a0b3fa
Update modes.md 2021-06-24 23:05:51 +05:30
Maxim Baz
0df4f87d7f Update pacman command 2021-06-24 22:56:34 +05:30
Arijit Basu
05272a6575
Update filtering.md 2021-06-24 22:22:18 +05:30
Arijit Basu
9c144c0f30
Update general-config.md 2021-06-24 21:47:34 +05:30
Arijit Basu
d7d7ade877
Update configuration.md 2021-06-24 21:47:01 +05:30
Arijit Basu
2d9a256691
Update quickstart.md 2021-06-24 20:02:35 +05:30
Arijit Basu
32a32e9180 Add more docs
Also, prepare for release.
2021-06-24 17:04:52 +05:30
Arijit Basu
d29f6aed6d Fix StartFifo and ToggleFifo
Also add `xplr.config.general.start_fifo`.

Closes: https://github.com/sayanarijit/xplr/issues/280
2021-06-24 15:21:21 +05:30
Arijit Basu
2df8d47b0f
Fix doc 2021-06-24 12:01:50 +05:30
Arijit Basu
cf2a38fe5f
Fix doc 2021-06-24 11:59:37 +05:30
Arijit Basu
2cd17f18d8
Add fzf.xplr 2021-06-24 11:54:34 +05:30
Arijit Basu
c4c1020aa0 Add dua-cli plugin 2021-06-24 10:43:39 +05:30
Arijit Basu
3cadaf8880 Add plugin docs
Also minor doc improvements
2021-06-24 10:13:05 +05:30
Arijit Basu
7ed89a4aff Mime wildcard 2021-06-23 23:47:51 +05:30
Arijit Basu
4be0a23d4f Update readme 2021-06-23 23:36:51 +05:30
Arijit Basu
1f3d6f2152 Document node types 2021-06-23 23:35:48 +05:30
Arijit Basu
cdc1e6825b
Update message.md 2021-06-23 21:34:27 +05:30
Arijit Basu
2146bc646b
Update book.toml 2021-06-23 19:53:00 +05:30
Arijit Basu
cb38ca048d Typos and documentation fixes 2021-06-23 17:24:20 +05:30
Arijit Basu
c1b667d9f7 Fix publish attempt 2 2021-06-23 15:30:53 +05:30
Arijit Basu
107d5a79a3 Fix publishing book 2021-06-23 15:24:50 +05:30
Arijit Basu
3e646b063b Publish xplr book with intensive documentation
Closes: https://github.com/sayanarijit/xplr/issues/263
2021-06-23 15:20:57 +05:30
Arijit Basu
b61bf9dcf2 Increase poll timeout
Ref: https://github.com/sayanarijit/xplr/issues/10
2021-06-22 10:20:10 +05:30
Arijit Basu
ed65d85568 Remove auto refresh service
Ref: https://github.com/sayanarijit/xplr/issues/10
2021-06-21 13:00:35 +05:30
Arijit Basu
5c6fd1ef63 Update version 2021-06-16 14:43:40 +05:30
Arijit Basu
329821ca1b Improve FocusNext and FocusPrevious behavior
Closes: https://github.com/sayanarijit/xplr/issues/253
2021-06-16 14:38:54 +05:30
Arijit Basu
4d8f1ef2ef Fix handling of relative paths
Closes: https://github.com/sayanarijit/xplr/issues/255
2021-06-16 14:29:36 +05:30
Arijit Basu
f6d1be61d5 Add quit mode and key bindings
`:q<enter>` -> Just quit.
`:qp` -> quit printing pwd.
`:qf` -> quit printing focus.
`:qs` -> quit printing selection.
`:qr` -> quit printing result.

Ref: https://github.com/sayanarijit/xplr/issues/257
2021-06-16 13:59:33 +05:30
Arijit Basu
6b03598b5d Add more quit options
Adds the following messages.

- PrintPwdAndQuit
- PrintFocusPathAndQuit
- PrintSelectionAndQuit

Closed: https://github.com/sayanarijit/xplr/issues/257
2021-06-16 13:59:33 +05:30
Arijit Basu
6a70b568bf Fix FocusPath issue
Fixes: https://github.com/sayanarijit/xplr/issues/249
2021-06-08 23:42:03 +05:30
Arijit Basu
f1ffc551fc Minor addition 2021-06-06 14:27:10 +05:30
Arijit Basu
844480204c Support specifying read-only mode via CLI argument
Closes: https://github.com/sayanarijit/xplr/issues/22
2021-06-06 14:13:39 +05:30
Arijit Basu
f12e1e5290 Fix config path on macOS
Also, add `-c` / `--config` CLI option to specify custom config file.

Priority is:

`-c <PATH>` > `~/.config/xplr/init.lua` > `/etc/xplr/init.lua`.

Fixes: https://github.com/sayanarijit/xplr/issues/230
2021-06-06 13:50:43 +05:30
Arijit Basu
1513c325d6 Add option to disable recover mode
Use `config.general.disable_recover_mode = true` to disable the recover
mode.

Closes: https://github.com/sayanarijit/xplr/issues/232
2021-06-06 12:40:13 +05:30
Arijit Basu
a2f42ac6fc Add support for FIFO based previewer
Adds basic support for nnn-like FIFO based previewer.

The FIFO can be manager with the following messages:

- StartFifo: /path/to/fifo
- StopFifo
- ToggleFifo: /path/to/fifo

A basic nnn plugin wrapper example:

```lua
-- Usage Example:
--
--   require("nnn_preview_wrapper").setup{
--     plugin_path = os.getenv("HOME") .. "/.config/nnn/plugins/preview-tabbed",
--     fifo_path = "/tmp/xplr.fifo",
--     mode = "action",
--     key = "p",
--   }
--
-- Press `:p` to toggle preview mode.

local function setup(o)

  if o.fifo_path == nil then
    o.fifo_path = os.getenv("NNN_FIFO")
  end

  if o.mode == nil then
    o.mode = "action"
  end

  if o.key == nil then
    o.key = "p"
  end

  local enabled = false
  local message = nil

  os.execute('[ ! -p "' .. o.fifo_path ..'" ] && mkfifo "' .. o.fifo_path .. '"')

  xplr.fn.custom.preview_toggle = function(app)

    if enabled then
      enabled = false
      message = "StopFifo"
    else
      os.execute('NNN_FIFO="' .. o.fifo_path .. '" "'.. o.plugin_path .. '" & ')
      enabled = true
      message = { StartFifo = o.fifo_path }
    end

    return { message }
  end

  xplr.config.modes.builtin[o.mode].key_bindings.on_key[o.key] = {
    help = "search with preview",
    messages = {
      "PopMode",
      { CallLuaSilently = "custom.preview_toggle" },
    },
  }
end

return { setup = setup }
```

Press `:p` to toggle preview mode.

Closes: https://github.com/sayanarijit/xplr/issues/205
2021-06-06 12:29:08 +05:30
Arijit Basu
2962a8d52d Further improve the API.
This improves the compatibility and adds the ability to introduce
non-breaking changes by using a builder pattern.

Example:

```rust
fn main() {
    match xplr::runner(None).and_then(|a| a.run()) {
        Ok(Some(out)) => print!("{}", out),
        Ok(None) => {}
        Err(err) => {
            if !err.to_string().is_empty() {
                eprintln!("error: {}", err);
            };

            std::process::exit(1);
        }
    }
}
```
2021-06-06 10:59:48 +05:30
Arijit Basu
fd3e8a5a9f
fix discord link 2021-06-05 21:33:11 +05:30
Arijit Basu
fabcc8e865 Implement CLI arguments
Going with custom CLI parsing for minimalism and flexibility.

Closes: https://github.com/sayanarijit/xplr/issues/228
2021-06-05 13:11:54 +05:30