neodotfiles/user/.local/bin/rs_wall
2023-10-22 08:18:23 -04:00

21 lines
656 B
Bash
Executable file

#!/usr/bin/env bash
# ***This script was made by Clay Gomera (Drake)***
# - Description: A simple wallpaper changer script for rofi/dmenu/wofi
# - Dependencies: {rofi||dmenu||wofi}, fd, swaybg
## WALLPAPER DIRECTORY ##
walldir="$XDG_PICTURES_DIR/Wallpapers" # wallpapers folder, change it to yours
## SELECT PICTURE ##
cd "$walldir" || exit 1
wallpaper=$(fd -p "$walldir" | "$RUNNER" -l 5 -i -p "󰋩 Wallpaper Selector")
if [ -n "$wallpaper" ]; then
pkill wbg
wbg "$wallpaper" &
echo -e "#!/bin/sh\npkill wbg\nwbg $walldir/$wallpaper &" > "$HOME/.config/suckless/wall"
chmod +x "$HOME/.config/suckless/wall"
else
exit 0
fi
exit 0