solorice/config/nsxiv/exec/thumb-info
Kristofers Solo 66f1040fc5
Update 2025-10-31
Update 2025-10-09

Update 2025-10-11

feat: add rose-pine gtk themes

Update 2025-10-16

Update 2025-10-23

Fix desktop niri

Update 2025-10-31
2025-10-31 12:13:54 +02:00

21 lines
463 B
Bash
Executable File

#!/bin/sh
# Example for $XDG_CONFIG_HOME/nsxiv/exec/thumb-info
# Called by nsxiv(1) whenever the selected thumbnail changes.
# The output is displayed in nsxiv's status bar.
# Arguments:
# $1: path to image file (as provided by the user)
# $2: empty
# $3: empty
# $4: fully resolved path to the image file
s=" " # field separator
exec 2>/dev/null
filename=$(basename -- "$4")
filesize=$(du -Hh -- "$4" | cut -f 1)
echo "${filesize}${s}${filename}"