diff options
author | Benjamin Chausse <benjamin@chausse.xyz> | 2025-03-31 12:16:47 -0400 |
---|---|---|
committer | Benjamin Chausse <benjamin@chausse.xyz> | 2025-03-31 12:16:47 -0400 |
commit | 4ccdb6fb1f53bc6c799ece8c2f03a0fede093acd (patch) | |
tree | 9d3a73a81547fff442263c28bdfd9d1e98895d5d /.local/bin/previewclean | |
parent | f4c4550e327d9090c82a735d39d104d0bedb602d (diff) |
config cleanup
Diffstat (limited to '.local/bin/previewclean')
-rwxr-xr-x | .local/bin/previewclean | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/.local/bin/previewclean b/.local/bin/previewclean deleted file mode 100755 index 8b0a570..0000000 --- a/.local/bin/previewclean +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -threshold="200000" # 200 MB -previewdir="${XDG_CACHE_HOME:-$HOME/.cache}/lf" - -# Check if the total size of the preview directory exceeds the threshold -# and remove the last viewed file until it doesn't -while [ "$(du -s "$previewdir" | cut -f1)" -gt "$threshold" ]; do - rm -f "$(find "$previewdir" -type f -printf '%T+ %p\n' | sort | head -n1 | cut -d' ' -f2)" -done |