Commit Graph

134 Commits

Author SHA1 Message Date
Arijit Basu
061d1b068a Add docs to crate 2021-10-24 15:38:32 +05:30
Arijit Basu
66f5acc482 Fix criterion test 2021-10-24 11:22:50 +05:30
Arijit Basu
3ec870739c Bump version 2021-10-24 10:37:02 +05:30
Arijit Basu
258937c307
Run cargo diet 2021-10-08 16:17:18 +05:30
Arijit Basu
9982a205db Downgrade version for the docs
Upgrade version when just before making a new release, else the doc will
link to invalid release.
2021-10-06 05:40:22 +05:30
Arijit Basu
bec80e98df Improve input reading by eliminating pause
Stop the thread instead of pausing it. This improves the CPU usage and
responsiveness a slightly.
2021-10-05 23:28:32 +05:30
Arijit Basu
5e96d48135 Major release 0.15.0 2021-10-05 16:08:12 +05:30
Arijit Basu
14b14bba42 Let's get a hew home - xplr.dev
Thanks to your continued support we're getting a new homepage https://xplr.dev
2021-09-23 14:49:10 +05:30
Arijit Basu
1b1032d0bd Fix missing config error
Do not report error when config file is missing and it's not specified
via CLI args.
2021-09-02 10:11:14 +05:30
Arijit Basu
7cc8c621ef Update version 2021-08-27 09:20:49 +05:30
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
2021-08-23 11:44:58 +05:30
Arijit Basu
af5a99328f Update version 2021-07-29 23:28:31 +05:30
Arijit Basu
7d0605479e Allow dynamic linking to load Lua modules using C
Also upgrade packages.

Closes: https://github.com/sayanarijit/xplr/issues/309
2021-07-29 21:45:45 +05:30
Arijit Basu
f1e75caf89 Remove termion dependency
Termion is only used to get TTY which is simple enough to implement.
2021-07-29 20:36:12 +05:30
Arijit Basu
e1fb5e02c5
Add paste-rs.xplr to Awesome Plugins
Also, fix the cargo documentation link and delete unused doc page.
2021-07-08 12:11:59 +05:30
Arijit Basu
db9c926b0c Update version 2021-07-05 12:08:53 +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
6a70b568bf Fix FocusPath issue
Fixes: https://github.com/sayanarijit/xplr/issues/249
2021-06-08 23:42:03 +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
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
Arijit Basu
a1a1dee4af Remove --locked
Many crates are outdated. One is even yanked. IMO failing build is
better than running with insecure/bad dependencies.

Ref: https://github.com/sayanarijit/xplr/issues/212#issuecomment-855175144
2021-06-05 09:03:43 +05:30
Arijit Basu
9a22c8b423 Fix pgp publishing attempt 4 2021-06-05 08:31:50 +05:30
Arijit Basu
7e35ff42fc Fix pgp publishing attempt 3 2021-06-05 08:23:03 +05:30
Arijit Basu
6991db8c33 Fix gpg publishing attempt 2 2021-06-05 08:06:42 +05:30
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
36ab821d2c Upgrade dependencies
Closes: https://github.com/sayanarijit/xplr/issues/187
2021-06-04 21:52:25 +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
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
74a0ecb922 Fix icons 2021-05-23 10:16:45 +05:30
Arijit Basu
b99fa927bf Get out of beta now 2021-05-22 23:35:37 +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
f9d13e5e4c Fix initial directory sync issue 2021-05-22 14:46:16 +05:30
Arijit Basu
25a9d03237 Finish porting config.yml to init.lua 2021-05-22 14:25:27 +05:30
Arijit Basu
0a2f2aeda8 Fix version 2021-05-22 01:15:16 +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
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
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
Arijit Basu
ae8a391064 Introduce PopMode
This change requires manual `Refresh` after mode switches.
Also, fix the rename operation.
2021-05-13 13:33:23 +05:30
Arijit Basu
e0f8207900 Improve key bindings
Stay in the current mode when key input is not recognised. It's better
to do nothing than doing something wrong, at least when dealing with
important files and folders.
2021-05-12 23:15:47 +05:30
Arijit Basu
e9680d9abd Optimize release binary size
Also improve the $PWD watcher logic.
2021-05-11 02:16:34 +05:30
Arijit Basu
9597e78387 Remove unused dev dependencies
For now, we're only using criterion. I hope we bring them back soon with
real purpose.
2021-05-11 01:54:22 +05:30
Arijit Basu
b64d6b59a5 Remove dependency notify
Using a whole crate just to watch `$PWD` for the last modification time
was a overkill.
2021-05-11 01:54:22 +05:30