Commit Graph

37 Commits

Author SHA1 Message Date
Arijit Basu
b5986c59d6 Fix logs for being written in the pipe
Don't depend on `Refresh`, always write to the pipes.
2021-04-09 08:06:32 +05:30
Arijit Basu
2b0572228d
Draw once
Draw on the terminal only once i.e. when `Refresh`ing.
2021-04-09 07:18:47 +05:30
Arijit Basu
6d0ea06d7b Add pwd watcher
Also optimize the main thread.
2021-04-09 04:19:44 +05:30
Arijit Basu
45a95a792d Clear screen before exit 2021-04-08 07:42:31 +05:30
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.
2021-04-07 19:22:33 +05:30
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
2021-04-07 01:59:02 +05:30
Arijit Basu
53fd92b680 Fix debug formatting 2021-04-06 18:33:59 +05:30
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`.
2021-04-06 18:23:19 +05:30
Arijit Basu
0272284f40
Fix print formatting 2021-04-06 17:40:16 +05:30
Arijit Basu
175699ac63
Expose $XPLR_PIPE_MODE_OUT
Also, add new line character to `$XPLR_PIPE_MODE_OUT` and
`$XPLR_FOCUS_PATH` for consistency.
2021-04-06 07:52:37 +05:30
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.
2021-04-05 20:28:35 +05:30
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`]
2021-04-05 12:51:31 +05:30
Arijit Basu
dba8631911 Add CI/CD gh actions
Mostly stolen from https://github.com/Rigellute/spotify-tui.
2021-04-05 12:32:40 +05:30
Arijit Basu
2432673483
Log error if command fails 2021-04-04 15:18:13 +05:30
Arijit Basu
af8a637030
Logging, testing and other improvements 2021-04-03 11:32:05 +05:30
Arijit Basu
71a23e1f64
Implement native search and filter 2021-04-03 06:49:59 +05:30
Arijit Basu
c0ca596539
Fix create mode, refactor readers, fix init focus 2021-04-02 18:03:56 +05:30
Arijit Basu
3990200232
Anyhow handle errors 2021-04-02 17:11:18 +05:30
Arijit Basu
56d63a2316
Move, Copy, Create, Delete 2021-04-02 16:12:10 +05:30
Arijit Basu
eb6bc6b6be
Minor buggy improvements 2021-04-02 09:28:20 +05:30
Arijit Basu
8a6da63936
Rename selected -> selection 2021-04-02 07:40:51 +05:30
Arijit Basu
b70682ecb5
Fix term resize handler 2021-04-02 05:59:56 +05:30
Arijit Basu
f176655325
Some improvements and cleanup 2021-04-01 19:34:45 +05:30
Arijit Basu
341d11a0f3
Fix pipes config 2021-04-01 16:24:03 +05:30
Arijit Basu
c066201777
Read config from file 2021-04-01 15:28:32 +05:30
Arijit Basu
3572d26b95
Too big of a rewrite 2021-04-01 15:17:24 +05:30
Arijit Basu
53b18ae8f4
Use # instead of ? to debug app 2021-03-14 10:54:58 +05:30
Arijit Basu
d5bfe6630f
Use app.task instead of separate variables 2021-03-13 15:31:25 +05:30
Arijit Basu
669151c70e
Show help menu 2021-03-04 20:12:47 +05:30
Arijit Basu
7beaec1763
Easier key handling 2021-03-04 11:42:32 +05:30
Arijit Basu
8221140756
Refresh after running command 2021-03-03 20:55:01 +05:30
Arijit Basu
044b7860a1
Fixed fzf search added pwd shell option
Now I can finally use it to replace nnn
2021-03-03 00:15:21 +05:30
Arijit Basu
03fffd19e2
Minor fixes 2021-03-02 16:07:02 +05:30
Arijit Basu
df8c03ce2d
Add shell words escaper 2021-03-02 15:35:33 +05:30
Arijit Basu
2e551ce38d
Support for command action 2021-03-02 14:24:43 +05:30
Arijit Basu
41713f9aff
Basically working now. 2021-03-01 21:58:07 +05:30
Arijit Basu
f9c3edee06
Not yet doing what it's supposed to 2021-03-01 16:53:04 +05:30