Commit Graph

118 Commits (main)

Author SHA1 Message Date
Arijit Basu bea0f277bc Add global key bindings that can be overwritten.
- Use `xplr.config.general.global_key_bindings` to define a set of
  key bindings that are available by default in every mode. e.g `esc`
  and `ctrl-c`.
- Remove boilerplate config from `init.lua`.
- Update docs.
2 years ago
Arijit Basu 4c4d3843e9
Avoid using unnecessary prompts
Problem with long paths.
2 years ago
Arijit Basu a2f246f61e
Improve the "duplicate as" prompt 2 years ago
Arijit Basu 27394dd177
Tab completion for "duplicate_as" mode 2 years ago
Arijit Basu 88416d862e
Minor improvement 2 years ago
Arijit Basu 5370cc2e8c Go to path and native auto completion on tab
- BREAKING: Rename mode `create directory` and `create file` to
  `create_directory` and `create_file`.
- Add key binding `gp` to go to a given path from input.
- Add function `fn.builtin.try_complete_path` to auto complete the path
  in input buffer.
- Use `tab` to auto complete path in `rename`, `create_file`,
  `create_directory` and `go_to_path` modes.
- Show different prompts in different modes.

And some cleanup.
2 years ago
Arijit Basu e5576e2990 Fix typo 2 years ago
Arijit Basu 07b2374616
Make the table a little compact 2 years ago
Arijit Basu cb2851875c
Fix mime_essence doc - again 2 years ago
Arijit Basu dc8cb30eb3
Fix mime_essence docs 2 years ago
Arijit Basu cf052d2691
Fix doc 2 years ago
Arijit Basu 6f626d1ba0
Clarify metadata API 2 years ago
Arijit Basu cc5b996db9 Add remove last filter 2 years ago
Arijit Basu d9465f1a57 Display in the table 2 years ago
Arijit Basu 8e1d16b751 Remove merge conflicts 2 years ago
Arijit Basu 37e660e0a6 Improve timestamp support 2 years ago
Shunsuke Mie 626a48cf88 Update init.lua to show a last modification column 2 years ago
Arijit Basu 86f56cc051 Fix search navigation 2 years ago
Arijit Basu 1de737cefa Add regex support and dynamic input prompt
- Add new regex filters
  - `RelativePathDoesMatchRegex`
  - `RelativePathDoesNotMatchRegex`
  - `IRelativePathDoesMatchRegex`
  - `IRelativePathDoesNotMatchRegex`
  - `AbsolutePathDoesMatchRegex`
  - `AbsolutePathDoesNotMatchRegex`
  - `IAbsolutePathDoesMatchRegex`
  - `IAbsolutePathDoesNotMatchRegex`
- Search mode now defaults to regex
- Added new message `SetInputPrompt` to set the input prompt
  dynamically.
2 years ago
Arijit Basu 6c775d72dc
Bold directories 2 years ago
Arijit Basu f6364b5403 Try a new UI 2 years ago
Arijit Basu 583f685627
Minor line gap 2 years ago
Arijit Basu aca6127166
Minor fixes 2 years ago
Arijit Basu 0472bc3e66 Auto generate docs 2 years ago
Arijit Basu 67eca1ecdf
More doc fixes 2 years ago
Arijit Basu 8385b92661
Minor doc improvements 2 years ago
Arijit Basu ca211bb073 Auto generate some API docs from init.lua
This is the beginning of the xplr documentation revolution.

Closes: https://github.com/sayanarijit/xplr/issues/445
2 years ago
Arijit Basu ecc59b1d9d Option to configure wrapping on move
Closes: https://github.com/sayanarijit/xplr/issues/441
2 years ago
Arijit Basu 618ade53ec Document init.lua
Ref: https://github.com/sayanarijit/xplr/issues/445
2 years ago
Arijit Basu e6ea983a8a Add "duplicate as"
Closes https://github.com/sayanarijit/xplr/issues/434
2 years ago
Arijit Basu e2c3251736
Fix focus when creating files in non-$PWD location 2 years ago
Arijit Basu 24bd6d9f00 Merge the pending changes from #429 2 years ago
Arijit Basu 729b51d674 Create parent directories before creating the file 2 years ago
Tom van Dijk 17f3893198
Debug mode
Features:
- Display debug menu on configuration error
- Configure wether xplr should show the debug menu
    (through `debug_on_error`)
- Open logs in editor
- Redirect people to the issues page on Github.
2 years ago
Arijit Basu cdd60eef4c
Format init.lua consistently 3 years ago
Tom van Dijk b1ac4944ab `help_hide_remaps` -> `hide_remaps_in_help_menu` 3 years ago
Tom van Dijk 263eb5943a Introduce `general.help_hide_remaps` config entry. 3 years ago
Arijit Basu b45a553a0c Add more keyboard input handlers
This PR adds 3 more keyboard input handlers:

- on_alphanumeric
- on_character
- on_navigation

Also updates documentation.
3 years ago
Arijit Basu ca6cefb1c1 Use tui-input to handle input buffer
New message: `UpdateInputBufferFromKey` to replace most
`BufferInputFromKey` usage.

This adds more functionalities to the input buffer and reduces
boilerplate code.

This commit also deprecates `config.general.cursor` as the cursor will
be set by the terminal from now.

