luca-awesome-dotfiles/home/.local/bin/scripts/chwall
2022-11-22 13:25:44 +01:00

20 lines
658 B
Bash
Executable file

#!/bin/sh
# Wallpaper Directory :
walldir="/mnt/Data/Pictures/Wallpaper/"
# Choose Wallpaper Dirs :
chosen="$(echo -e "$(ls $walldir | rofi -dmenu -i -selected-row 1 -p "Choose a Dir :" )")"
# Choose Wallpaper :
chosenwall="$(echo -e "$(ls $walldir$chosen/ | rofi -dmenu -i -selected-row 1 -p "Choose a Wallpaper :" )")"
# Set Wallpaper :
wallset=$(feh --bg-fill "$walldir$chosen/$chosenwall")
#echo "feh --bg-fill $walldir$chosen/$chosenwall &" >> ~/.xprofile
# xprofile :
sed -i "/\# Wallpaper :/a feh --bg-fill $walldir$chosen/$chosenwall &" ~/.xprofile
# xinitrc :
sed -i "/\# Wallpaper :/a feh --bg-fill $walldir$chosen/$chosenwall &" ~/.xinitrc