neodotfiles/new-config/.config/rofi/scripts/rofi_wall

25 lines
588 B
Text
Raw Normal View History

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