Files
illogical-impulse/m3ww/.config/eww/scripts/scroll-waifu
T
2024-02-22 15:35:06 +07:00

18 lines
484 B
Bash
Executable File

#!/usr/bin/bash
offset=$(eww get scroll_offset_waifu)
# total=$(eww get WAIFU_TAG_ID | gojq 'length')
# shown=$(eww get SCROLL_TOSHOW_WAIFUTAGS)
total=20
shown=13
# I'm sorry but I have to hard code or it'll be slow asf
if [ "$1" == "up" ]; then
if [ "$offset" -gt 0 ]; then
eww update scroll_offset_waifu=$(( "$offset" - 2 ))
fi
else
if [ "$offset" -lt $(( "$total" - "$shown" - 1 )) ]; then
eww update scroll_offset_waifu=$(( "$offset" + 2 ))
fi
fi