Add wallpaper_fav script
authorSiraaj Khandkar <siraaj@khandkar.net>
Tue, 18 Jan 2022 20:15:30 +0000 (15:15 -0500)
committerSiraaj Khandkar <siraaj@khandkar.net>
Tue, 18 Jan 2022 20:15:30 +0000 (15:15 -0500)
home/bin/wallpaper_fav [new file with mode: 0755]

diff --git a/home/bin/wallpaper_fav b/home/bin/wallpaper_fav
new file mode 100755 (executable)
index 0000000..e2de403
--- /dev/null
@@ -0,0 +1,8 @@
+#! /bin/sh
+
+set -e
+
+FAVS_FILE=~/fav-wallpapers.txt
+
+awk 'NR == 2 {sub("^" $1 " +" $2 " +" $3 " +", ""); print}' ~/.fehbg | xargs sha256sum >> "$FAVS_FILE"
+sort -u "$FAVS_FILE" | sponge "$FAVS_FILE"
This page took 0.028408 seconds and 4 git commands to generate.