Skip to content

Commit e300606

Browse files
authored
merge branch dev into master for 0.6.0.dev2 (#159)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added file_one MIME-based detection and improved previews (image/pdf/archive) and deterministic path autocomplete sorting; click-outside dismissal for many modals. * **Bug Fixes** * Prevent redundant directory changes in shell wrappers; clarified notification severity wording; pinned sidebar deduplication and accessibility checks; broader archive handling and extraction improvements. * **Documentation** * Updated changelog, config/schema, plugin docs, project structure, and contributing/PR templates. * **Chores** * Version bumped to v0.6.0.dev2 and dependency/typing/config cleanups. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2 parents af1cec1 + ee8d86e commit e300606

49 files changed

Lines changed: 1130 additions & 1262 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/ISSUE_TEMPLATE/feature-request.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ labels: [feature-request]
44
title: "<title>"
55

66
body:
7-
- type: markdown
8-
attributes:
9-
value: "Make sure you have checked issue #4 before requesting!"
107
- type: textarea
118
id: due-to-bug
129
attributes:

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!--describe your pull request-->
2+
3+
---
4+
5+
by sumbitting this pull request, i agree that
6+
7+
- [ ] i have run `poe check` to check for any style issues
8+
- [ ] i have tested both the dev version (in venv) and the built version (uv build then install) of rovr
9+
- [ ] cache, logs and others were not accidentally added to git's tracking history
10+
- [ ] my commits follow the conventional commits format as much as possible
11+
- [ ] the documentation has been updated wherever necessary

CHANGELOG.md

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,29 @@
1-
# Unreleased
1+
# [v0.6.0.dev2]
2+
3+
## breaking changes
4+
- cd-on-quit: remove match type key 32a389f
5+
6+
## new features
7+
- preview: add support for using file(1) #157
8+
9+
## fixes
10+
- screens: add click to exit modal screen d84e9a8
11+
- finder: use pseudo exclusive worker to prevent error spam c9a7741
12+
- archive: just gamble which archive type it is 7fe26f6
13+
- cli: don't load everything when using certain functions 18558b9
14+
15+
## perf
16+
- icons: use fnmatch instead of using scuffed methods 4c848a1
17+
- preview: use pygments instead of tree-sitter e95350f
18+
19+
## style
20+
- fix errors related to ty alpha 28 ce59c07
21+
22+
## docs
23+
- cd-on-quit: use more robust functions 32a389f
24+
25+
## removed features
26+
- process + screens: remove permission asker modal 8caa4f9
227

328
# [v0.6.0.dev1]
429

@@ -11,7 +36,7 @@
1136
- feat(editor): add config to suspend when opening editor ed605da
1237
- feat(editor): add config to open all files in the editor 8189699
1338
- feat(preview): add pdf preview support with poppler #153
14-
- perf(preview): open image in thread 7b0e2cd
39+
- perf(preview): open image in thread db617a0
1540

1641
# [v0.5.0]
1742

docs/src/content/docs/contributing/how-to-contribute.mdx

Lines changed: 21 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -59,20 +59,23 @@ for feature requests, ensure that you have these at minimum
5959
#### pr checklist
6060

6161
```md
62+
<!--describe your pull request-->
63+
64+
---
65+
6266
by sumbitting this pull request, i agree that
6367

64-
- [ ] i have run `ruff format` to format the code
65-
- [ ] i have tested both the dev version and the built version of rovr
66-
- [ ] cache, logs and others are not accidently added to git's tracking history
67-
- [ ] my commits follow the conventional commits format
68-
- [ ] the documentation has been updated if necessary
68+
- [ ] i have run `poe check` to check for any style issues
69+
- [ ] i have tested both the dev version (in venv) and the built version (uv build then install) of rovr
70+
- [ ] cache, logs and others were not accidentally added to git's tracking history
71+
- [ ] my commits follow the conventional commits format as much as possible
72+
- [ ] the documentation has been updated wherever necessary
6973
```
7074

7175
after making your necessary changes, you can run
7276

7377
```sh
74-
uvx ruff format
75-
uvx ty check . --ignore unresolved-import
78+
$ uv run poe check
7679
```
7780

7881
so that your code follows the defined style guide and is typed properly.
@@ -82,7 +85,7 @@ if you need help with conventional commits, [commitizen](https://github.com/comm
8285
else, you can also run
8386

8487
```sh
85-
uvx --from commitizen cz c
88+
$ uvx --from commitizen cz c
8689
```
8790

8891
### bugs
@@ -92,32 +95,20 @@ bugs can tend to be common, especially with a relatively new application.
9295
<br/>if you want to create a new bug report, ensure that one doesn't already exist in the [list of issues](https://github.com/NSPC911/rovr/issues?q=sort%3Aupdated-desc+is%3Aissue+is%3Aopen)
9396
<br/>if it doesn't exist, follow the format below
9497
```md
95-
### issue description
96-
{describe what happened}
97-
98-
### steps to reproduce
99-
100-
{a step by step instruction}
101-
{or a video with what keys you are pressing visualized}
102-
103-
### what is the expected result
98+
### issue descripton
99+
{describe what happened that resulted in the crash}
104100

105-
{expected result}
101+
### how do you reproduce it?
102+
{a step by step instruction on recreating the error, or a video with what keys you are pressing visualized}
106103

107-
### what actually happened
104+
### what is the expected result of the steps?
105+
{what should have been the expected results?}
108106

109-
{actual result}
110-
111-
### (opt) how this could be fixed
112-
113-
{a rough way of how this could be fixed}
114-
{this can be left out}
115-
116-
### (opt) additional screenshots
117-
118-
{more screenshots to the issue}
119-
{this can be left out if you have a video attached}
107+
### what actually happened after doing the steps?
108+
{show what actually happened after doing the steps. preferrably, paste the exception if the app had crashed.}
120109

110+
### how can this be fixed?
111+
{how do you think this bug can be fixed?}
121112
```
122113

123114
#### want to fix an issue?
@@ -128,4 +119,3 @@ yeah sure go ahead, the pr format is roughly similar to that of [feature additio
128119
### feature request
129120
feature requests can be done in the [discussions tab](https://github.com/NSPC911/rovr/discussions). a new request can be opened with the `Ideas` template.
130121
<br/>you may also choose to mention it in the discord server. we might take a look at it either ways.
131-
```

docs/src/content/docs/contributing/project-structure.mdx

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ the current file structure seperates each section in each folder
1313
- src/rovr
1414
- app.py houses the main application
1515
- py.typed
16-
- search_container.py search bar in pinned folders and file list
1716
- style.tcss default style
1817
</FileTree>
1918

@@ -28,6 +27,7 @@ the current file structure seperates each section in each folder
2827
- new_item_button.py create new item
2928
- paste_button.py paste from rovr's clipboard into cwd
3029
- rename_item_button.py rename selected **item**
30+
- sort_order.py changes sort order
3131
- unzip_button.py unzip selected **item**
3232
- zip_button.py zip selected items
3333
</FileTree>
@@ -44,11 +44,20 @@ the current file structure seperates each section in each folder
4444
- theme.py a class for themes
4545
</FileTree>
4646

47+
### components
48+
49+
<FileTree>
50+
- src/rovr/components
51+
- popup_option_list.py for popup selectors
52+
- search_container.py used for fuzzy searching
53+
</FileTree>
54+
4755
### config
4856

4957
<FileTree>
5058
- src/rovr/config
5159
- config.toml default config
60+
- migration.json shows appropriate messages for removed features
5261
- pins.json default pins
5362
- schema.json schema for reference
5463
</FileTree>
@@ -60,6 +69,7 @@ handles the middle elements
6069
<FileTree>
6170
- src/rovr/core
6271
- file_list.py a list that shows files
72+
- file_list_container.py the container for the main file list
6373
- pinned_sidebar.py a list that shows pinned items
6474
- preview_container.py a container that shows the appropriate preview
6575
</FileTree>
@@ -116,16 +126,17 @@ handles the modal screens used
116126

117127
<FileTree>
118128
- src/rovr/screens
129+
- _tester.py screen tester, not used at all
119130
- common_file_name_do_what.py when a conflicting file exists
120131
- delete_files.py when you want to delete files
121132
- dismissable.py dismissable modal, for notices
122-
- give_permission.py raise permission when you get permission errored
133+
- file_in_use.py shown when trying to delete a file that is being used
134+
- file_search.py used for integration with fd
123135
- input.py modal input, also supporting path input
124136
- keybinds.py show all keybindings
125137
- way_too_small.py screen shown when window is too small
126138
- yes_or_no.py simple yes or no prompt
127139
- zd_to_directory.py zoxide integration
128-
- _tester.py screen tester, not used at all
129140
</FileTree>
130141

131142
### variables

docs/src/content/docs/features/cd-on-quit.mdx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,31 +26,31 @@ You can create wrapper functions in your shell config for convenience:
2626
<Tabs>
2727
<TabItem label="bash/zsh">
2828
<Code
29-
code={`rovr () {\n local cwd_file=$(mktemp -t rovr_cwd.XXXXXX)\n command rovr --cwd-file "$cwd_file" "$@"\n if [ -f "$cwd_file" ]; then\n cd "$(cat "$cwd_file")"\n rm -f "$cwd_file"\n fi\n}`}
29+
code={`rovr () {\n local cwd_file=$(mktemp -t rovr_cwd.XXXXXX)\n command rovr --cwd-file "$cwd_file" "$@"\n if [ -f "$cwd_file" ]; then\n local new_loc=$(cat "$cwd_file")\n if [ -n "$new_loc" ] && [ "$new_loc" != "$PWD" ]; then\n cd "$new_loc"\n fi\n rm -f "$cwd_file"\n fi\n}`}
3030
lang="bash"
3131
frame="code"
3232
title=".bashrc / .zshrc"
3333
/>
3434
</TabItem>
3535
<TabItem label="fish">
3636
<Code
37-
code={`function rovr\n set cwd_file (mktemp -t rovr_cwd.XXXXXX)\n command rovr --cwd-file "$cwd_file" $argv\n if test -f "$cwd_file"\n cd (cat "$cwd_file")\n rm -f "$cwd_file"\n end\nend`}
37+
code={`function rovr\n set cwd_file (mktemp -t rovr_cwd.XXXXXX)\n command rovr --cwd-file "$cwd_file" $argv\n if test -f "$cwd_file"\n set new_loc (cat "$cwd_file")\n if test -n "$new_loc" -a "$new_loc" != "$PWD"\n cd "$new_loc"\n end\n rm -f "$cwd_file"\n end\nend`}
3838
lang="fish"
3939
frame="code"
4040
title="config.fish"
4141
/>
4242
</TabItem>
4343
<TabItem label="nushell">
4444
<Code
45-
code={`def --env --wrapped rovr [...args: string] {\n let cwd_file = (mktemp -t rovr_cwd.XXXXXX)\n ^rovr --cwd-file $cwd_file ...$args\n if ($cwd_file | path exists) {\n cd ($cwd_file | open | str trim)\n rm $cwd_file\n }\n}`}
45+
code={`def --env --wrapped rovr [...args: string] {\n let cwd_file = (mktemp -t rovr_cwd.XXXXXX)\n ^rovr --cwd-file $cwd_file ...$args\n if ($cwd_file | path exists) {\n let new_path = ($cwd_file | open | str trim)\n if ($new_path != "" and $new_path != $env.PWD) {\n cd $new_path\n }\n rm -fp $cwd_file\n }\n}`}
4646
lang="nu"
4747
frame="code"
4848
title="config.nu"
4949
/>
5050
</TabItem>
5151
<TabItem label="powershell">
5252
<Code
53-
code={`function rovr {\n $cwd_file = [System.IO.Path]::GetTempFileName()\n & rovr.exe --cwd-file $cwd_file $args\n if (Test-Path $cwd_file) {\n Set-Location -Path (Get-Content $cwd_file)\n Remove-Item $cwd_file\n }\n}`}
53+
code={`function rovr {\n $cwd_file = New-TemporaryFile\n & rovr.exe --cwd-file $cwd_file $args\n if (Test-Path $cwd_file) {\n $new_loc = Get-Content $cwd_file\n if (-not [String]::IsNullOrEmpty($new_loc) -and $new_loc -ne (Get-Location).Path) {\n Set-Location $new_loc -ErrorAction SilentlyContinue\n }\n Remove-Item $cwd_file\n }\n}`}
5454
lang="powershell"
5555
frame="code"
5656
title="$PROFILE"
@@ -67,7 +67,8 @@ You can create wrapper functions in your shell config for convenience:
6767
</Tabs>
6868

6969
<Aside type="note">
70-
The shell functions above use temporary files for better security while avoiding conflicts.
70+
The shell functions above use temporary files for better security while
71+
avoiding conflicts.
7172
</Aside>
7273

7374
### Additional CLI options
@@ -109,8 +110,10 @@ rm -f "$cwd_file" "$chooser_file"
109110
```
110111

111112
### integrations
113+
112114
as much as it might be tempting, this will not work. i use helix <sub>btw</sub> and just like superfile, it just cannot launch the app. i'm not sure why, but it might be a conflict between terminal buffer areas.
113115
so something like yazi's
116+
114117
```toml
115118
[keys.normal]
116119
C-y = [
@@ -121,4 +124,5 @@ C-y = [
121124
':redraw',
122125
]
123126
```
127+
124128
will not work

docs/src/content/docs/features/plugins.mdx

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,42 @@ uses [poppler](https://poppler.freedesktop.org) to preview PDF files
5959
- **use_pdftocairo:** whether to use pdftocairo instead of pdftoppm (may help performance)
6060
- **threads:** number of threads to use for processing PDF files (default is 1)
6161

62+
### file(1)
63+
64+
uses the [`file`](https://darwinsys.com/file/) command to detect file types by their content (MIME type) instead of relying solely on file extensions. this is useful for files without extensions or with incorrect extensions.
65+
66+
rovr automatically detects `file` in your `PATH`, or you can set the `YAZI_FILE_ONE` or `ROVR_FILE_ONE` (higher priority) environment variables to specify a custom path.
67+
68+
- **enable:** `plugins.file_one.enabled = true`
69+
- **mime_rules:** map MIME type patterns to preview types. supports glob patterns (e.g., `text/*` matches `text/plain`, `text/html`, etc.)
70+
71+
the default mime rules are:
72+
73+
```toml
74+
[plugins.file_one.mime_rules]
75+
"text/*" = "text"
76+
"image/*" = "image"
77+
"application/pdf" = "pdf"
78+
"application/zip" = "archive"
79+
"application/x-tar" = "archive"
80+
"application/gzip" = "archive"
81+
"application/x-bzip2" = "archive"
82+
"application/x-xz" = "archive"
83+
"application/x-rar" = "archive"
84+
"application/x-7z-compressed" = "archive"
85+
"inode/directory" = "folder"
86+
```
87+
88+
valid preview types are: `text`, `image`, `pdf`, `archive`, `folder` (for now)
89+
90+
when enabled, rovr will:
91+
92+
1. try to detect the file's MIME type using `file`
93+
2. match against your configured `mime_rules`
94+
3. fall back to extension-based detection if no rule matches
95+
96+
for binary files that can't be previewed, the MIME type will be displayed alongside the "not UTF-8" message.
97+
6298
---
6399

64100
a plugin system is also under works, stay tuned!

0 commit comments

Comments
 (0)