mirror of
https://github.com/sxyazi/yazi.git
synced 2026-05-13 08:16:40 +00:00
feat: add desktop entry and logo (#534)
This commit is contained in:
parent
4647ec0dd0
commit
d41cd5684e
3 changed files with 22 additions and 1 deletions
BIN
assets/logo.png
Normal file
BIN
assets/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 517 KiB |
11
assets/yazi.desktop
Normal file
11
assets/yazi.desktop
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
[Desktop Entry]
|
||||
Name=Yazi
|
||||
Icon=yazi
|
||||
Comment=Blazing fast terminal file manager written in Rust, based on async I/O
|
||||
Terminal=true
|
||||
TryExec=yazi
|
||||
Exec=yazi %u
|
||||
Type=Application
|
||||
MimeType=inode/directory
|
||||
Categories=Utility;Core;System;FileTools;FileManager;ConsoleOnly
|
||||
Keywords=File;Manager;Explorer;Browser;Launcher
|
||||
12
nix/yazi.nix
12
nix/yazi.nix
|
|
@ -26,6 +26,7 @@
|
|||
, fzf
|
||||
, withZoxide ? true
|
||||
, zoxide
|
||||
, imagemagick
|
||||
}:
|
||||
|
||||
(makeRustPlatform { cargo = rustToolchain; rustc = rustToolchain; }).buildRustPackage {
|
||||
|
|
@ -37,7 +38,7 @@
|
|||
|
||||
cargoLock.lockFile = ../Cargo.lock;
|
||||
|
||||
nativeBuildInputs = [ makeWrapper installShellFiles ];
|
||||
nativeBuildInputs = [ makeWrapper installShellFiles imagemagick ];
|
||||
buildInputs = lib.optionals stdenv.isDarwin (
|
||||
with darwin.apple_sdk.frameworks; [ Foundation ]
|
||||
);
|
||||
|
|
@ -62,6 +63,15 @@
|
|||
--bash ./yazi-config/completions/yazi.bash \
|
||||
--fish ./yazi-config/completions/yazi.fish \
|
||||
--zsh ./yazi-config/completions/_yazi
|
||||
|
||||
# Resize logo
|
||||
for RES in 16 24 32 48 64 128 256; do
|
||||
mkdir -p $out/share/icons/hicolor/"$RES"x"$RES"/apps
|
||||
convert assets/logo.png -resize "$RES"x"$RES" $out/share/icons/hicolor/"$RES"x"$RES"/apps/yazi.png
|
||||
done
|
||||
|
||||
mkdir -p $out/share/applications
|
||||
install -m644 assets/yazi.desktop $out/share/applications/
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue