users/vifm: add filepreview for images

This commit is contained in:
Dmitriy Pleshevskiy 2022-10-28 23:35:03 +03:00
parent b194221141
commit 55f46d26d9
Signed by: pleshevskiy
GPG key ID: 1B59187B161C0215
3 changed files with 27 additions and 4 deletions

View file

@ -17,8 +17,9 @@
| :-------------- | :-------- |
| Status Bar | Polybar |
| Window Manager | XMonad |
| Launcher | Dmenu |
| Terminal | Alacritty |
| Editor | Neovim |
| Launcher | Dmenu |
| File Manager | vifm |
| Shell | Zsh |

View file

@ -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;

View file

@ -185,7 +185,7 @@ fileviewer {*.[1-8]},<text/troff> man ./%c | col -b
filextype {*.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm},<image/*>
\ image-roll %f
fileviewer {*.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm},<image/*>
\ identify %f
\ viu -x %px -y %py -w %pw -h %ph %c
" MD5
filetype *.md5