diff --git a/configs/scripts_l/README.md b/configs/scripts_l/README.md new file mode 100644 index 0000000..bb24ca4 --- /dev/null +++ b/configs/scripts_l/README.md @@ -0,0 +1,5 @@ +## Scripts Linux +Most if not all of these scripts are `bash` scripts and only works on `Linux` + +- **walld** - Make sure that `swww` is installed, `sudo pacman -S swww` +- **random-wall** - `swww` is also required for this to work, all wallpapers need to be store in `~/Pictures/Wallapers` if the folder do not exist, create them diff --git a/configs/scripts_l/random-wall b/configs/scripts_l/random-wall new file mode 100755 index 0000000..d480713 --- /dev/null +++ b/configs/scripts_l/random-wall @@ -0,0 +1,17 @@ +#!/bin/bash + +wallpaper_dir=~/Pictures/Wallpapers + +find_images() { + find "$1" -type f \( -name "*.jpg" -o -name "*.jpeg" -o -name "*.png" -o -name "*.gif" \) +} + +if [[ -d $wallpaper_dir && $(find_images "$wallpaper_dir") ]]; then + random_wallpaper=$(find_images "$wallpaper_dir" | shuf -n 1) + + swww img "$random_wallpaper" --transition-type outer --transition-pos 0.854,0.977 --transition-step 90 + + echo "Wallpaper set to: $random_wallpaper" +else + echo "Wallpaper directory is either missing or does not contain any images." +fi diff --git a/configs/scripts_l/walld b/configs/scripts_l/walld new file mode 100755 index 0000000..4222bf7 --- /dev/null +++ b/configs/scripts_l/walld @@ -0,0 +1,6 @@ +#!/bin/sh + +swww query +if [ $? -eq 1 ] ; then + swww-daemon +fi