Hyprland-dotfiles/scripts/updatewal.sh

48 lines
1.7 KiB
Bash
Raw Normal View History

2023-03-09 03:25:31 -05:00
#!/bin/bash
# ____ _ _____ _
# / ___| |__ __ _ _ __ __ _ ___ |_ _| |__ ___ _ __ ___ ___
# | | | '_ \ / _` | '_ \ / _` |/ _ \ | | | '_ \ / _ \ '_ ` _ \ / _ \
# | |___| | | | (_| | | | | (_| | __/ | | | | | | __/ | | | | | __/
# \____|_| |_|\__,_|_| |_|\__, |\___| |_| |_| |_|\___|_| |_| |_|\___|
# |___/
#
# by Stephan Raabe (2023)
# -----------------------------------------------------
2023-02-09 04:27:03 -05:00
2023-03-06 11:55:42 -05:00
echo "Changing theme..."
2023-04-08 10:26:43 -04:00
2023-08-20 05:46:46 -04:00
# -----------------------------------------------------
2023-02-09 04:27:03 -05:00
# Update Wallpaper with pywal
2023-08-20 05:46:46 -04:00
# -----------------------------------------------------
2023-03-06 11:55:42 -05:00
wal -q -i ~/wallpaper/
2023-02-09 04:27:03 -05:00
2023-08-20 05:46:46 -04:00
# -----------------------------------------------------
2023-02-09 04:27:03 -05:00
# Wait for 1 sec
2023-08-20 05:46:46 -04:00
# -----------------------------------------------------
2023-02-09 04:27:03 -05:00
sleep 1
2023-08-20 05:46:46 -04:00
# -----------------------------------------------------
2023-02-09 04:27:03 -05:00
# Reload qtile to color bar
2023-08-20 05:46:46 -04:00
# -----------------------------------------------------
2023-02-09 04:27:03 -05:00
qtile cmd-obj -o cmd -f reload_config
2023-08-20 05:46:46 -04:00
# -----------------------------------------------------
2023-04-08 10:26:43 -04:00
# Get new theme
2023-08-20 05:46:46 -04:00
# -----------------------------------------------------
2023-04-08 10:26:43 -04:00
source "$HOME/.cache/wal/colors.sh"
2023-04-11 04:27:01 -04:00
newwall=$(echo $wallpaper | sed "s|$HOME/wallpaper/||g")
2023-10-02 04:51:16 -04:00
# -----------------------------------------------------
# Copy selected wallpaper into .cache folder
# -----------------------------------------------------
cp $wallpaper ~/.cache/current_wallpaper.jpg
2023-09-18 16:13:15 -04:00
sleep 1
2023-04-10 11:04:46 -04:00
2023-08-20 05:46:46 -04:00
# -----------------------------------------------------
2023-04-08 10:26:43 -04:00
# Send notification
2023-08-20 05:46:46 -04:00
# -----------------------------------------------------
2023-09-20 07:56:57 -04:00
notify-send "Colors and Wallpaper updated" "with image $newwall"
2023-04-08 10:26:43 -04:00
2023-03-06 11:55:42 -05:00
echo "Done."