Repo: https://github.com/sayanarijit/tui-input
3 years ago
Arijit Basu 5e96d48135 Major release 0.15.0 3 years ago
Arijit Basu 5eab3c6033 Support defining custom layout for different modes
Closes: https://github.com/sayanarijit/xplr/issues/335
3 years ago
Arijit Basu e3150798d9 Disable recover mode by default
Closes: https://github.com/sayanarijit/xplr/issues/330
3 years ago
Arijit Basu 69d3b3af46 Add focus selection UI
Closes: https://github.com/sayanarijit/xplr/issues/322
3 years ago
Arijit Basu 61657a70c7 Add support for loading extra config files
Use `-C` / `--extra-config` to load Lua files to overwrite the default
or user defined config.

This helps with integration, where integrating xplr with another tool
requires xplr to overwrite some config, without requiring the users to
install an xplr plugin or update the xplr config.

Example:

```bash
    xplr -C one.lua two.lua

    # Or

    xplr -C one.lua -C two.lua
```

> **WARNING:**
>
> Extra config doesn't require specifying the `version`, hence, it's the
> integration author or the user's responsibility to assert
> compatibility using the globally exposed `version` in the extra config
> files, similar to xplr plugins.

Ref: https://github.com/sayanarijit/xplr/issues/316
3 years ago
Arijit Basu 7b2b29b27d Cleanup - Format Lua code 3 years ago
Arijit Basu d29f6aed6d Fix StartFifo and ToggleFifo
Also add `xplr.config.general.start_fifo`.

Closes: https://github.com/sayanarijit/xplr/issues/280
3 years ago
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
3 years ago
Arijit Basu f1ffc551fc Minor addition 3 years ago
Arijit Basu 36ab821d2c Upgrade dependencies
Closes: https://github.com/sayanarijit/xplr/issues/187
3 years ago
Arijit Basu 7496f5bf8f Disable mouse by default and bind `:m` to toggle
- Make mouse disabled by default.
- Add key binding `:m` to toggle mouse.

Closes: https://github.com/sayanarijit/xplr/issues/206
3 years ago
Arijit Basu 7de0811eaf No need to "Refresh" explicitly
Closes: https://github.com/sayanarijit/xplr/issues/207
3 years ago
Arijit Basu 6412856d73 Improve docs 3 years ago
Arijit Basu b4247a7d03 Improve CallLua, mime_essence, permissions
Refs:
- https://github.com/sayanarijit/xplr/issues/187
- https://github.com/sayanarijit/xplr/issues/194
- https://github.com/sayanarijit/xplr/issues/195
3 years ago
Arijit Basu 9b02ef3429 Fix "ctrl-i" key for history navigation
Unfortunately, "ctrl-i" doesn't work unless "tab" i sremapped to the
key.
3 years ago
Maxim Baz eef4d92548 Remove extra spaces 3 years ago
Maxim Baz d51848daf9 Fix typo 3 years ago
Arijit Basu aa7a441751 Make mode visible in input/logs panel
Also, map ":q" to "quit" action.

Ref: https://github.com/sayanarijit/xplr/issues/158
3 years ago
Arijit Basu db669cdcbf Remove "remaps:"
Remaps has been removed to simplify key bindings. With Lua, it's now
possible to remap using basic assignments.

For e.g.

```Lua
xplr.config.modes.builtin.default.key_bindings.on_key["v"] = xplr.config.modes.builtin.default.key_bindings.on_key.space
```

Help menu will auto detect remapped keys and display after removing the
redundant mappings.

Ref: https://github.com/sayanarijit/xplr/discussions/183#discussioncomment-774159
3 years ago
Arijit Basu cb695fcaa7 Add colorful permissions
Ref: https://github.com/sayanarijit/xplr/issues/187
3 years ago
Arijit Basu 91838f88ce Fix symlink handling
- Broken symlink should display without error.
- Display the symlink destination.
- Fix deleting symlinks pointing to a directory.

Fixes: https://github.com/sayanarijit/xplr/issues/185
3 years ago
Arijit Basu 74a0ecb922 Fix icons 3 years ago
Arijit Basu 84a50a8fde Add CallLua and CallLuaSilently
This works:

```lua
xplr.fn.custom.ping = function(app)
  print("What's your name?")
  local name = io.read()
  os.execute('read -p "Hello ' .. name .. ', you are in ' .. app.pwd .. '"')
  return {
    { LogSuccess = "pong" },
  }
end
```

Then it can be called via `CallLua: custom.ping`.
3 years ago
Arijit Basu 25a9d03237 Finish porting config.yml to init.lua 3 years ago
Arijit Basu da1d7742f7 Fully migrate to init.lua
This PR aims to fully migrate `config.yml` to `init.lua`

Also, use `builtin.foo_func` instead of `xplr.fn.builtin.foo_func`.
Similarly, use `custom.foo_func` instead of `xplr.fn.custom.foo_func`.

Closes: https://github.com/sayanarijit/xplr/issues/160
3 years ago
Arijit Basu 0a2f2aeda8 Fix version 3 years ago
Arijit Basu eb06342523 Update version 3 years ago
Arijit Basu d96e620120 Begin porting config.yml to init.lua
This commit begins porting of `config.yml` to `init.lua`.
As of now, it's not be possible to do the complete migration
because of how lua and yaml handles `null`/`nil` value.

So, we will need to completely deprecate `config.yml` in order to do the
complete migration.
3 years ago
Arijit Basu 074e0d1250 Replace handlebars with Lua
Replace handlebars with Lua functions by introduction Lua function API.
3 years ago