Tweak vifm handling of video and image

This commit is contained in:
Tibo De Peuter 2023-06-26 17:00:36 +02:00
parent 9484b3bc10
commit 050d03ced3
5 changed files with 34 additions and 22 deletions

View file

@ -26,11 +26,11 @@
"systems": "systems_2"
},
"locked": {
"lastModified": 1687171271,
"narHash": "sha256-BJlq+ozK2B1sJDQXS3tzJM5a+oVZmi1q0FlBK/Xqv7M=",
"lastModified": 1687709756,
"narHash": "sha256-Y5wKlQSkgEK2weWdOu4J3riRd+kV/VCgHsqLNTTWQ/0=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "abfb11bd1aec8ced1c9bb9adfe68018230f4fb3c",
"rev": "dbabf0ca0c0c4bce6ea5eaf65af5cb694d2082c7",
"type": "github"
},
"original": {
@ -46,11 +46,11 @@
]
},
"locked": {
"lastModified": 1687595284,
"narHash": "sha256-W4bGX7yCjWLeAugWpCMURlXxgPmXBJGTr/isGyd6Uew=",
"lastModified": 1687647567,
"narHash": "sha256-Ua90LZYJO7/7KW/KK/AqijhIekd+wxPwbVKXuBYzJeQ=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "05a584b4f63f5de442f59c8cec01dddc77312856",
"rev": "6ca1e16eb3016c94b7ac16699e1d4158bd4e39a4",
"type": "github"
},
"original": {
@ -62,11 +62,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1687466461,
"narHash": "sha256-oupXI7g7RPzlpGUfAu1xG4KBK53GrZH8/xeKgKDB4+Q=",
"lastModified": 1687729501,
"narHash": "sha256-mTLkMePoHUWvTCf3NuKbeYEea/tsikSIKBWwb9OfRr4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "ecb441f22067ba1d6312f4932a7c64efa8d19a7b",
"rev": "35130d4b4f0b8c50ed2aceb909a538c66c91d4a0",
"type": "github"
},
"original": {
@ -93,11 +93,11 @@
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1687502512,
"narHash": "sha256-dBL/01TayOSZYxtY4cMXuNCBk8UMLoqRZA+94xiFpJA=",
"lastModified": 1687681650,
"narHash": "sha256-M2If+gRcfpmaJy/XbfSsRzLlPpoU4nr0NHnKKl50fd8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "3ae20aa58a6c0d1ca95c9b11f59a2d12eebc511f",
"rev": "1c9db9710cb23d60570ad4d7ab829c2d34403de3",
"type": "github"
},
"original": {

View file

@ -12,6 +12,7 @@
duf
git-crypt
lynx
nsxiv
w3m
zenith
];

View file

@ -1,14 +1,22 @@
{ config, lib, pkgs, ... }:
{
home-manager.users.tdpeuter.home = {
packages = with pkgs; [
vifm
font-awesome_5
];
file = {
".config/vifm".source = ../../../../stow/vifm/.config/vifm;
};
home-manager.users.tdpeuter.home = {
packages = with pkgs; [
vifm
chafa # Terminal image previewer
glow # Terminal Markdown renderer
font-awesome_5
];
# Put files separately so history still works
file = {
".config/vifm/colors".source = ../../../../stow/vifm/.config/vifm/colors;
".config/vifm/scripts".source = ../../../../stow/vifm/.config/vifm/scripts;
".config/vifm/vifmrc".source = ../../../../stow/vifm/.config/vifm/vifmrc;
};
};
}

View file

@ -25,6 +25,7 @@ save-position-on-quit=yes
# Disable video output
vid=no
fs=no
# Profile for terminal-only
[terminal]

View file

@ -205,6 +205,7 @@ filextype {*.djvu},<image/vnd.djvu>
" Audio
filetype {*.wav,*.mp3,*.flac,*.m4a,*.wma,*.ape,*.ac3,*.og[agx],*.spx,*.opus},
\<audio/*>
\ mpv --profile=audio %f,
\ {Play using ffplay}
\ ffplay -nodisp -autoexit %c,
\ {Play using MPlayer}
@ -217,6 +218,7 @@ filextype {*.avi,*.mp4,*.wmv,*.dat,*.3gp,*.ogv,*.mkv,*.mpg,*.mpeg,*.vob,
\*.fl[icv],*.m2v,*.mov,*.webm,*.ts,*.mts,*.m4v,*.r[am],*.qt,*.divx,
\*.as[fx]},
\<video/*>
\ mpv %f,
\ vlc %f &,
\ {View using ffplay}
\ ffplay -fs -autoexit %f,
@ -250,7 +252,7 @@ fileviewer {*.[1-8]},<text/troff> man ./%c | col -b
" Images
filextype {*.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm},<image/*>
\ {View in sxiv}
\ sxiv %f,
\ nsxiv %f &,
\ {View in gpicview}
\ gpicview %c,
\ {View in shotwell}
@ -272,7 +274,7 @@ filextype *.vym
" Markdown
filextype {*.md}
\ typora,
\ marktext %f,
fileviewer {*.md}
\ glow,