Created
August 26, 2023 23:31
-
-
Save hydren/4896fd22c0a4ef0fc3131b62c2b4c2e5 to your computer and use it in GitHub Desktop.
A zenity script to provide a simple dialog to choose wallpapers in conjunction with stitchWPmod.sh script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
wpFiles=() | |
XOUT=$(xrandr | grep -oP '.*(?=\sconnected)') | |
for LINE in $XOUT; do | |
FILE=`zenity --file-selection --file-filter=""*.bmp" "*.gif" "*.jpg" "*.jpeg" "*.png" "*.webp"" --title="Select an image for display $LINE"` | |
case $? in | |
0) | |
wpFile="${FILE}" | |
wpFiles+=("$wpFile");; | |
1) | |
echo "No file selected." | |
exit;; | |
-1) | |
echo "An unexpected error has occurred." | |
exit;; | |
esac | |
done | |
./stitchWPmod.sh "${wpFiles[@]}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment