2023-08-17 14:59:28 +00:00
|
|
|
#!/bin/bash
|
2023-08-17 15:44:09 +00:00
|
|
|
# _____ _ ______ ____ ____ __
|
|
|
|
# |_ _| |__ ___ _ __ ___ ___ / ___\ \ / /\ \ / /\ \ / /
|
|
|
|
# | | | '_ \ / _ \ '_ ` _ \ / _ \ \___ \\ \ /\ / / \ \ /\ / / \ \ /\ / /
|
|
|
|
# | | | | | | __/ | | | | | __/ ___) |\ V V / \ V V / \ V V /
|
|
|
|
# |_| |_| |_|\___|_| |_| |_|\___| |____/ \_/\_/ \_/\_/ \_/\_/
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# by Stephan Raabe (2023)
|
|
|
|
# -----------------------------------------------------
|
2023-08-17 14:59:28 +00:00
|
|
|
|
2023-08-17 15:44:09 +00:00
|
|
|
# -----------------------------------------------------
|
|
|
|
# Select random wallpaper and create color scheme
|
|
|
|
# -----------------------------------------------------
|
2023-08-17 14:59:28 +00:00
|
|
|
wal -q -i ~/wallpaper/
|
2023-08-17 15:44:09 +00:00
|
|
|
|
|
|
|
# -----------------------------------------------------
|
|
|
|
# Load current pywal color scheme
|
|
|
|
# -----------------------------------------------------
|
2023-08-17 14:59:28 +00:00
|
|
|
source "$HOME/.cache/wal/colors.sh"
|
|
|
|
|
2023-08-20 09:46:46 +00:00
|
|
|
# -----------------------------------------------------
|
2023-09-10 13:03:00 +00:00
|
|
|
# Copy selected wallpaper into .cache folder
|
2023-08-20 09:46:46 +00:00
|
|
|
# -----------------------------------------------------
|
2023-08-30 12:45:03 +00:00
|
|
|
cp $wallpaper ~/.cache/current_wallpaper.jpg
|
2023-08-20 09:46:46 +00:00
|
|
|
|
2023-08-17 15:44:09 +00:00
|
|
|
# -----------------------------------------------------
|
|
|
|
# get wallpaper iamge name
|
|
|
|
# -----------------------------------------------------
|
|
|
|
newwall=$(echo $wallpaper | sed "s|$HOME/wallpaper/||g")
|
2023-08-17 14:59:28 +00:00
|
|
|
|
2023-08-17 15:44:09 +00:00
|
|
|
# -----------------------------------------------------
|
|
|
|
# Set the new wallpaper
|
|
|
|
# -----------------------------------------------------
|
|
|
|
swww img $wallpaper --transition-step 20 --transition-fps=20
|
2023-08-28 11:33:53 +00:00
|
|
|
~/dotfiles/waybar/launch.sh
|
2023-08-20 09:46:46 +00:00
|
|
|
|
|
|
|
# -----------------------------------------------------
|
|
|
|
# Send notification
|
|
|
|
# -----------------------------------------------------
|
|
|
|
notify-send "Theme and Wallpaper updated" "With image $newwall"
|
2023-08-17 14:59:28 +00:00
|
|
|
|
2023-08-20 09:46:46 +00:00
|
|
|
echo "DONE!"
|