setup openers in yazi
This commit is contained in:
parent
d3a471c5ac
commit
1fcbc951b7
1 changed files with 22 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
|||
_: {
|
||||
{ config, ... }: {
|
||||
programs = {
|
||||
fd = {
|
||||
enable = true;
|
||||
|
@ -16,7 +16,28 @@ _: {
|
|||
};
|
||||
preview = {
|
||||
image_filter = "lanczos3";
|
||||
image_quality = 90;
|
||||
};
|
||||
opener = {
|
||||
open-image = [
|
||||
{ run = "${config.programs.imv.package}/bin/imv $0"; orphan = true; }
|
||||
];
|
||||
edit-text = [
|
||||
{ run = "${config.programs.neovim.package}/bin/nvim $0"; block = true; }
|
||||
];
|
||||
play = [
|
||||
{ run = "${config.programs.mpv.package}/bin/mpv $0"; orphan = true; }
|
||||
];
|
||||
terminal = [
|
||||
{ run = "${config.programs.kitty.package}/bin/kitty --class=yazi -d=$0"; orphan = true; }
|
||||
];
|
||||
};
|
||||
open.rules = [
|
||||
{ mime = "image/*"; use = "open-image"; }
|
||||
{ mime = "text/*"; use = [ "edit-text" ]; }
|
||||
{ mime = "video/*"; use = [ "play" ]; }
|
||||
{ mime = "inode/directory"; use = [ "terminal" ]; }
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue