Tweak vifm handling of video and image

This commit is contained in:
Tibo De Peuter 2023-06-26 17:00:36 +02:00 committed by Tibo De Peuter
parent 13f7ab647a
commit 0c1d55c956
5 changed files with 34 additions and 22 deletions

View file

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

View file

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

View file

@ -1,14 +1,22 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
{ {
home-manager.users.tdpeuter.home = { home-manager.users.tdpeuter.home = {
packages = with pkgs; [ packages = with pkgs; [
vifm vifm
chafa # Terminal image previewer
glow # Terminal Markdown renderer
font-awesome_5 font-awesome_5
]; ];
# Put files separately so history still works
file = { file = {
".config/vifm".source = ../../../../stow/vifm/.config/vifm; ".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 # Disable video output
vid=no vid=no
fs=no
# Profile for terminal-only # Profile for terminal-only
[terminal] [terminal]

View file

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