mirror of
https://github.com/vincentbernat/i3wm-configuration.git
synced 2025-06-27 12:08:49 +02:00
wallpaper: add small shell script to list wallpapers
This commit is contained in:
parent
9d9b95b201
commit
bbc61d70ea
1 changed files with 10 additions and 0 deletions
10
wallpapers/list
Executable file
10
wallpapers/list
Executable file
|
@ -0,0 +1,10 @@
|
|||
#!/bin/zsh
|
||||
|
||||
find -regextype posix-extended -iregex '.*\.(jpe?g|png|webp)' -print0 \
|
||||
| xargs -0 identify -format "%[fx:w*h] %[w]x%[h] %i\n" \
|
||||
| while read pixels resolution name; do
|
||||
count=$(getfattr --only-values -n user.count $name 2> /dev/null || echo 0)
|
||||
printf "%s\t%9s\t%5d\t%s\n" $pixels $resolution $count $name
|
||||
done \
|
||||
| sort -g -b -k3,3r -k1,1 \
|
||||
| cut -f2-
|
Loading…
Add table
Add a link
Reference in a new issue