diff options
Diffstat (limited to '.scripts/zathura-random-page')
-rwxr-xr-x | .scripts/zathura-random-page | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/.scripts/zathura-random-page b/.scripts/zathura-random-page new file mode 100755 index 0000000..c8123af --- /dev/null +++ b/.scripts/zathura-random-page @@ -0,0 +1,7 @@ +#!/bin/sh + +set -e + +MAX="$(pdfinfo "$1" | awk '/^Pages:/ {print $2}')" +PAGE="$(shuf -i 1-"$MAX" -n 1)" +xdotool type "${PAGE}G" |