From 9b1e3b6bc9d564ce11fa6c5290354110f85818ae Mon Sep 17 00:00:00 2001 From: Michael Mandl Date: Tue, 20 May 2025 12:58:15 +0200 Subject: [PATCH] feat: add preview to swu selector --- horsch/zsh.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/horsch/zsh.nix b/horsch/zsh.nix index b84f340..65bac67 100644 --- a/horsch/zsh.nix +++ b/horsch/zsh.nix @@ -1,5 +1,4 @@ -{ ... }: -{ +{...}: { programs.zsh.initContent = '' if [ -f $HOME/.nix-profile/etc/profile.d/nix.sh ]; then @@ -54,8 +53,11 @@ local ssh_login="fusion" local update_file=''${1} + local fzf_preview='stat --printf "%n\nSize: %s bytes\nModified: %y" {}' + if [ -z ''${update_file} ]; then - update_file=$(find build/tmp/deploy/images -name "*.swu" -type f | fzf --select-1) + update_file=$(find build/tmp/deploy/images -name "*.swu" -type f \ + | fzf --select-1 --exit-0 --header "Select a update file" --preview=''${fzf_preview} --preview-window=top) fi if [ -z ''${update_file} ]; then