Commit Graph

46 Commits (55e1a6a0fa53caa6a5dd3647f2255fd9462986b5)

Author SHA1 Message Date
Arijit Basu f247acf626 Fix remap behaviour and help menu
Remapping a key should overwrite default. Also, remapped keys shouldn't
be redundantly visible in help menu.

Also, display log time.
4 years ago
Arijit Basu 080e1686f3 Improve version compatibility
From this version, xplr won't annoy the users to visit the upgrade guide
when there is no need.

Also, users will only get upgrade related notification when it is
there is one.
4 years ago
Arijit Basu 3598be0f19 Improve config defaults
- Rename `custom` field for node metadata to `meta`.
- Move `icon` to `meta.icon`.
- Rename `normal_ui` to `default_ui`.
- Rename `filetypes` to `node_types`.
- Split `modes` into `modes.builtin` and `modes.custom`.
- Add the missing `create file` mode.
- Rename `focused_ui` to `focus_ui`.
- Make `general.table.header` non-nullable.
- Add support for incremental configuration updates.

Ref: https://github.com/sayanarijit/xplr/issues/45
4 years ago
Arijit Basu 6aa3df301e Separate config.yml file from rust files
Also be less aggressive for version compatibility.

Use the following logic:

Knowing that we use `{major}.{minor}.{patch}` versioning,

- Major version mismatch are incompatible. Fail with error, suggesting to
  visit the Upgrade Guide.
- Minor version updates and patch fixes are compatible. Suggest user to
  update the config file version manually. Or visit the Upgrade Guide.

- However, if the config file has greater value for minor version
  than the app, also fail with error. Suggesting the user to visit Upgrade
  Guide. Though in this case, the user will be downgrading.

Ref: https://github.com/sayanarijit/xplr/issues/45
4 years ago
Arijit Basu 2af1b4c70a
Fix exit screen 4 years ago
Arijit Basu 2596c0c4c3 Remove task priority
Since we are now blocking on task inputs, the priority is no longer
required.
4 years ago
Arijit Basu 9f78a1fcff Ability to call commands silently
Some commands doesn't require to capture stdout and stderr.
They can be called without needing to reset the screen.

Add `CallSilently` and `BashExecSilently` to execute those commands
faster.

Also, some optimization.
4 years ago
Arijit Basu b50ce48264
Revert "Optimize the main thread"
This reverts commit 097c9dd8c5.

Queued tasks might create unexpected issues. We need a test suit first.
4 years ago
Arijit Basu 097c9dd8c5 Optimize the main thread 4 years ago
Arijit Basu b5986c59d6 Fix logs for being written in the pipe
Don't depend on `Refresh`, always write to the pipes.
4 years ago
Arijit Basu 2b0572228d
Draw once
Draw on the terminal only once i.e. when `Refresh`ing.
4 years ago
Arijit Basu 6d0ea06d7b Add pwd watcher
Also optimize the main thread.
4 years ago
Arijit Basu 45a95a792d Clear screen before exit 4 years ago
Arijit Basu 57494f8ebf Do not print command outputs to the main screen.
Print all the outputs of xplr commands on the alternate screen. Not on
the real stdout.
4 years ago
Arijit Basu 09abda29a3 Several optimizations
- Write to pipes only when the value changes.
- Sleep when not reading key event or messages.

Fixes: https://github.com/sayanarijit/xplr/issues/10
4 years ago
Arijit Basu 53fd92b680 Fix debug formatting 4 years ago
Arijit Basu 65b7412579 Add XPLR_APP_VERSION and XPLR_CONFIG_VERSION
Since users don't need to update config file version for minor app
releases, we have to differentiate between app and config version.

Also, expose them via `$XPLR_CONFIG_VERSION` and `$XPLR_APP_VERSION`.
4 years ago
Arijit Basu 0272284f40
Fix print formatting 4 years ago
Arijit Basu 175699ac63
Expose `$XPLR_PIPE_MODE_OUT`
Also, add new line character to `$XPLR_PIPE_MODE_OUT` and
`$XPLR_FOCUS_PATH` for consistency.
4 years ago
Arijit Basu 981ead8c36 Fix large env vars breaking the subprocess
Bug:
When you call some command in a directory with a large number of hosts,
xplr will fail setting the environment vars as the command will become
too large to handle.

Fix:
Port the value of multi-line variables from env vars to pipes and set
the name of the pipe as env var instead. And deprecate the variables
that doesn't make much sense.

In other words,

- `$XPLR_APP_YAML` has been removed.
- `$XPLR_RESULT` has been ported to `$XPLR_PIPE_RESULT_OUT`.
- `$XPLR_GLOBAL_HELP_MENU` has been ported to
  `$XPLR_PIPE_GLOBAL_HELP_MENU_OUT`.
- `$XPLR_DIRECTORY_NODES` has been ported to
  `$XPLR_PIPE_DIRECTORY_NODES_OUT`.
- `$XPLR_LOGS` has been ported to `$XPLR_PIPE_LOGS_OUT`.
- `$XPLR_PIPE_RESULT` has been ported to `$XPLR_PIPE_RESULT_OUT`.

Hence, instead of `<<< $VAR`, `< $VAR_PIPE_OUT` should be used.
4 years ago
Arijit Basu 67f2094a4c Autorefresh, BashExec and basename
- Auto `Refresh` every second.
- Add alias `BashExec` to message `Call` with args [`-c`, `bash` ...].

Also, Create alias `BashExec` to message `Call` with arguments [`bash`, `-c`]
4 years ago
Arijit Basu dba8631911 Add CI/CD gh actions
Mostly stolen from https://github.com/Rigellute/spotify-tui.
4 years ago
Arijit Basu 2432673483
Log error if command fails 4 years ago
Arijit Basu af8a637030
Logging, testing and other improvements 4 years ago
Arijit Basu 71a23e1f64
Implement native search and filter 4 years ago
Arijit Basu c0ca596539
Fix create mode, refactor readers, fix init focus 4 years ago
Arijit Basu 3990200232
Anyhow handle errors 4 years ago
Arijit Basu 56d63a2316
Move, Copy, Create, Delete 4 years ago
Arijit Basu eb6bc6b6be
Minor buggy improvements 4 years ago
Arijit Basu 8a6da63936
Rename selected -> selection 4 years ago
Arijit Basu b70682ecb5
Fix term resize handler 4 years ago
Arijit Basu f176655325
Some improvements and cleanup 4 years ago
Arijit Basu 341d11a0f3
Fix pipes config 4 years ago
Arijit Basu c066201777
Read config from file 4 years ago
Arijit Basu 3572d26b95
Too big of a rewrite 4 years ago
Arijit Basu 53b18ae8f4
Use # instead of ? to debug app 4 years ago
Arijit Basu d5bfe6630f
Use app.task instead of separate variables 4 years ago
Arijit Basu 669151c70e
Show help menu 4 years ago
Arijit Basu 7beaec1763
Easier key handling 4 years ago
Arijit Basu 8221140756
Refresh after running command 4 years ago
Arijit Basu 044b7860a1
Fixed fzf search added pwd shell option
Now I can finally use it to replace nnn
4 years ago
Arijit Basu 03fffd19e2
Minor fixes 4 years ago
Arijit Basu df8c03ce2d
Add shell words escaper 4 years ago
Arijit Basu 2e551ce38d
Support for command action 4 years ago
Arijit Basu 41713f9aff
Basically working now. 4 years ago
Arijit Basu f9c3edee06
Not yet doing what it's supposed to 4 years ago