diff --git a/home/programs/files.nix b/home/programs/files.nix index bdb1447..0cdf179 100644 --- a/home/programs/files.nix +++ b/home/programs/files.nix @@ -1,4 +1,4 @@ -{ config, ... }: { +{ config, pkgs, ... }: { programs = { fd = { enable = true; @@ -19,24 +19,22 @@ image_quality = 90; }; opener = { - open-image = [ - { run = "${config.programs.imv.package}/bin/imv-dir $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 = [ + { run = "${pkgs.xdg-utils}/bin/xdg-open $0"; orphan = true; } + ]; }; open.rules = [ - { mime = "image/*"; use = "open-image"; } { mime = "text/*"; use = [ "edit-text" ]; } - { mime = "video/*"; use = [ "play" ]; } + { mime = "application/json"; use = [ "edit-text" ]; } { mime = "inode/directory"; use = [ "terminal" ]; } + { mime = "*"; use = [ "open" ]; } + { name = "*"; use = [ "open" ]; } ]; }; };