(nsxiv): add other info scripts

This commit is contained in:
frosty 2024-08-01 16:06:21 -04:00
parent fb32a6aa63
commit 5c4df90114
3 changed files with 35 additions and 0 deletions

13
.config/nsxiv/exec/image-info Executable file
View file

@ -0,0 +1,13 @@
#!/bin/sh
exec 2>/dev/null
file_name="${4##*/}"
while IFS="$(printf '\t')" read -r size _; do
file_size="$size"
done <<EOF
$(du -Hh "$4")
EOF
geometry="$2x$3"
printf '%s | %s | %s' "$file_name" "$file_size" "$geometry"

12
.config/nsxiv/exec/thumb-info Executable file
View file

@ -0,0 +1,12 @@
#!/bin/sh
exec 2>/dev/null
file_name="${4##*/}"
while IFS="$(printf '\t')" read -r size _; do
file_size="$size"
done <<EOF
$(du -Hh "$4")
EOF
printf '%s | %s' "$file_name" "$file_size"

10
.config/nsxiv/exec/win-title Executable file
View file

@ -0,0 +1,10 @@
#!/bin/sh
TITLE_BASE="nsxiv"
exec 2>/dev/null
filename="${1##*/}"
file_count="$2/$3"
printf '%s' "$TITLE_BASE - $filename | $file_count"