Commit Graph

149 Commits

Author SHA1 Message Date
neeshy
82f03102a5
Add ability to use image previewers (#531)
* Return early on error in nav.preview

* nav.checkReg now returns a boolean instead of calling nav.preview

* Pass width, height, x, and y parameters to preview script

* Check previewer for exit code

If non-zero the preview will be assumed to have side-effects.

* Add the cleaner option

This is called upon selection changes if the previous preview was
volatile. To this end, volatilePreview was added to the nav struct
2020-12-24 16:13:20 +03:00
Gokcehan
9e5d386304 golint 2020-12-19 17:56:27 +03:00
Gokcehan
90b3b166e1 import tcell/v2 from gitlab.com/Provessor/lfp 2020-12-04 23:59:12 +03:00
Gokcehan
ce5c5845e7 use year instead of hh:mm for old files in info
Related #507
2020-11-22 17:18:17 +03:00
Gokcehan
6fa6137124 cleanup
Related #482
2020-10-14 22:03:25 +03:00
2pac
17ed724e67
Completition menu cycling #72 (#482)
* utility modulus function

* ui adapt for tab menu cycle

* refactor(listMatches) for tab menu cycle

* refactor(draw) handle tab menu selection highlight

* refactor(eval) cmd-complete cycle + reset handles

* feat: added backtab counter-cycle in the completition menu

* cleanup

* docs changes

* refactor: make tab cycle own commands

* docs: tab cycle documentation

* bug: the matches list was not complete because index +2 after row end

* refactor(tab cycle): handle the complete menu command print

* refactor(tab cycle): make the cmdTmp varibale mymic cmdAccLeft + check for partial commands

* refactor(tab cycle): fix how to handle the menu completiton from different events

* fix(tab cycle): fix cmd-complete so that it works with new tab cycle commands

* style: changed puprle to reverse

* cleaned up cycle logic + reverted listMatches

* cleaned up eval logic for cycle feat.

* cleanup

Co-authored-by: 2pac <tarasyarema@pm.me>
2020-10-14 19:42:44 +03:00
Gokcehan
228a20ffd1 rename bs to backspace 2020-10-10 17:34:29 +03:00
Alexey Yerin
cf79726d21
feat: add ability to map lone <esc> (#475)
Since d2414f7580 <esc> resets key buffer
but this feature prevents binding lone <esc>
2020-10-02 21:30:31 +03:00
Gokcehan
355075cf75 cleanup 2020-09-13 14:55:17 +03:00
Gokcehan
ec512dfe31 read events in the main loop
Related #445
2020-09-07 18:40:57 +03:00
gotroyb127
f248ce77a1
fixes 'numbers are bold when the filename is bold' (#462)
* fixes 'numbers are bold when the filename is bold'

* do it correctly
2020-09-06 17:52:11 +03:00
Gokcehan
ab6549679b rename backspace/backspace2 to bs/bs2 again
Related #445
2020-09-05 12:56:12 +03:00
Gokcehan
5e9580500c show loading directories with previous file list
Related #414
2020-09-05 12:55:27 +03:00
Gokcehan
ebf3bcc76b resume with a new goroutine instead of busy wait
Related #461
2020-09-05 12:36:31 +03:00
Gokcehan
f1f28018a6 add missing keys for push command
Related #445
2020-09-04 23:59:20 +03:00
Gokcehan
b40ebdcb33 fix regular keys in push commands
Related #445
2020-09-04 21:25:19 +03:00
Gokcehan
4f5b4e6dbf remove manual escape delaying mechanism
Related #459
2020-09-04 18:25:40 +03:00
Gokcehan
4f02cf47c7 use the same input goroutine when ui is resumed
Related #459
2020-09-04 18:07:50 +03:00
Provessor
24f01f4988
Replace termbox-go with tcell (#439)
Fix colour construction issue

This also has a test to mitigate it in the future

Remove `colormode` option

The original issue it was trying to solve is no longer present with
tcell (it being a holdover from `color256` on termbox) so it is not
needed.

retire gitter channel in favor of irc/matrix

Export options as environment variables (#448)

* Export options as environment variables

Any options from gOpts are available via lf_OPTION environment
variables. For now it works only on booleans, integers and strings (no
array support)

* Do not export some of the options

* Add support for arrays and fix numbers

* Fix comments

* Replace 1 and 0 with true and false

* Export hidden,reverse,dirfirst and sortby options

* Fix comments

* Little fix

* Simplify boolean conversion

log readlink errors instead of fail

Related #447 and #374
2020-09-01 15:42:44 +03:00
Gokcehan
d2414f7580 escape key disables key binding lookup
Related #361
2020-07-26 00:24:04 +03:00
Gokcehan
9c891307f3 cleanup 2020-07-20 02:47:33 +03:00
Gokcehan
6d1a840587 handle unicode characters in 'push' command
Related #250
2020-07-20 01:36:22 +03:00
Gokcehan
f8daa60b31 expand '%w' in 'promptfmt' with a trailing slash
Related #421
2020-07-20 00:19:42 +03:00
Alexey Yerin
d0cd181eb6
Ability to customize filename truncating (#417)
* Add truncatechar option

* Add ability to set truncatechar via `set` command

* Add completion for truncatechar option

* Actually use truncatechar option when truncating

* Add truncatechar option to docs
2020-07-18 03:08:25 +03:00
Gokcehan
e7fb56391f remove redundant parameter in ui renew 2020-07-16 23:17:11 +03:00
Gokcehan
3e36500901 check modtime/sorting again when dirs are updated
Related #338
2020-07-16 23:13:40 +03:00
Gokcehan
c937dab9e9 remove hidden cursor movement
Related #22 and #381
2020-07-04 01:21:07 +03:00
Gokcehan
1119ba0d25 expand tab characters to spaces 2020-07-04 01:08:35 +03:00
gotroyb127
4d3e1cfd6e
added a count field to listExpr and toggle now ignores count (#394) 2020-07-03 18:29:55 +03:00
wedens
8933a3eafe
show symlink destination (#374)
Co-authored-by: wedens <kirill.wedens@gmail.com>
2020-06-09 02:38:46 +03:00
gotroyb127
41e0bb32cd
fix tilde expansion and numbering (#373)
* Fixed issue #346 and changed the format of numbers when both relativenumber and number are set.

* Fixed issue #349 (incorrect replacement of '~' with user's home direcotry).

* Changed where appropriate so that tilde replacements happens correctly.

* Added a function to replace tilde with user's home directory, only when it should.

* Renamed ReplaceTilde to replaceTilde so that it won't get exported and removed some ';' at the end of some lines.
2020-06-07 20:53:25 +03:00
Gokcehan
933b49d095 cleanup 2020-04-13 18:24:15 +03:00
Doron Behar
6693709f36
Use doronbehar's fork of termbox (#311) 2020-03-20 21:59:30 +03:00
Vladimir Bauer
17949fc25a
case 1 is unnecessary because there is the same logic in default (#293) 2020-03-18 23:44:10 +03:00
Gokcehan
d5f989f373 show progress for delete operation
Related #238
2019-12-02 19:50:13 +03:00
Gokcehan
c43026d1e2 cleanup 2019-10-07 22:31:51 +03:00
arolle
7b89126e04 Correct abbreviation of the home directory (#241)
The path has to start with the home directory to be shortened to `~`.
Previously a user named `user` would see `/media/backup~/files` when
browsing `/media/backup/home/user/files`.
2019-10-07 22:30:52 +03:00
Kennedy Mwenja
9515bd73d0 Sort By Access Time and Change Time (#226)
- Add access time and change time as sort by types. This is
  powered by github.com/djherbis/times.
- Fall back to modification time if access time and change time
  cannot be determined.
- Add `sa` and `sc` as default bindings for sort by access time and
  sort by change time respectively.
- Add access time and change time to info types allowing them to be
  displayed by the file list in the ui
2019-09-18 21:52:30 +03:00
Daniel Martí
50ac367626 fix ineffective breaks, remove unused parameters (#210)
While at it, simplify a few pieces of code.
2019-08-12 14:52:27 +03:00
Juris Arturs Majors
27861f06e2 correct message for folders that lf has no permission for (#203) 2019-07-20 15:44:20 +03:00
Gokcehan
db224f04fe add icon support
Related #158 and #164
2019-06-28 18:08:11 +03:00
Gokcehan
791b704257 add 'errorfmt' option to format error messages
Related #154
2019-03-27 22:07:41 +03:00
Gokcehan
9656553974 cleanup 2019-03-03 22:29:34 +03:00
Gokcehan
808404978e show move progress in the ruler 2019-03-01 17:44:50 +03:00
Gokcehan
f44ec4f5bd use reverse attribute for preview messages 2019-03-01 03:51:14 +03:00
Gokcehan
193285a65d add 'echomsg' and 'echoerr' commands for logging 2019-02-28 21:58:14 +03:00
Gokcehan
6ec2924b6b show copy progress in the ruler 2019-02-28 21:04:38 +03:00
Gokcehan
ec5fac3274 cleanup 2019-01-31 21:51:17 +03:00
Tomáš Martiček
90f0339fa9 Implemented line numbers (#133) 2019-01-27 17:31:29 +03:00
Gokcehan
d8b9bab3ea add 'color256' option to control color mode
Related #104
2019-01-08 22:47:41 +03:00