Skip to content

Commit

Permalink
Replace feh with imv
Browse files Browse the repository at this point in the history
  • Loading branch information
DanNixon committed Dec 22, 2023
1 parent 09e58ba commit 55db5e1
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 9 deletions.
1 change: 1 addition & 0 deletions modules/home-manager/desktop_environment/apps/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{pkgs, ...}: {
imports = [
./imv.nix
./zathura.nix
];

Expand Down
19 changes: 19 additions & 0 deletions modules/home-manager/desktop_environment/apps/imv.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{...}: {
programs.imv = {
enable = true;

settings = {
binds = {
"h" = "prev";
"j" = "next";
"k" = "prev";
"l" = "next";

"<Shift+J>" = "pan 0 -50";
"<Shift+K>" = "pan 0 50";
"<Shift+H>" = "pan 50 0";
"<Shift+L>" = "pan -50 0";
};
};
};
}
32 changes: 25 additions & 7 deletions modules/home-manager/desktop_environment/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,32 @@
enable = true;

defaultApplications = let
multimedia = ["mpv.desktop" "org.videolan.VLC.desktop"];
image = ["feh.desktop"];
video = ["mpv.desktop" "org.videolan.VLC.desktop"];
in {
"image/gif" = multimedia;
"video/3gpp" = multimedia;
"video/mp4" = multimedia;
"video/webm" = multimedia;
"video/x-matroska" = multimedia;
"video/x-msvideo" = multimedia;
"image/bmp" = image;
"image/gif" = image;
"image/jpeg" = image;
"image/jpg" = image;
"image/pjpeg" = image;
"image/png" = image;
"image/tiff" = image;
"image/x-bmp" = image;
"image/x-pcx" = image;
"image/x-png" = image;
"image/x-portable-anymap" = image;
"image/x-portable-bitmap" = image;
"image/x-portable-graymap" = image;
"image/x-portable-pixmap" = image;
"image/x-tga" = image;
"image/x-xbitmap" = image;
"image/heif" = image;

"video/3gpp" = video;
"video/mp4" = video;
"video/webm" = video;
"video/x-matroska" = video;
"video/x-msvideo" = video;
};
};
};
Expand Down
2 changes: 0 additions & 2 deletions modules/home-manager/media.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
mpc-cli
];

programs.feh.enable = true;

programs.mpv = {
enable = true;

Expand Down

0 comments on commit 55db5e1

Please sign in to comment.