- Replace unar dependency with 7zip

- Add ImageMagick as a suggested dependency
- Add chafa as a suggested dependency

- Update to version 0.3.0:
  * chore: bump version to 0.3 (#1374)
  * refactor(nix): cleanup and switch to `nixfmt-rfc-style` (#1376)
  * feat(nix): set `VERGEN_*` build env vars (#1375)
  * fix(nix): add `outputHashes` for `notify` git dependency (#1373)
  * feat: new `extract` builtin plugin for archive extracting (#1321)
  * fix: adapt to a wider range of terminal cursor management through DECSET and DECRQM requests again
  * fix: can't rewatch a directory that has been deleted once before (#1335)
  * fix: adapt to a wider range of terminal cursor management through `DECSET` and `DECRQM` requests (#1346)
  * fix: help menu multi-line text rendering (#1347)
  * feat: make `F1` also show the help menu (#1336)
  * fix: wrong directory loading optimization condition (#1331)
  * feat: add support for `%@` argument extension on Windows to align with Unix platforms (#1319)
  * feat: add Winget publishes to CI/CD (#1299)
  * refactor: fix Clippy warnings (#1312)
  * fix: add `use-dev-tty` to fix piping to Yazi on macOS (#1317)
  * fix: destroy term before stopping signals (#1310)
  * refactor: reimplement the signal system (#1307)
  * feat: allow setting `YAZI_ID` as a command line argument (#1305)
  * feat: help users migrate shell key bindings to v0.3 (#1304)
  * feat: add `children_add` and `children_remove` methods to the `Header` component as well (#1297)
  * feat: add `ctime` linemode (#1295)
  * feat: support displaying files with inaccessible metadata (#1275)
  * feat: add `random` option to the `sort` command (#1291)
  * feat: make UI extensions easier (#1257)
  * feat: new command `hardlink` (#1268)

OBS-URL: https://build.opensuse.org/package/show/utilities/yazi?expand=0&rev=31
This commit is contained in:
xtexChooser 2024-08-01 10:26:32 +00:00 committed by Git OBS Bridge
commit b0010a2be1
10 changed files with 521 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

11
0001-use-system-jit.patch Normal file
View File

@ -0,0 +1,11 @@
--- yazi-plugin/Cargo.toml
+++ yazi-plugin/Cargo.toml
@@ -21,7 +21,7 @@ ansi-to-tui = "3.1.0"
anyhow = "1.0.82"
futures = "0.3.30"
md-5 = "0.10.6"
-mlua = { version = "0.9.7", features = [ "lua54", "vendored", "serialize", "macros", "async" ] }
+mlua = { version = "0.9.7", features = [ "lua54", "serialize", "macros", "async" ] }
parking_lot = "0.12.1"
ratatui = "=0.26.1"
serde = "1.0.198"

23
_service Normal file
View File

@ -0,0 +1,23 @@
<services>
<service mode="manual" name="obs_scm">
<param name="url">https://github.com/sxyazi/yazi.git</param>
<param name="versionformat">@PARENT_TAG@</param>
<param name="scm">git</param>
<param name="revision">v0.3.0</param>
<param name="match-tag">v*</param>
<param name="versionrewrite-pattern">v(\d+\.\d+\.\d+)</param>
<param name="versionrewrite-replacement">\1</param>
<param name="changesgenerate">enable</param>
</service>
<service mode="buildtime" name="tar" />
<service mode="buildtime" name="recompress">
<param name="file">*.tar</param>
<param name="compression">zst</param>
</service>
<service mode="manual" name="set_version" />
<service mode="manual" name="cargo_vendor">
<param name="src">yazi</param>
<param name="compression">zst</param>
<param name="update">false</param>
</service>
</services>

4
_servicedata Normal file
View File

@ -0,0 +1,4 @@
<servicedata>
<service name="tar_scm">
<param name="url">https://github.com/sxyazi/yazi.git</param>
<param name="changesrevision">7a380c2f0fdaec87992836e21dc8b6cd251af980</param></service></servicedata>

3
vendor.tar.zst Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ed7f002de65250934ab1d8e381229491840e7e11aa1f97d4504b9cead08d0bd0
size 43523428

3
yazi-0.2.5.obscpio Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d07b3249169d7686d58cc60f4eab5e0097ca67f105ba30d11891778611c3cce6
size 1358860

325
yazi.changes Normal file
View File

@ -0,0 +1,325 @@
-------------------------------------------------------------------
Thu Aug 1 10:00:14 UTC 2024 - xtexChooser <xtexchooser@duck.com>
- Replace unar dependency with 7zip
- Add ImageMagick as a suggested dependency
- Add chafa as a suggested dependency
-------------------------------------------------------------------
Thu Aug 01 08:55:18 UTC 2024 - xtexchooser@duck.com
- Update to version 0.3.0:
* chore: bump version to 0.3 (#1374)
* refactor(nix): cleanup and switch to `nixfmt-rfc-style` (#1376)
* feat(nix): set `VERGEN_*` build env vars (#1375)
* fix(nix): add `outputHashes` for `notify` git dependency (#1373)
* feat: new `extract` builtin plugin for archive extracting (#1321)
* fix: adapt to a wider range of terminal cursor management through DECSET and DECRQM requests again
* fix: can't rewatch a directory that has been deleted once before (#1335)
* fix: adapt to a wider range of terminal cursor management through `DECSET` and `DECRQM` requests (#1346)
* fix: help menu multi-line text rendering (#1347)
* feat: make `F1` also show the help menu (#1336)
* fix: wrong directory loading optimization condition (#1331)
* feat: add support for `%@` argument extension on Windows to align with Unix platforms (#1319)
* feat: add Winget publishes to CI/CD (#1299)
* refactor: fix Clippy warnings (#1312)
* fix: add `use-dev-tty` to fix piping to Yazi on macOS (#1317)
* fix: destroy term before stopping signals (#1310)
* refactor: reimplement the signal system (#1307)
* feat: allow setting `YAZI_ID` as a command line argument (#1305)
* feat: help users migrate shell key bindings to v0.3 (#1304)
* feat: add `children_add` and `children_remove` methods to the `Header` component as well (#1297)
* feat: add `ctime` linemode (#1295)
* feat: support displaying files with inaccessible metadata (#1275)
* feat: add `random` option to the `sort` command (#1291)
* feat: make UI extensions easier (#1257)
* feat: new command `hardlink` (#1268)
* feat: add `nlink` property to the `Cha` plugin API (#1279)
* fix: build `jemalloc` with 64KB pagesize for `linux/arm64` (#1270)
* feat: ownership linemode (#1238)
* feat: support AVIF image preview (#1249)
* feat: simplify keybindings (#1241)
* feat: support right-click to open files (#1232)
* feat: add `--hovered` option to the `rename` and `remove` commands (#1227)
* perf!: reimplement and significantly speed up archive previewing (#1220)
* fix: `magick` plugin not working properly (#1213)
* fix: ueberzug image adapter should respect the user's `max_width` and `max_height` settings (#1200)
* fix: suppress warnings for different name representations of the same file in the case-insensitive file system when renaming (#1185)
* feat: support `x-ndjson` mime-type for JSON files (#1190)
* fix: accommodate all `hover` events for DDS (#1187)
* feat!: include the `sender` ID in static messages (#1172)
* feat: include file filter state in the header (#1182)
* fix: file watcher didn't handle realname resolution used for case-insensitive file systems correctly (#1179)
* feat: keep file creation time on macOS and Windows (#1169)
* feat: expose `Finder` API to Lua
* refactor: prefer `FromStr` over `Default` for configuration parsing with side effects
* feat: support `ya sub` subcommand for the Ya CLI (#1004)
* fix: different filenames should be treated as the same file on case-insensitive file systems (#1151)
* refactor: rename crate `yazi-adaptor` to `yazi-adapter`
* feat: support completely disabling mouse with `mouse_events=[]`; add new `cursor_blink` to control cursor style of input components (#1139)
* fix: block `SIGINT` signal from the spawned subprocess (#1131)
* fix: disable error reporting for the kitty graphics protocol
* fix: use kitty old protocol for Konsole
* feat: add some dependency version information to `yazi --debug` (#1112)
* feat: support mouse event (#1038)
* feat!: DDS client-server version check (#1111)
* feat: add `pack --list` subcommand to Ya CLI (#1110)
* refactor!: v0.3 API changes (#1108)
* refactor: rename the domain term `prefetcher` to `fetcher`
* fix: `match_mime()` should return true if pattern is "*"
* feat: support case insensitive special keys in keymappings (#1082)
* fix: Sixel support from certain `st` forks cannot be detected (#1094)
* feat!: transliteration option for natural sorting (#1053)
* feat!: redesign icons (#1086)
* feat: `cd` path auto-completion supports `~` expansion (#1081)
* fix: glob pattern for zip files
* fix: remove the default keybinding for going to the temporary directory (#1073)
* feat: support Super/Command/Windows key notation `D-` (#1069)
* fix: cursor gets out of sync occasionally at image previewing through IIP under tmux (#1070)
* fix: inconsistent tab width in unassociated text files (#1068)
* feat: Chafa integration (#1066)
* fix: ePUB file mime-type matching for the opener rule (#1063)
* feat: prefetcher (#1061)
* feat: add a `next` property to the preloader rules to allow running multiple preloaders (#1058)
* docs: add `CONTRIBUTING.md` (#1052)
* feat: SVG, HEIC, and JPEG XL preview support (#1050)
* feat: font preview (#1048)
* fix: remove `ignore` options from `rg` and `fd` search (#1043)
* feat: use `Ctrl-c` instead of `Ctrl-q` as the universal close key for all components (#1047)
* refactor: eliminate `exec` (#1045)
* ci: fix cargo unit tests execution (#1041)
* ci: consistently enforce Lua coding style (#1029)
* feat: support `stdin` and pipe for `Child` API (#1033)
* fix: recognize `TERM=rxvt-unicode-256color` (#1027)
* feat: add new `debounce` option to `ya.input()` API (#1025)
* fix: broaden file watcher event types to accommodate permission changes on certain platforms (#1024)
* fix: correct wasm target condition (#1018)
* feat: new `--args` parameter for `fd` an `rg` search (#1013)
* feat: `ya pack` displays help if no arguments are given (#1012)
* feat: package manager (#985)
* feat: add git commit hash to `ya --version` (#1006)
* feat: `yazi --debug` shows `ya` version in its output (#1005)
* feat: support `cargo binstall yazi-fm` and `cargo binstall yazi-cli` (#1003)
* fix: notification title width does not include the width of the icon (#1000)
* feat: close confirmation prompts and exit automatically when the ongoing task gone (#997)
* feat: add `--force-window` option to mpv (#998)
* fix: temporarily disable the file creation time until Rust v1.78.0 becomes popular (#991)
* feat: re-enable the file `created` attribute (#987)
* feat: add `ya.clipboard()` Lua API (#980)
* feat: add more rules to `[filetype]` and `[icon]` (#966)
* feat: detect terminal type in tmux with CSI sequence in passthrough mode (#977)
* fix: avoiding duplicate candidates in the `which` component (#975)
* fix: improve accessibility by avoiding hex color code for white (#968)
* feat: add `*.opus` file icon (#967)
* fix: move the DDS socket file out of the cache directory to avoid being affected by `yazi --clear-cache`
* fix: correct the glob pattern for the icons to fit the new matching algorithm (#959)
* feat: support previewing files containing non-UTF-8 characters (#958)
* fix: always create XDG cache directory even if user has set a custom one (#956)
* feat: add new `bulk` event kind to DDS (#937)
* feat: support expanding Windows paths like "D:" that only have a drive letter but no root (#948)
* feat: allow building with the system Lua (#943)
* feat: support `yazi-cli` for Nix flake (#944)
-------------------------------------------------------------------
Fri Apr 26 11:22:00 UTC 2024 - xtexchooser@duck.com
- Update to version 0.2.5:
* chore: bump version to 0.2.5
* feat: new builtin `session.lua` plugin (#940)
* feat: split `ya send` into `ya pub` and `ya pub-static` to make it more ergonomic (#933)
* perf: cache each file's icon to avoid redundant calculations at rendering (#931)
* feat: preserve files' modified at timestamp while copying (#926)
* fix: prevent pasting a directory into itself (#925)
* feat: change status bar percent at 100 to Bot (#930)
* fix: always persist static messages even when there are no remote clients (#928)
* feat: expand the types supported by the event system (#923)
* fix: rollback ratatui to v0.26.1 to avoid panicking (#922)
* feat: allow opening interactively with the `--chosen-file` flag (#920)
* feat: generate autocomplete script for `ya` command (#919)
* feat: allow creating a tab with the startup directory when the `tab_create` command is called without specifying a `path` parameter (#917)
* feat: add a new `ya send` command to allow standalone client processes to communicate with DDS from the command line (#913)
* feat: smart case completion in `cd` paths (#910)
* feat: trigger path completion with both `/` and `\` on Windows (#909)
* perf: switch to `globset` to reduce CPU time spent on matching icons (#908)
* feat: default "Reveal" opener for Linux (#907)
* feat: add loading state to directories (#904)
* feat: when there are no files in the list, add a placeholder message (#900)
* feat: add `YAZI_ID` environment variable (#895)
* feat: add new `move`, `trash`, and `delete` event kinds to DDS (#880)
* fix: file list expansion arguments (`$@`, `$*`) of shell command under opener rules are out of order (#890)
* feat: add new `--orphan` option to the `shell` command (#887)
* feat: re-implement `fzf` as a built-in plugin (#884)
* feat: re-implement `zoxide` as a built-in plugin (#881)
* fix: CJK text rendering issue where the input popup component overlaps with images (#879)
* perf: re-implement file watcher in an async way (#877)
* feat: add `is_exec` and `is_sticky` to `Cha` bindings (#875)
* feat: merge the `sender` and `severity` in the DDS payload into the same field to simplify the protocol (#871)
* fix: a race condition in DDS static messages sent as internal events (#868)
* feat: detect CSI u through `Stderr` to allow using `Stdout` as the carrier of DDS payload without an ANSI sequence response timeout (#867)
* feat: the `cd` event in DDS will now also be triggered when the tab is first created (#861)
* fix: wrong `state` pointed to and ignore plugin/flavor directory creation errors
* feat: add a new `sender` property to the DDS payload (#855)
* feat: readable toml parsing error (#854)
* fix: do not default to passing `self` to `setup` to respect user invocation behavior
* perf: port `require()` and `ya.sync()` to Rust to avoid plugin information initialization process (#853)
* feat: DDS (Data Distribution Service) (#826)
* perf: add `BufWriter` to `Stderr` to avoid frequent system calls and increase rendering frame rate (#849)
* fix: Windows `cmd.exe` not responding to correct CSI sequences due to ConPTY (#845)
* feat: add support for `YAZI_FILE_ONE` to the built-in `file` previewer (#846)
* feat: time-based selection order preservation (#843)
* fix: mime-type for xz archives (#841)
* perf: accelerate kitty graphics protocol encoding by avoiding string reallocation (#837)
* feat: enhance the `ya.dbg()` and `ya.err()` debugging functions (#835)
* fix: disable ANSI colours for the `tracing_subscriber` so that the logs are not polluted with escape codes (#832)
* fix: adjust calculation for number of lines in a notification message (#828)
* feat: add a bunch of new debugging information to `yazi --debug` (#824)
* fix: kill all spawned processes when exiting Yazi (#812)
* feat: fix all dependencies to specific version numbers to allow non-`--locked` builds (#821)
* refactor: switch to `stderr` (#819)
* fix: respond to the `SIGTERM` signal even when Yazi is in the background and has passed control of the terminal to the spawned process (#797)
* fix: wrong type in iterator binding
* refactor: wrap `Opener` with `Cow` to avoid unnecessary memory reallocations when opening files (#805)
* fix: use `BTreeSet` for selected files to maintain order (#799)
-------------------------------------------------------------------
Sat Mar 30 23:12:22 UTC 2024 - xtexChooser <xtexchooser@duck.com>
- Fix ripgrep depends
-------------------------------------------------------------------
Sat Mar 30 08:06:11 UTC 2024 - xtexChooser <xtexchooser@duck.com>
- Lock dependencies from being updated when packaging
Updating deps when vendoring causes build errors
-------------------------------------------------------------------
Sat Mar 23 12:01:07 UTC 2024 - xtexchooser@duck.com
- Update to version 0.2.4:
* feat: add `--debug` flag to print debug information (#794)
* feat: `ya.hide()` plugin API (#792)
* feat: truncate path for deeply nested directories (#787)
* fix: track the latest file changes for the `selected`, `yanked` state when available (#791)
* feat: `cx.yanked` plugin API (#788)
* feat: send a foreground notification to the user when the process fails to run (#775)
* feat: add `<C-p>` and `<C-n>` to the select component for moving the cursor up/down (#779)
* feat: test new color system
* feat: `ui.Clear` component for UI plugins (#786)
* feat: `ya.notify()` plugin API (#780)
* feat: add `parse` method to `Line` element
* feat: add `Ctrl-[` as an escape key (#763)
* refactor: add new `run` property (#773)
* fix: nested conflict detection exception when performing cross-level searches (#769)
* feat: add musl linux build targets (#759)
* fix: remove redundant check to allow operations on the `shell` command with an empty file list
* feat: `ya.input()` plugin API (#762)
* feat: support `%0` as the hovered file for Windows (#761)
* perf: apply `add_many()`/`remove_many()` to the visual mode items for selection conflict detecting (#758)
* feat: allow both '/' and '\' in folder creation (#751)
* feat: support `YAZI_FILE_ONE` environment variable for `file(1)` path (#752)
* feat: add `prepend_rules` and `append_rules` for `[open]` in `yazi.toml` (#754)
* feat: switch to inline images protocol for VSCode, Tabby, and Hyper
* feat: add a new `[notify]` section to the `theme.toml` to configure the `notify` component's style (#749)
* feat: flavor (#753)
* feat: add hovered as `$0` for shell and opener (#738)
* ci: add cachix workflow (#740)
* refactor: prefer `Display` over `ToString` (#734)
* perf: prefer `raw_get()` and `raw_set()`
* feat: support `is` rule for `[icon]` (#720)
* fix: initialize logs right after configurations (#708)
* refactor: new `yazi-boot` crate (#728)
* feat: add `idx` field to the file API
* fix: skip when the mime-type cannot match due to file permissions (#725)
* fix: rendering fails when no file type style is matched (#721)
* feat: better accessibility (#719)
* feat: add csharp, kdl and nu icons (#711)
* perf: cache loaded plugins (#710)
* fix: ignore further classified mime-types (#707)
* feat: `state` now accepts a name for the bucket
* fix: allow running `ya.sync` in a sync plugin call (#702)
* fix: `any_file` and `any_dir` should check `is_folder`
* docs: move image preview details to the website
* feat: cross-directory selection (#693)
* docs: Yazi must have a duck logo in README (#691)
* feat: nested selection conflict detection (#689)
* fix: if block in paste command was wrong
* refactor: using definite patterns to simplify keybindings (#690)
* feat: add a new option `--hovered` to the `open` command allowing users to only open the currently hovered file (#687)
* feat: add icons for Scala, Elm and Java (.jar & .class)
* feat: add counter component to the header for displaying currently yanked/selected items (#646)
* feat: add new file marked state (#682)
* feat: expose selected/yanked files as API (#674)
* feat: add color to icons (#683)
* feat: add new `scrolloff` option to `[manager]` (#679)
* feat: add `prepend_rules` and `append_rules` for `[icon]` (#670)
* fix: allow access to the current tab via `tabs` for consistency
* feat: Vim-like notification (#659)
* refactor: tab-specific selection (#653)
* feat: enable the ability to sort the which key (#662)
* ci: add clippy/rustfmt workflow (#663)
* feat: add `<Delete>` to `[input]` keymap (#665)
* feat: add `<Home>` and `<End>` to `[input]` keymap
* feat: calling sync functions within the async plugin (#649)
* feat: merge wildcard preloader and previewer rules via `append_preloaders` and `append_previewers`
* fix: initialize `window` in `Folder::make` for folder preview
* fix: do not use jemalloc on macOS and Windows
* feat: allows access to complete app data for all tabs (#644)
* perf: cheaper sync context initialization (#643)
-------------------------------------------------------------------
Wed Feb 07 14:25:50 UTC 2024 - xtexchooser@duck.com
- Update to version 0.2.3:
* chore: bump version to 0.2.3
* feat: if input is empty, close it on `backspace` command (#630)
* feat: add `ya.quote()` function instead of `ya.shell_join()`
* fix: task manager not re-rendering after progress update (#633)
* fix: hidden attribute of files on Windows (#632)
* feat: support char device in filetype (#628)
* feat: add `ya.shell_join()` API
* fix: attach plugin `args` to the `entry` method for better future optimization possibilities (#627)
* feat: `app_emit` and `manager_emit` accepts boolean, integer, and number as option values (#625)
* fix: image rotation with orientation 4
* feat: add `plugin` command to each layer
* feat: plugin interface for key events via `ya.which()` (#617)
* perf: use lazy sorting when loading large directories to reduce unnecessary CPU consumption (#607)
* feat: make `trash` crate optional on Android (#600)
* feat: support `unyank` (#313)
* refactor: use `Cmd` instead of `Exec` (#604)
* perf: read directory in bulk in the background at startup (#599)
* feat: preview image over SSH (#585)
* feat: plugin-specific state persistence (#590)
* feat: support passing arguments to plugin (#587)
* feat: allow to configure image filter (#586)
* feat: shorten unit names and add more units to `ya.readable_size`
* fix: parent folder not tracking CWD (#581)
* feat: new `image_quality` and `sixel_fraction` options to allow users to configure the image preview quality (#576)
* fix: input offset is not reset when renaming with `--cursor=start` and the filename is too long (#575)
* feat: customizing the number of columns of "which key" component (#571)
-------------------------------------------------------------------
Fri Feb 2 00:15:25 UTC 2024 - xtexChooser <xtexchooser@duck.com>
- Use system lua5.4.
- Use remove tar.zst source, and keep only obscpio source.
-------------------------------------------------------------------
Wed Jan 31 11:02:18 UTC 2024 - xtexChooser <xtexchooser@duck.com>
- Package vendored lua for lua 5.4 syntax support.
LuaJIT only supports up to lua 5.1 syntax.
-------------------------------------------------------------------
Wed Jan 31 09:09:58 UTC 2024 - xtexChooser <xtexchooser@duck.com>
- Build shell completions packages
-------------------------------------------------------------------
Wed Jan 31 04:24:38 UTC 2024 - xtexChooser <xtexchooser@duck.com>
- Fix rustc SIGSEGV exception
-------------------------------------------------------------------
Wed Jan 31 03:29:18 UTC 2024 - xtexChooser <xtexchooser@duck.com>
- Init package yazi v0.2.2

4
yazi.obsinfo Normal file
View File

@ -0,0 +1,4 @@
name: yazi
version: 0.3.0
mtime: 1722494176
commit: 7a380c2f0fdaec87992836e21dc8b6cd251af980

124
yazi.spec Normal file
View File

@ -0,0 +1,124 @@
#
# spec file for package yazi
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: yazi
Version: 0.3.0
Release: 0
Summary: Blazing fast terminal file manager written in Rust, based on async I/O
License: MIT
Group: Productivity/Text/Utilities
URL: https://github.com/sxyazi/yazi
Source0: %{name}-%{version}.tar.zst
Source1: vendor.tar.zst
Requires: file
BuildRequires: cargo-packaging
BuildRequires: lua54-devel
Suggests: ffmpegthumbnailer
Suggests: 7zip
Suggests: jq
Suggests: poppler
Suggests: fd
Suggests: ripgrep
Suggests: fzf
Suggests: zoxide
Suggests: ImageMagick
Suggests: chafa
%define __cargo_common_opts --no-default-features --locked
%description
Yazi (means "duck") is a terminal file manager written in Rust, based on non-blocking async I/O. It aims to provide an efficient, user-friendly, and customizable file management experience.
💡 A new article explaining its internal workings: Why is Yazi Fast?
🚀 Full Asynchronous Support: All I/O operations are asynchronous, CPU tasks are spread across multiple threads, making the most of available resources.
💪 Powerful Async Task Scheduling and Management: Provides real-time progress updates, task cancellation, and internal task priority assignment.
🖼️ Built-in Support for Multiple Image Protocols: Also integrated with Überzug++, covering almost all terminals.
🌟 Built-in Code Highlighting and Image Decoding: Combined with the pre-loading mechanism, greatly accelerates image and normal file loading.
🔌 Concurrent Plugin System: UI plugins (rewriting most of the UI), functional plugins (coming soon), custom previewer, and custom preloader; Just some pieces of Lua.
🧰 Integration with fd, rg, fzf, zoxide
💫 Vim-like input/select component, auto-completion for cd paths
🏷️ Multi-Tab Support, Scrollable Preview (for videos, PDFs, archives, directories, code, etc.)
🔄 Bulk Renaming, Visual Mode, File Chooser
🎨 Theme System, Custom Layouts, Trash Bin, CSI u
... and more!
%package bash-completion
Summary: Bash Completion for %{name}
Group: System/Shells
Requires: bash-completion
Supplements: (%{name} and bash-completion)
BuildArch: noarch
%description bash-completion
The official bash completion script for %{name}.
%package fish-completion
Summary: Fish Completion for %{name}
Group: System/Shells
Supplements: (%{name} and fish)
BuildArch: noarch
%description fish-completion
The official fish completion script for %{name}.
%package zsh-completion
Summary: ZSH Completion for %{name}
Group: System/Shells
Supplements: (%{name} and zsh)
BuildArch: noarch
%description zsh-completion
The official zsh completion script for %{name}.
%prep
%autosetup -a1 -p0
%build
export YAZI_GEN_COMPLETIONS=true
export VERGEN_GIT_SHA='openSUSE'
%{cargo_build}
%install
export VERGEN_GIT_SHA='openSUSE'
%{cargo_install -p yazi-fm}
%{cargo_install -p yazi-cli}
install -Dm 644 yazi-boot/completions/yazi.bash %{buildroot}%{_datadir}/bash-completion/completions/yazi
install -Dm 644 yazi-boot/completions/yazi.fish %{buildroot}%{_datadir}/fish/vendor_completions.d/yazi.fish
install -Dm 644 yazi-boot/completions/_yazi %{buildroot}%{_datadir}/zsh/site-functions/_yazi
%check
%{cargo_test}
%files
%license LICENSE
%doc README.md
%{_bindir}/%{name}
%{_bindir}/ya
%files bash-completion
%{_datadir}/bash-completion
%files fish-completion
%{_datadir}/fish
%files zsh-completion
%{_datadir}/zsh
%changelog