neodotfiles/new-config/.config/rofi/scripts/rofi_wall
2023-04-23 20:01:47 -04:00

24 lines
588 B
Bash
Executable file

#!/usr/bin/env bash
# ***This script was made by Clay Gomera (Drake)***
# - Description: A simple wallpaper changer script
# - Dependencies: rofi, fd, swaybg
## MENU PROMPT ##
menu="rofi -dmenu -i -p"
## WALLPAPER DIRECTORY ##
walldir="$HOME/Pictures/Wallpapers" # wallpapers folder, change it to yours
## SELECT PICTURE ##
cd "$walldir" || exit 1
wallpaper=$(fd -p "$walldir" | $menu " 󰋩 Wallpaper Selector ")
if [ "$wallpaper" ]; then
chosenwall=$wallpaper
else
exit 0
fi
swww img "$chosenwall"
echo -e "#!/bin/sh\nswww img $walldir/$chosenwall" > "$HOME/.wbg"
exit 0