diff --git a/readme.md b/readme.md index cf57a47..f16de5c 100644 --- a/readme.md +++ b/readme.md @@ -17,8 +17,9 @@ | :-------------- | :-------- | | Status Bar | Polybar | | Window Manager | XMonad | +| Launcher | Dmenu | | Terminal | Alacritty | | Editor | Neovim | -| Launcher | Dmenu | +| File Manager | vifm | | Shell | Zsh | diff --git a/users/modules/file_manager/default.nix b/users/modules/file_manager/default.nix index badbcf0..fc0903b 100644 --- a/users/modules/file_manager/default.nix +++ b/users/modules/file_manager/default.nix @@ -1,7 +1,29 @@ -{ pkgs, ... }: +{ pkgs, lib, ... }: +let + + viu = pkgs.rustPlatform.buildRustPackage { + pname = "viu"; + version = "23-10-2022"; + + src = pkgs.fetchFromGitHub { + owner = "atanunq"; + repo = "viu"; + rev = "d377402ab0e29e890779071e2454b51bea8605c1"; + sha256 = "sha256-pvEuafwgHORwAjYGSB/m2BcdCCJ/UfLEgSUIgkyBrtI="; + }; + + # tests need an interactive terminal + doCheck = false; + + cargoSha256 = "sha256-WZfQgCAe/vvGQohCJPB4XxKidWwS+m6GxBQ0nBxo8P4="; + }; +in { - home.packages = with pkgs; [ vifm ]; + home.packages = [ + pkgs.vifm + viu # terminal image viewer + ]; xdg.configFile = { "vifm/vifmrc".source = ./vifmrc; diff --git a/users/modules/file_manager/vifmrc b/users/modules/file_manager/vifmrc index c1506fa..003bb12 100644 --- a/users/modules/file_manager/vifmrc +++ b/users/modules/file_manager/vifmrc @@ -185,7 +185,7 @@ fileviewer {*.[1-8]}, man ./%c | col -b filextype {*.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm}, \ image-roll %f fileviewer {*.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm}, - \ identify %f + \ viu -x %px -y %py -w %pw -h %ph %c " MD5 filetype *.md5