45 lines
1.8 KiB
Bash
Executable File
45 lines
1.8 KiB
Bash
Executable File
#!/bin/bash
|
|
# _____ _ ______ ____ ____ __
|
|
# |_ _| |__ ___ _ __ ___ ___ / ___\ \ / /\ \ / /\ \ / /
|
|
# | | | '_ \ / _ \ '_ ` _ \ / _ \ \___ \\ \ /\ / / \ \ /\ / / \ \ /\ / /
|
|
# | | | | | | __/ | | | | | __/ ___) |\ V V / \ V V / \ V V /
|
|
# |_| |_| |_|\___|_| |_| |_|\___| |____/ \_/\_/ \_/\_/ \_/\_/
|
|
#
|
|
#
|
|
# by Stephan Raabe (2023)
|
|
# -----------------------------------------------------
|
|
|
|
# -----------------------------------------------------
|
|
# Select random wallpaper and create color scheme
|
|
# -----------------------------------------------------
|
|
wal -q -i ~/wallpaper/
|
|
|
|
# -----------------------------------------------------
|
|
# Load current pywal color scheme
|
|
# -----------------------------------------------------
|
|
source "$HOME/.cache/wal/colors.sh"
|
|
|
|
# -----------------------------------------------------
|
|
# Copy selected wallpaper into .cache folder
|
|
# -----------------------------------------------------
|
|
cp $wallpaper ~/.cache/current_wallpaper.jpg
|
|
|
|
# -----------------------------------------------------
|
|
# get wallpaper iamge name
|
|
# -----------------------------------------------------
|
|
newwall=$(echo $wallpaper | sed "s|$HOME/wallpaper/||g")
|
|
|
|
# -----------------------------------------------------
|
|
# Set the new wallpaper
|
|
# -----------------------------------------------------
|
|
swww img $wallpaper --transition-step 20 --transition-fps=20
|
|
~/dotfiles/waybar/launch.sh
|
|
sleep 1
|
|
|
|
# -----------------------------------------------------
|
|
# Send notification
|
|
# -----------------------------------------------------
|
|
notify-send "Theme and Wallpaper updated" "With image $newwall"
|
|
|
|
echo "DONE!"
|