mirror of
https://github.com/vincentbernat/i3wm-configuration.git
synced 2025-06-21 09:35:40 +02:00
wallpaper: make list work when user.count is missing
This commit is contained in:
parent
7886560fd9
commit
8bbe03e034
1 changed files with 4 additions and 4 deletions
|
@ -1,18 +1,18 @@
|
||||||
#!/bin/zsh
|
#!/bin/zsh
|
||||||
|
|
||||||
join \
|
join \
|
||||||
-1 3 -2 1 \
|
-1 1 -2 1 -e 0 -a 1 \
|
||||||
<(
|
<(
|
||||||
find -regextype posix-extended -iregex '.*\.(jpe?g|png|webp)' -print0 \
|
find -regextype posix-extended -iregex '.*\.(jpe?g|png|webp)' -print0 \
|
||||||
| xargs -r0n10 -P$(nproc) identify -format "%[fx:w*h] %[w]x%[h] %i\n" \
|
| xargs -r0n10 -P$(nproc) identify -format "%i %[fx:w*h] %[w]x%[h]\n" \
|
||||||
| sort -k 3b,3) \
|
| sort -k 1b,1) \
|
||||||
<(
|
<(
|
||||||
getfattr --absolute-names -n user.count ./* 2> /dev/null \
|
getfattr --absolute-names -n user.count ./* 2> /dev/null \
|
||||||
| awk '/^# file:/ {file=substr($0, 8)} /^user.count=/ {printf("%s %s\n", file, substr($0, 13))}' \
|
| awk '/^# file:/ {file=substr($0, 8)} /^user.count=/ {printf("%s %s\n", file, substr($0, 13))}' \
|
||||||
| sed 's/"$//' \
|
| sed 's/"$//' \
|
||||||
| sort -k 1b,1) \
|
| sort -k 1b,1) \
|
||||||
| while read name pixels resolution count; do
|
| while read name pixels resolution count; do
|
||||||
printf "%s\t%9s\t%5d\t%s\n" $pixels $resolution $count $name
|
printf "%s\t%9s\t%5d\t%s\n" $pixels $resolution ${count:-0} $name
|
||||||
done \
|
done \
|
||||||
| sort -g -b -k3,3r -k1,1 \
|
| sort -g -b -k3,3r -k1,1 \
|
||||||
| cut -f2-
|
| cut -f2-
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue