Commit Graph

411 Commits

Author SHA1 Message Date
Arijit Basu
c5e97d5bae Sign releases with pgp
Closes: https://github.com/sayanarijit/xplr/issues/131
2021-06-05 07:42:39 +05:30
Arijit Basu
902f20aa83 Fix focus jumping
Fixes: https://github.com/sayanarijit/xplr/issues/211
2021-06-04 23:02:15 +05:30
Arijit Basu
36ab821d2c Upgrade dependencies
Closes: https://github.com/sayanarijit/xplr/issues/187
2021-06-04 21:52:25 +05:30
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
2021-06-04 19:16:45 +05:30
Arijit Basu
7de0811eaf No need to "Refresh" explicitly
Closes: https://github.com/sayanarijit/xplr/issues/207
2021-06-04 18:12:56 +05:30
Arijit Basu
81854b9323 Use --locked when releasing
Closes: https://github.com/sayanarijit/xplr/issues/212
2021-06-04 17:47:56 +05:30
Arijit Basu
72a86f8e0e Polish xplr library API
Minor improvements to the xplr library API.

Closes: https://github.com/sayanarijit/xplr/issues/213
2021-06-04 17:38:49 +05:30
Arijit Basu
69ac8883ab Check xplr compilation daily
https://github.com/sayanarijit/xplr/issues/208 should never happen
again. This added check will notify me if `xplr` compilation starts
failing.
2021-06-01 19:23:24 +05:30
Arijit Basu
6412856d73 Improve docs 2021-05-28 10:03:22 +05:30
Arijit Basu
b284124022 Optimize rendering speed by serializing less
Serializing to and from Lua value is expensive. Hence, once serialized,
we should reuse the value.
2021-05-28 08:20:24 +05:30
Arijit Basu
fc7d205d92 Improve CallLua and CallLuaSilently
Pass a custom table, optimized for convenience and speed.
2021-05-27 10:35:57 +05:30
Arijit Basu
695acf5c1e Inherit node types config
Inherit `node_types` config instead of overwriting it.

Closes: https://github.com/sayanarijit/xplr/issues/200
2021-05-27 08:51:47 +05:30
Arijit Basu
88aedddf53 Fix rustc 1.50 compatibility 2021-05-25 16:24:37 +05:30
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
2021-05-25 14:52:04 +05:30
Arijit Basu
9b02ef3429 Fix "ctrl-i" key for history navigation
Unfortunately, "ctrl-i" doesn't work unless "tab" i sremapped to the
key.
2021-05-24 16:23:01 +05:30
Maxim Baz
eef4d92548 Remove extra spaces 2021-05-24 15:34:29 +05:30
Maxim Baz
d51848daf9 Fix typo 2021-05-24 15:18:38 +05:30
Arijit Basu
6663f0851a
Update CONTRIBUTING.md 2021-05-24 14:20:10 +05:30
Arijit Basu
aa7a441751 Make mode visible in input/logs panel
Also, map ":q" to "quit" action.

Ref: https://github.com/sayanarijit/xplr/issues/158
2021-05-24 13:09:22 +05:30
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
2021-05-24 12:02:44 +05:30
Arijit Basu
cb695fcaa7 Add colorful permissions
Ref: https://github.com/sayanarijit/xplr/issues/187
2021-05-24 10:26:27 +05:30
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
2021-05-23 20:36:14 +05:30
Arijit Basu
b86be16ee3 Make structs public
Public structs enable automatec documentation.
xplr is not (yet) a library. Even it want to become one, making fields
private is probably not the right way.
2021-05-23 10:16:45 +05:30
Arijit Basu
74a0ecb922 Fix icons 2021-05-23 10:16:45 +05:30
Arijit Basu
a80bf2d683 Final touches for v0.10.0 2021-05-23 07:32:30 +05:30
Arijit Basu
b99fa927bf Get out of beta now 2021-05-22 23:35:37 +05:30
Arijit Basu
bfdb7736b9 Simplify pipe reader
Make pipe readers and call lua behave in a similar way.
2021-05-22 21:08:21 +05:30
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`.
2021-05-22 21:08:21 +05:30
Arijit Basu
cdb3560e12 Read input pipe only once when commands execute
The initial idea was to enable other tools to control `xplr` via the
input pipe. However, so far I didn't feel the need to use this feature.
And even if there is any need, it's much better to implement ad-hoc
services instead of wasting cpu resources.
2021-05-22 19:04:52 +05:30
Arijit Basu
10e874afe7 Fall back to default config when custom config fails
When the custom `init.lua` is corrupt, xplr will fall back to default
configuration, logging the encountered error after load.
2021-05-22 16:17:03 +05:30
Arijit Basu
f9d13e5e4c Fix initial directory sync issue 2021-05-22 14:46:16 +05:30
Arijit Basu
4da481bf5c Cleanup all the YAML overwriting logics 2021-05-22 14:25:27 +05:30
Arijit Basu
25a9d03237 Finish porting config.yml to init.lua 2021-05-22 14:25:27 +05:30
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
2021-05-22 14:25:27 +05:30
Arijit Basu
0a2f2aeda8 Fix version 2021-05-22 01:15:16 +05:30
Arijit Basu
eb06342523 Update version 2021-05-22 01:07:36 +05:30
Arijit Basu
e977aeb7d3 Fix MacOS error directory not empty
With this change, xplr will delete the pipe files when command execution
is over.
2021-05-22 00:54:18 +05:30
Arijit Basu
003e90a7d1 Improve history further 2021-05-21 23:58:15 +05:30
Arijit Basu
97aa2ff8b4 Fix initial focus 2021-05-21 23:58:15 +05:30
Arijit Basu
5b2aee3479 Improve history navigation
Make path history behave like jump list and allow jumping back and
forth in the same directory.
2021-05-21 21:53:50 +05:30
Arijit Basu
5c179a9b70 Add optional mouse handler
Mouse actions will be enabled on devices that support it.
Because sometimes, scrolling with mouse is the laziest way to navigate.
2021-05-21 18:45:17 +05:30
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.
2021-05-21 16:28:06 +05:30
Arijit Basu
074e0d1250 Replace handlebars with Lua
Replace handlebars with Lua functions by introduction Lua function API.
2021-05-21 16:28:06 +05:30
Arijit Basu
85696ded7a
Hide demo to speed to page load 2021-05-19 07:15:10 +05:30
Arijit Basu
79855dba15 Fix CallSilently
Closes: https://github.com/sayanarijit/xplr/issues/163
2021-05-18 22:27:18 +05:30
Arijit Basu
6cc863e6d4 Add send+anyhow support for mlua
Ref: https://github.com/khvzak/mlua/issues/48
2021-05-18 16:26:44 +05:30
Arijit Basu
f744553a0a Add support for native lua bindings
Ref: https://github.com/sayanarijit/xplr/discussions/146#discussioncomment-741580
2021-05-18 15:52:51 +05:30
Arijit Basu
98687515d7
Use editor to open the focus path 2021-05-17 09:06:54 +05:30
Arijit Basu
7eabd3fb7d Fix selecting broken symlink 2021-05-14 23:29:58 +05:30
Arijit Basu
8e98da5004 Add support for un-mapping keys.
Use `remaps: {key: null}` to un-map a key.

Also,
- `gx` will now open only the file under focus.
- `:sx` will open the selected files.

And other minor improvements.

Discussion: https://github.com/sayanarijit/xplr/discussions/146
2021-05-14 23:11:18 +05:30