feat(niri): ricing never ends

This commit is contained in:
Florian Schmitt 2025-01-13 20:11:38 +03:00
parent 328ecdffc3
commit d779b76be0
8 changed files with 105 additions and 18 deletions

21
scripts/cliphist.sh Executable file
View file

@ -0,0 +1,21 @@
#!/usr/bin/env bash
# ____ _ _ _ _ _
# / ___| (_)_ __ | |__ (_)___| |_
# | | | | | '_ \| '_ \| / __| __|
# | |___| | | |_) | | | | \__ \ |_
# \____|_|_| .__/|_| |_|_|___/\__|
# |_|
#
case $1 in
d) cliphist list | rofi -dmenu -replace | cliphist delete
;;
w) if [ `echo -e "Clear\nCancel" | rofi -dmenu` == "Clear" ] ; then
cliphist wipe
fi
;;
*) cliphist list | rofi -dmenu -replace | cliphist decode | wl-copy
;;
esac

6
scripts/restart-waybar.sh Executable file
View file

@ -0,0 +1,6 @@
#!/usr/bin/env bash
killall waybar
pkill waybar
sleep 0.5
waybar

View file

@ -18,17 +18,18 @@ export SWWW_TRANSITION_DURATION=1
export SWWW_TRANSITION_STEP=2
# This controls (in seconds) when to switch to the next image
INTERVAL=300
#INTERVAL=30
while true; do
find "$1" -type f \
#while true; do
find "$1" -type f \( -iname \*.jpg -o -iname \*.jpeg -o -iname \*.png -o -iname \*.webp \) \
| while read -r img; do
echo "$((RANDOM % 1000)):$img"
done \
| sort -n | cut -d':' -f2- \
| while read -r img; do
swww img "$img"
sleep $INTERVAL
#sleep $INTERVAL
break
done
done
one
#done