summaryrefslogtreecommitdiffstats
path: root/src/ui
AgeCommit message (Collapse)Author
2022-10-20Add linemode feature and first simple linemodes (#206)DLFW
This adds the basic ability to change the representation of files in the TUI detailed dir list by letting the user choose a certain "linemode". As of now, there are only three simple linemodes, all showing the filename on the left side and a preceding symlink indicator in the beginning of the right label as usual. The "size" linemode shows the right label as it has been up to now. The "mtime" linemode shows the mtime of the file or directory. The "sizemtime" linemodes combines both meta-data. The user can change the linemode like so: ``` :linemode [size|mtime|sizemtime] ``` Default keybindings have been added: ``ms`` for *size*, ``mm`` for *mtime*, and ``mM`` for *sizemtime*. The selected linemode is specific for each tab. A new tab always starts with the *size* linemode. Possible enhancements: * Move the code for factoring a label out of the ``tui_dirlist_detailed`` module to some UI-independent module * Add a configuration option for the default linemode for new tabs * Add further simple linemodes * Generic support for linemodes with only one “full line label” * Add support for custom linemodes where a label is constructed by an external script
2022-09-17fix bug when HSplit view caused Joshuto to crash (#203)Vinegret43
2022-09-05add numbered_command to default keymapJeff Zhao
2022-09-05move border rendering out of folder viewJeff Zhao
2022-09-04show how many files are selected in the footerJeff Zhao
2022-09-03add symlink relativeJeff Zhao
2022-08-31move numbered_command into command that can be invokedJeff Zhao
This fixes the issue where `numbered_command` conflicts with switch_tab_index - side: change how tabs are rendered for easier visualization
2022-08-31rework previews to have loading state as wellJeff Zhao
2022-08-31cargo clippyJeff Zhao
2022-08-31more fine grain error handling for previewing directoriesJeff Zhao
2022-08-31use hashmap and uuid to store tabs (#194)Jeff Zhao
This is preliminary changes in order to track preview threads and progress. The current setup is we just kick off a new thread to load the given directory whenever we see the directory content does not exist in history. We don't track these threads or which tab these requests came from. When the result is returned, we just assign it to the current tab, instead of the tab that actually initiated the request. By adding uuid, we can now track which tab requested the preview and assign it accordingly. This will also allow us to track the status of the preview, so we can display to the user a loading state, when a directory is taking longer than usual to load. This will also solve the problem of kicking off multiple threads to read the same directory for the same tab. Now these threads can be stored and tracked. - side: fix reload not honouring tab sort options - use tab specific options whenever we need to reload stuff
2022-08-30Add "Visual-Mode" (#192)DLFW
* Add "Visual-Mode" This adds a "visual-mode" file selection feature where a range-selection follows the file-cursor. Description of usage is added to the docs. Also, the "normal" and the new "visual-mode-selection" are now preserved when a `DirList` is reloaded. Wrap-up of changes: * Add command `toggle_visual`, mapped to `V` * Add command `escape`, mapped to `ESCAPE` * Add style `[visual_mode_selection]` for file entries which are "temporarily" selected by visual-mode * For `JoshutoDirEntry`, the attribute `selected` has been renamed to `permanent_selected`, and a second selection-attribute `visual_mode_selected` has been added. "Setters" and "getters" have been adapted/added accordingly. The former "getter" for the `selecetd` attribute still exists and returns `True` for an entry which is "permanant selected" _or_ "visual-mode selected". So any higher logic which acts on selected files does not need to care about "how" and entry is selected. * Each `JoshutoDirList` has an optional index of the file where visual-mode has been entered and re-calculates the "visual-mode selecetd" status for each entry any time the cursor-index changes. * The footer has been extended so it shows a "VIS" marker when the user is in visual-mode. This implementation of visual-mode is a bit different from the ranger one, where the visual-selection is turned into a "normal selection" when a command (like `copy-files`) is issued. This implementation keeps both selections separate until the user toggles back to "normal mode". Only then the visual-selection is taken over to the "normal selection". The user also can withdraw the visual-selection with `escape`. The `escape` command may be used also for other "reset"-actions in the future. * fix syntax for Rust stable * cargo clippy
2022-08-01add `symlink_files` commandJeff Zhao
2022-07-24make ambiguous command message more clearJeff Zhao
2022-07-18asynchronize delete operationJeff Zhao
2022-06-29cargo fmtJeff Zhao
2022-06-29rename TuiBackend to AppBackendJeff Zhao
- fix initial view not correctly offset
2022-06-27fix bulk_rename logic errorJeff Zhao
2022-06-27rename 'vsplit' to 'hsplit'Jeff Zhao
2022-06-22Bump `ansi-to-tui` to `0.6` and remove `tui_old` (#179)Noah Too
`ansi-to-tui` 0.6 uses the latest `tui`
2022-05-30fix some clippyJeff Zhao
2022-05-26add vsplit viewJeff Zhao
2022-05-26split up keymaps into different modesJeff Zhao
2022-05-14add multiple tui dependenciesJeff Zhao
- this should fix build
2022-05-04cargo fmtJeff Zhao
2022-05-04move input.rs to process_event.rsJeff Zhao
2022-04-20add H, L and M vim actionsJeff Zhao
2022-04-17code cleanupJeff Zhao
2022-04-10fix file preview showing a blank lineJeff Zhao
2022-04-09selected files now indented like rangerJeff Zhao
2022-04-09fix regular file styling not respecting theme config (#163)Jeff Zhao
- fix color not applying to entire row
2022-03-07fix file previews for no ansi colorsJeff Zhao
2022-03-05version bump 0.9.30.9.3Jeff Zhao
2022-03-05make ansi-to-tui optionalJeff Zhao
2022-02-25Add reversed autocompletion (#145)sushi-shi
2022-02-24Fix clippy warnings (#144)sushi-shi
2022-02-24Add console shortcuts (#142)sushi-shi
2022-02-23Add incremental search (#140)sushi-shi
2022-02-23Autocomplete first words as commands (#139)sushi-shi
2022-02-01code cleanup (#135)DLFW
* code cleanup Remove dead code and unused imports around preview features. * Remove unused config option [display]show_preview * Remove config option [preview]preview_images * Remove unused imports * Remove dead code and unused imports
2022-01-09default configuration for joshuto and for themes now read fromJeff Zhao
the default configuration files in repo
2022-01-03Continuous scrolling (#118)DLFW
* Continuous scrolling The scrolling behavior is changed from “paging” to a continuous scrolling. Joshuto keeps a buffer from the cursor to each end of the list, which is configured by `[display] scroll_offset`. If the terminal height is too small to keep the distance, the buffer is set to a value that assures that the cursor is at least as close to the end the user is scrolling towards as to the other end of the visible list. If the window is resized and the cursor jumps out of scope, the viewport is adjusted when changing the index next time. Possible improvements: * Issue a viewport update on terminal geometry change * When scrolling down to the bottom, don't allow an empty section beneath the last entry * Update documentation for scroll_offset * remove unused variable * keep viewport index when replacing dirlist * Don't keep copy of scroll_offset in JoshutoDirList * sanity: remove obsolete parameter
2021-12-27cargo fmtJeff Zhao
2021-12-27fix crash if ansi to tui failsJeff Zhao
2021-12-27only process previews if preview shown and remove scripts are present in configJeff Zhao
2021-12-20remove area recalculationJeff Zhao
2021-12-20refactor image preview via ueberzugJeff Zhao
2021-12-20Add script hooks for image previews (#113)DLFW
This adds two configuration options, `preview_shown_hook_script` and `preview_removed_hook_script` in the preview-section where the user can configure external scripts which are called when a file preview is shown or when the file preview widget disappears, respectively. The `preview_shown_hook_script` gets the path of the file being previwed as first argument and then the x and y coordinate and the width an height of the preview area as second to fifth parameters. To get the geometry information back from the UI rendering process, a new struct `RenderResult` has been introduced which is given as mutable reference to the rendering function. The main-loop then checks for a changed preview and calls the hook scripts. Additionally, documentation has been added how these hooks can be used to implement image previews.
2021-12-15add dynamic number of columns (#111)Vinegret43
column_ratio property can now contain only 2 elements
2021-12-05fix printing line numbersJeff Zhao