Commit Graph
400 Commits
Author SHA1 Message Date
CatsDeservePets 87c994b9de Support btime in sortby and info (#2042)
* Add support for `btime` in `sortby` and `info`

* Update documentation

* Minor design improvements
2025-07-19 13:06:34 +10:00
CatsDeservePets f40c626c4d Additions to visual-mode (#2035)
* Add `visual-unselect` command

* Add `fv` environment variable
2025-07-08 08:46:26 +10:00
CatsDeservePets c2049e05c2 Fix setExpr for visualfmt and documentation (#2033)
* Fix documentation for visual commands

* Fix missing `visualfmt`
2025-07-07 10:17:38 +10:00
CatsDeservePets cb8026d627 Add visual-mode (#2021)
- Add functionality for visually selecting files
- Add keymap for Visual mode, and supporting `nmap` and `vmap` commands
- Add mode column for `maps` command, also add `nmaps` and `vmaps` commands
- Add `visualfmt` option for configuring appearance for the visual selection
- Add `%m/%M` placeholders for displaying the mode
- Add marker indicating the number of visually selected files in the ruler
- Add `visual` as an identifier when exporting `lf_mode`
- Remove experimental `invert-below` command
2025-07-05 11:33:45 +10:00
CatsDeservePets e47600e428 Add sorting by custom column (#2019) 2025-06-26 11:12:58 +10:00
Joe Lim c3b184fc2e Apply addcustomfilter for hidden files (#2014) 2025-06-20 20:04:20 +10:00
CatsDeservePetsandJoe Lim 17971fd66e Add addcustominfo command (#2012)
Co-authored-by: Joe Lim <50560759+joelim-work@users.noreply.github.com>
2025-06-20 18:02:09 +10:00
CatsDeservePets ff0c7f1c96 Add on-load command (#2010) 2025-06-20 17:36:57 +10:00
yarikandyarik ce13438ab4 fix "slice bounds out of range" in cmd-delete-word-back (#1976)
Co-authored-by: yarik <dazzywi@github.com>
2025-05-07 10:46:34 +10:00
Joe Lim 6616c9c119 Restrict mode prefixes for cmd-history (#1971) 2025-04-28 13:36:59 +10:00
KuchteqandMariusz Kuchta 7a89808688 Make sixel output flicker free (#1943)
* Make sixel output flicker free

* Address pr comments

* Lock regions based on sixel dimensions

This fixes issues related to clearing the previous sixel data

* name changes and extra error handeling

* Apply force clearing changes and change log messages

* Delete missleading comment

* check pixel dimensions

* correct cell dimensions checking

* Add force clearing on image update

---------

Co-authored-by: Mariusz Kuchta <mariusz@kuchta.dev>
2025-04-28 12:26:27 +10:00
Joe Lim 1cb9e9d14a Add tty-write command (#1961)
This command offers a synchronized way to write to /dev/tty.
2025-04-13 11:14:00 +10:00
Joe Lim ffe4c97560 Change menu contents to be a string (#1954) 2025-04-07 14:23:25 +10:00
Joe Lim 0e66d02746 Use clear for clearing maps (#1923) 2025-02-23 19:56:50 +11:00
David Pedersen 2a3292560d Apply modernization fixes (#1921) 2025-02-23 17:05:20 +11:00
Joe Lim f9813744f7 Add dircounts to setlocal options (#1920)
* Remove plural from setlocal variable names

* Add `dircounts` for `setlocal`

* Update documentation

* Fix failing test
2025-02-19 10:43:15 +11:00
Joe Lim 7595e05957 Add workaround for equivalent paths for watch option (#1895)
* Add workaround for equivalent paths for watch option

* Add comment

* Simplify path watching
2025-01-30 09:53:50 +11:00
Joe Lim 2095efa661 Various fixes for updating dircounts with watch enabled (#1881)
* Fix file size bug when copying files

* Don't remove existing watches

* Bump fsnotify

* Ignore watching `/dev`
2025-01-15 13:06:00 +11:00
Joe Lim 670343a23f Add on-init hook command (#1838) 2024-11-06 12:12:12 +11:00
David Pedersen 0b51987044 Use new slices/cmp standard lib (#1834) 2024-11-05 00:08:28 +11:00
David Pedersen 0f48f36b0f Small optimizations and cleanups (#1830) 2024-11-04 00:25:05 +11:00
陆离 3f63bc980f Add option to sort base on certain locale. (#1818)
* Add support for localized sorting

* Switch go-locale module; Use collate option for natural sorting

* Doc and error message improvement

* Simplify predicated checking of localized sorting.

* Improve error handling of `set locale` command
2024-11-02 00:12:21 +11:00
yarikandyarik 6cd51210e3 Add option to hide listBinds when pressing keys (#1815)
* add drawbinds option

* rename drawbinds to showbinds and change its place in docs

* minor changes in wording of showbinds option

* fix missing newlines

---------

Co-authored-by: yarik <dazzywi@github.com>
2024-10-22 23:45:48 +11:00
Joe Lim f066df674a Clear error when opening files (#1809) 2024-10-11 10:15:33 +11:00
Oscar Wallberg 1c56620f57 feat: add mode, user and group info parameters (#1799)
* feat: add mode, user and group info parameters

* fix: correct function names

* fix: change mode to perm
2024-09-14 00:25:26 +10:00
Joe Lim ddea7bff1b Remove deprecated ruler option (#1766)
* Remove deprecated `ruler` option

* Remove unused variable
2024-07-08 10:09:13 +10:00
Joe Lim e9faf966a0 Replace hidecursorinactive with hook commands (#1763)
* Replace `hidecursorinactive` with hook commands

* Remove `focusreport` setting
2024-07-01 12:17:22 +10:00
Joe Lim 67038762cc Invalidate cache for recreated files (#1756)
* Invalidate cache for recreated files

* Sanity check for file updates

* Prevent load when watching

* Revert "Prevent load when watching"

This reverts commit 4cf4629a87.

* Load is redundant when watch is enabled
2024-06-23 10:17:21 +10:00
Joe Lim e350e0b735 Use fsnotify for watching file updates (#1667)
* Add watch option

* Implement directory changes

* Implement file changes

* Fix for dircounts

* Remove test code

* fix dircounts

* Set watches on cd instead of select

* Set watches on startup too

* Watch newly created directories

* Add chmod events

* Avoid using multiple threads

Seems to cause issues if there are multiple threads and each one of them
is loading the same new file, in which case there is a race condition.

* Reduce logic when updating files

* Throttle write updates

* Use timer instead of ticker

* Fix file write out-of-band timing issue

* Fix cursor when renaming

* Prevent file showing at bottom during rename

* Watch new directory when created

* Revert "Watch new directory when created"

This reverts commit 6856804313.

* Reapply "Watch new directory when created"

This reverts commit 1c29f34981.

* Try batching renew updates

* Big rewrite

* Reload individual directories

* Change delay to 100 milliseconds

* Use separate goroutine for loading files/dirs

* Fix filter resetting

* Add documentation
2024-06-22 16:29:05 +10:00
Joe Lim 8d7b192340 Prevent image preview flicker when deleting files (#1691) 2024-06-17 19:19:10 +10:00
Joe Lim ce12116418 Run on-quit when terminal closes (#1681) 2024-04-07 15:47:49 +02:00
David Pedersen 63815aaa75 Move get file extension logic to util (#1670)
* Move get file extension logic to util

* Update TestGetFileExtension to use fake file

* Add more test cases to TestGetFileExtension
2024-04-07 15:38:32 +02:00
J-KappesandGökçehan Kara 647fa469fb Rounded Corners (#1653)
* add option to draw outer corners rounded

* gofmt

---------

Co-authored-by: Gökçehan Kara <gokcehankara@gmail.com>
2024-04-07 15:36:54 +02:00
Catalin Ancutei f507b618c9 Added globfilter command (#1650)
* Added globfilter command

* Kept the alphabetical order and applied other sugestions

* Used pandoc to update docs
2024-04-07 15:36:17 +02:00
Joe Lim 6e6682fc1f Enable focus reporting only for hidecursorinactive (#1676) 2024-04-07 15:17:23 +02:00
David Pedersen 702d67575e Ignore extension when renaming directory (#1664) 2024-03-31 21:19:08 +02:00
Joe Lim d2136df538 Clear cached sixels after horizontal resize (#1629) 2024-03-10 13:08:38 +11:00
Joe Lim ac32468629 Fix tilde expansion when using setlocal (#1596) 2024-02-12 10:13:13 +11:00
Joe Lim 8374080815 Refactor eval code (#1591)
* 1

* globsearch

* hidden

* some more options

* ignorecase and ignoredia

* fix ignorecase/ignoredia

turns out position and loadfile are required here too since the list of
files can change (similar to hidden option)

* incfilter/incsearch

* mouse

* some more options

* preview

* remaining bool options

* fix more options that can change list of files

* Add applyLocalBoolOpt

* Use applyLocalBoolOpt

* Add position and loadfile fixes
2024-02-05 10:29:19 +11:00
Joe Lim b401318046 Implement sort options as separate variables (#1577) 2024-01-18 11:15:06 +11:00
Joe Lim 6af25565d4 Simplify eval for tempmarks option (#1571) 2024-01-13 13:40:02 +01:00
Joe Lim f8399eb6e0 Allow customization for cut/copy/select colors (#1540)
* Allow customization for cut/copy/select colors

* Add documentation
2024-01-01 06:35:54 +11:00
Joe Lim 27cbf9403c Reload file info after mark-save/mark-remove (#1544) 2023-12-26 15:58:33 +01:00
Joe Lim 12ce649681 Improve refreshing of file statinfo (#1536) 2023-12-26 15:56:20 +01:00
Michael GalloandJoe Lim e1ab72516d sortMethod simplification. (#1535)
* made sortMethod a string enum to reduce comparisons and repetition

* main uses sortmethod directly instead of converting it into a string

* updated sortmethod validity check to no longer require slices package

* Update opts.go

Co-authored-by: Joe Lim <50560759+joelim-work@users.noreply.github.com>

---------

Co-authored-by: Joe Lim <50560759+joelim-work@users.noreply.github.com>
2023-12-26 15:55:42 +01:00
Christian Zangl 075caac3a9 Add hidecursorinactive option to indicate status when terminal loses focus (#965)
* Enable focus events through configuration by using focus (option) and on-ui-enter/on-ui-exit events.

* Revert doc

This reverts commit 77f113639f.

* Revert rune evt

This reverts commit 77f113639f.

* hidecursorinactive with tcell

* cleanup

* cleanup
2023-12-26 15:37:11 +01:00
Joe Lim b3cb2dc2b4 Add on-redraw hook command (#1479)
* Add `on-redraw` hook command

* Add documentation
2023-10-30 09:40:24 +11:00
raslop ffc756c5ff Export user-options on change (#1418)
* Export user-options when they are evaluated

If one has an external previewer that uses an lf user-option (e.g.
"preview-mode") and some key-kindings that change this user-option (e.g.
to "hex", "simple", "fancy") and send a "reload" command to lf, then the
expectation after pressing the keys is, that the prewiever is called
with an updated value of the user-option. Though this did not happen
since #1354, as this caused random crashes.

This change exports user-defined options immediately when they are
evaluated.

* Fix: Add explaining comment
2023-09-11 16:17:42 +03:00
Joe Lim 9068801831 Add query server command to expose internal state (#1384)
* Implement recv mechanism

* Implement recv commands

* Add mutex for state data structure

* Use string to store data instead of byte buffer

* Remove runPagerOn function

* Add history command

* Add documentation

* Add default `maps` command

* Add default `cmds` command

* Reduce locking time

* Remove empty line

* Fix documentation for `recv`

* Add comment about `recv` thread

* Change `recv` to `query`

* Fix comment

* test

* Add comment about connection lifetime

* Map `cmaps` by default
2023-09-08 18:52:19 +10:00
Gokcehan 1a1537946c add yanking to 'cmd-delete-word[-back]' commands
cc #1409
2023-09-03 19:59:32 +03:00