diff --git a/dots/archinstall/common/packages.txt b/dots/archinstall/common/packages.txt index 1e94db9..29180d8 100644 --- a/dots/archinstall/common/packages.txt +++ b/dots/archinstall/common/packages.txt @@ -147,6 +147,7 @@ keepassxc # password manager kitty # terminal less # cli text viewer lf # file manager +libsixel # codec for dec sixel graphics and some converter programs (used by lf to preview images) lm_sensors # tools for general smbus access and hardware monitoring nextcloud-client # nextcloud sync client noto-fonts # google noto ttf fonts diff --git a/dots/bash/.bashrc b/dots/bash/.bashrc index 3f1cbfb..301d74a 100644 --- a/dots/bash/.bashrc +++ b/dots/bash/.bashrc @@ -88,7 +88,22 @@ esac # --- -# superfile +# lf (change directory on quit) +# --- +lf() { + local tmp=$(mktemp) + command lf -last-dir-path="$tmp" "$@" + if [[ -f "$tmp" ]]; then + local dir=$(cat "$tmp") + rm -f "$tmp" + if [[ -d "$dir" && "$dir" != "$(pwd)" ]]; then + cd "$dir" + fi + fi +} + +# --- +# superfile (change directory on quit) # --- spf() { os=$(uname -s)