Saataa andagii !
This commit is contained in:
parent
56d5497961
commit
7e708170ee
7 changed files with 13 additions and 13 deletions
|
@ -11,8 +11,8 @@ TYPE="outer"
|
|||
DURATION=3
|
||||
|
||||
# wofi window config (in %)
|
||||
WIDTH=20
|
||||
HEIGHT=30
|
||||
WIDTH=70
|
||||
HEIGHT=70
|
||||
|
||||
SWWW_PARAMS="--transition-fps $FPS --transition-type $TYPE --transition-duration $DURATION"
|
||||
|
||||
|
@ -47,15 +47,15 @@ menu(){
|
|||
# Here we are looping in the PICS array that is composed of all images in the $DIR
|
||||
# folder
|
||||
for i in ${!PICS[@]}; do
|
||||
# get full path of the image
|
||||
path=${DIR}/${PICS[$i]}
|
||||
# keeping the .gif to make sue you know it is animated
|
||||
if [[ -z $(echo ${PICS[$i]} | grep .gif$) ]]; then
|
||||
printf "$i. $(echo ${PICS[$i]} | cut -d. -f1)\n" # n°. <name_of_file_without_identifier>
|
||||
printf "img:${path}:text:$(echo ${PICS[$i]} | cut -d. -f1)\n" # n°. <name_of_file_without_identifier>
|
||||
else
|
||||
printf "$i. ${PICS[$i]}\n"
|
||||
printf "img:${path}:text:${PICS[$i]}\n"
|
||||
fi
|
||||
done
|
||||
|
||||
printf "$RANDOM_PIC_NAME"
|
||||
}
|
||||
|
||||
swww query || swww-daemon
|
||||
|
@ -72,8 +72,9 @@ main() {
|
|||
return
|
||||
fi
|
||||
|
||||
pic_index=$(echo $choice | cut -d. -f1)
|
||||
swww img ${DIR}/${PICS[$pic_index]} $SWWW_PARAMS
|
||||
pic_path=$(echo $choice | cut -d: -f2)
|
||||
echo $pic_path
|
||||
swww img ${pic_path} $SWWW_PARAMS
|
||||
}
|
||||
|
||||
# Check if wofi is already running
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue