nsxiv: get lowest date from metadata

This commit is contained in:
Alexander Bocken 2024-04-05 10:50:33 +02:00
parent 9641482295
commit 78d4618dfa
Signed by: Alexander
GPG Key ID: 1D237BE83F9B05E8
2 changed files with 3 additions and 2 deletions

View File

@ -18,6 +18,6 @@ filesize=$(du -Hh -- "$1" | cut -f 1)
geometry="${2}x${3}" geometry="${2}x${3}"
#TODO: imrpove for multiple date formats #TODO: imrpove for multiple date formats
#currently just picks the first date that is not a profile or file date using exiftool (no one coherent standard for date in exif metadata is used) #currently just picks the first date that is not a profile or file date using exiftool (no one coherent standard for date in exif metadata is used)
date_shot="$(exiftool -- "$1" | grep 'Date' | grep -vE '(Profile|File)' | head -n1 | cut -d: -f1 --complement)" date_shot="$(exiftool -- "$1" | grep 'Date' | grep -vE '(Profile|File)' | cut -d: -f1 --complement | sort | head -n1)"
echo "${filesize}${s}${geometry}${s}${filename}${s}${date_shot}" echo "${filesize}${s}${geometry}${s}${filename}${s}${date_shot}"

View File

@ -10,10 +10,11 @@ setbg & # set the background with the `setbg` script
xrdb ${XDG_CONFIG_HOME:-$HOME/.config}/x11/xresources & xrdbpid=$! # Uncomment to use Xresources colors/settings on startup xrdb ${XDG_CONFIG_HOME:-$HOME/.config}/x11/xresources & xrdbpid=$! # Uncomment to use Xresources colors/settings on startup
autostart="picom mpd dunst unclutter dwmblocks update_musicbar pipewire remapd pipewire jellyfin-mpv-shim" autostart="picom mpd dunst unclutter dwmblocks update_musicbar pipewire remapd pipewire"
for program in $autostart; do for program in $autostart; do
pidof -s "$program" || setsid -f "$program" pidof -s "$program" || setsid -f "$program"
done >/dev/null 2>&1 done >/dev/null 2>&1
sleep 30 && jellyfin-mpv-shim & # Start jellyfin-mpv-shim after 30 seconds, to ensure that internet is connected (bodged, not relevant though)
xrandr --auto xrandr --auto
xrandr --dpi 140 # Set DPI. User may want to use a larger number for larger screens. xrandr --dpi 140 # Set DPI. User may want to use a larger number for larger screens.
sb-bright 40 # set brighntess by default to 40% instead of ~38% sb-bright 40 # set brighntess by default to 40% instead of ~38%