56 lines
1.6 KiB
Nix
56 lines
1.6 KiB
Nix
|
|
{ config, pkgs, lib, system, user, allowed, secrets, ... }:
|
|
lib.mkIf (user != "tv")
|
|
{
|
|
home.packages = [
|
|
pkgs.yazi
|
|
];
|
|
|
|
programs.yazi = {
|
|
enable = true;
|
|
enableFishIntegration = true;
|
|
settings = {
|
|
manager = {
|
|
layout = [1 3 4];
|
|
sort_by = "natural";
|
|
sort_sensitive = true;
|
|
sort_reverse = false;
|
|
sort_dir_first = true;
|
|
linemode = "size";
|
|
show_hidden = true;
|
|
show_symlink = true;
|
|
};
|
|
opener = {
|
|
edit = [
|
|
{ exec = ''micro "$@"''; desc = "micro"; block = true;}
|
|
{ exec = ''codium "$@"''; orphan = true;}
|
|
{ exec = ''nano "$@"''; desc = "nano"; block = true;}
|
|
{ exec = ''sudo nano "$@"''; desc = "sudo nano"; block = true;}
|
|
];
|
|
play = [
|
|
{ exec = ''mpv "$@"''; }
|
|
{ exec = ''mediainfo "$1"; echo "Press enter to exit"; read''; block = true; desc = "Show mediainfo";}
|
|
];
|
|
archive = [
|
|
{ exec = ''unar "$1"''; desc = "Extract here"; }
|
|
];
|
|
image = [
|
|
{ exec = ''imv "$@"''; desc = "imv";}
|
|
{ exec = ''gimp "$@"''; desc = "gimp";}
|
|
{ exec = ''swww img "$@"''; desc = "swww wallpaper";}
|
|
];
|
|
font = [
|
|
{ exec = ''fontpreview "$@"''; desc = "fontpreview"; }
|
|
];
|
|
document = [
|
|
{ exec = ''zathura "$@"''; desc = "zathura"; }
|
|
{ exec = ''firefox "$@"''; desc = "firefox"; }
|
|
];
|
|
};
|
|
open.rules = [
|
|
{ mime = "text/*"; use = "edit"; }
|
|
{ mime = "image/*"; use = "image"; }
|
|
];
|
|
};
|
|
};
|
|
} |