Commit Graph

116 Commits (7d0605479e59b2ea9a17e114682033ef5d0c5a71)

Author SHA1 Message Date
Arijit Basu 7d0605479e Allow dynamic linking to load Lua modules using C
Also upgrade packages.

Closes: https://github.com/sayanarijit/xplr/issues/309
3 years ago
Arijit Basu f1e75caf89 Remove termion dependency
Termion is only used to get TTY which is simple enough to implement.
3 years ago
Arijit Basu db9c926b0c Update version 3 years ago
Arijit Basu ed65d85568 Remove auto refresh service
Ref: https://github.com/sayanarijit/xplr/issues/10
3 years ago
Arijit Basu 5c6fd1ef63 Update version 3 years ago
Arijit Basu 6a70b568bf Fix FocusPath issue
Fixes: https://github.com/sayanarijit/xplr/issues/249
3 years ago
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
3 years ago
Arijit Basu fabcc8e865 Implement CLI arguments
Going with custom CLI parsing for minimalism and flexibility.

Closes: https://github.com/sayanarijit/xplr/issues/228
3 years ago
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
3 years ago
Arijit Basu 9a22c8b423 Fix pgp publishing attempt 4 3 years ago
Arijit Basu 7e35ff42fc Fix pgp publishing attempt 3 3 years ago
Arijit Basu 6991db8c33 Fix gpg publishing attempt 2 3 years ago
Arijit Basu c5e97d5bae Sign releases with pgp
Closes: https://github.com/sayanarijit/xplr/issues/131
3 years ago
Arijit Basu 36ab821d2c Upgrade dependencies
Closes: https://github.com/sayanarijit/xplr/issues/187
3 years ago
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.
3 years ago
Arijit Basu fc7d205d92 Improve CallLua and CallLuaSilently
Pass a custom table, optimized for convenience and speed.
3 years ago
Arijit Basu 695acf5c1e Inherit node types config
Inherit `node_types` config instead of overwriting it.

Closes: https://github.com/sayanarijit/xplr/issues/200
3 years ago
Arijit Basu 88aedddf53 Fix rustc 1.50 compatibility 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
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 b99fa927bf Get out of beta now 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 f9d13e5e4c Fix initial directory sync issue 3 years ago
Arijit Basu 25a9d03237 Finish porting config.yml to init.lua 3 years ago
Arijit Basu 0a2f2aeda8 Fix version 3 years ago
Arijit Basu 074e0d1250 Replace handlebars with Lua
Replace handlebars with Lua functions by introduction Lua function API.
3 years ago
Arijit Basu f744553a0a Add support for native lua bindings
Ref: https://github.com/sayanarijit/xplr/discussions/146#discussioncomment-741580
3 years ago
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
3 years ago
Arijit Basu ae8a391064 Introduce `PopMode`
This change requires manual `Refresh` after mode switches.
Also, fix the rename operation.
3 years ago
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.
3 years ago
Arijit Basu 9597e78387 Remove unused dev dependencies
For now, we're only using criterion. I hope we bring them back soon with
real purpose.
3 years ago
Arijit Basu b64d6b59a5 Remove dependency notify
Using a whole crate just to watch `$PWD` for the last modification time
was a overkill.
3 years ago
Arijit Basu 50d6edb168 Fix search 3 years ago
Arijit Basu 3e812045e6
Fix release 3 years ago
Arijit Basu 92545f6387 Fix rename breaking UI 3 years ago
Arijit Basu 7c5468cabe Fix exploring and escaping paths
This PR targets 2 pain points.

1. The `Explore` message was async, which caused some unexpected
   behavior. This was fixed by splitting `Explore` into `ExplorePwd`,
   `ExplorePwdAsync` and `ExploreParentsAsync`. `ExploreParentsAsync`
   is similar to the former `Explore`, which is mainly used when loading
   `xplr` for the first time. However, what we'll be using frequently
   are `ExplorePwd` and `ExplorePwdAsync` messages.

2. Files with spaces caused some unexpected behavior. This was fixed by
   escaping the paths properly. This also fixed focusing of a file after
   creating or renaming it.

Anothor breaking change is that `XPLR_PIPE_FOCUS_OUT` has been removed.
`XPLR_FOCUS_PATH` is all we need. So, the rule of thumb is if a variable
contains one liner value, it can be used directly from the env vars.
Variables that can contain multi-line values, will be exposed via the
pipes.

Minor changes are

- Add `switch_mode` mode to the global key binding help menu
- Moved some UI related code from config.rs to ui.rs.
- Fixed compilation issue on `rustc 1.50.0`.
3 years ago
Arijit Basu 52fbaef189 Fix displaying global help menu
Also support toggle selection in search mode.
And use a pager to display logs.
3 years ago
Arijit Basu 9e89c6503d Use key `tab` to select files in search mode
Select files fzf style in search mode, without losing the search input.

Also, make background tasks failsafe and measure ui rendering.
3 years ago
Arijit Basu 38812e733b Improve config inheritance for layout UI
With this commit, users will be able to define the common configuration
as super config and inherit from them in each layout.
3 years ago
Arijit Basu b3e6679b50 Add feature dynamic UI
Now, users can change the UI layout via the `SwitchLayout{Builtin|Custom}`
message, or by using key `ctrl-w`.

There are 3 default layout options -

- default
- no_help
- no_selection
- no_help_no_selection

Also, the initial mode and the initial layout can be specified in the
config.

Closes: https://github.com/sayanarijit/xplr/issues/107
3 years ago
Arijit Basu 0584a43c7c Add SwitchModeBuiltin and SwitchModeCustom
Also, use a better prompt symbol.

Ref: https://github.com/sayanarijit/xplr/issues/107
3 years ago
Arijit Basu 2c7ec47253 Fix `cd` on first focus
Fix issue where running `xplr /path/to/file` doesn't `cd` into the
parent directory.
3 years ago
Arijit Basu 1c967cfef6 Update version 3 years ago
Arijit Basu 36af3e8ced Fix pipes not updating properly
Let's not optimize things until we have tests.
3 years ago
Arijit Basu 4dad10815a Fix support for filenames starting with - (hiphen)
Make it possible to create, delete, copy, move, rename filenames starting
with a - (hiphen).
3 years ago
Arijit Basu 2437fd67cf Fix distorted screen when opening files in GUI
Fixes: https://github.com/sayanarijit/xplr/issues/111
3 years ago
Arijit Basu eca35c73a2 Update version 3 years ago