nix

configuration files that power my machines
Log | Files | Refs | README | LICENSE

commit c43bc3742bd75656b683053c6cfe2af28c7ba0e6
parent 306725ce84c0921ec2cbb8dce72f6a5ac0eacc0d
Author: mtmn <miro@haravara.org>
Date:   Wed, 29 Apr 2026 22:16:47 +0200

dotfiles: add chafa previews to scripts

Diffstat:
Mmodules/mixins/dotfiles/bin/recup | 3++-
Mmodules/mixins/dotfiles/bin/scup | 3++-
2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/modules/mixins/dotfiles/bin/recup b/modules/mixins/dotfiles/bin/recup @@ -1,6 +1,7 @@ #!/bin/sh cd ~/misc/recordings || exit 1 -PICKED=$(eza --oneline --reverse --sort=created | fzf --reverse --preview='stat {}') +PICKED=$(eza --oneline --reverse --sort=created | fzf --reverse \ + --preview="ffmpeg -i {} -vf 'select=eq(n\,0)' -frames:v 1 -f image2pipe -vcodec png - 2>/dev/null | chafa --format=sixels --size=\${FZF_PREVIEW_COLUMNS}x\${FZF_PREVIEW_LINES} - 2>/dev/null || stat {}") if [ -n "$PICKED" ]; then ffmpeg -i "$PICKED" -c:v libvpx-vp9 -deadline realtime -cpu-used 8 -crf 30 -b:v 0 -c:a libopus -b:a 128k -f webm - | diff --git a/modules/mixins/dotfiles/bin/scup b/modules/mixins/dotfiles/bin/scup @@ -1,7 +1,8 @@ #!/bin/sh cd ~/misc/screenshots || exit 1 -PICKED=$(eza --oneline --reverse --sort=created | fzf --reverse --preview='stat {}') +PICKED=$(eza --oneline --reverse --sort=created | fzf --reverse \ + --preview="chafa --format=sixels --size=\${FZF_PREVIEW_COLUMNS}x\${FZF_PREVIEW_LINES} {} 2>/dev/null || stat {}") if [ -n "$PICKED" ]; then aws s3 cp "$PICKED" "s3://mine/screenshots/$PICKED"