dotfiles/.config/rofi/wallpaper_selector.sh

11 lines
332 B
Bash
Executable file

#!/bin/bash
WALLPAPER_DIR="/mnt/data/Wallpapers"
WALLPAPERS=$(find "$WALLPAPER_DIR" -type f \( -iname "*.jpg" -o -iname "*.png" -o -iname "*.jpeg" \))
SELECTED_WALLPAPER=$(echo "$WALLPAPERS" | rofi -dmenu -i -p "Select Wallpaper:")
if [ -n "$SELECTED_WALLPAPER" ]; then
fish -c "swww_set_wallpaper '$SELECTED_WALLPAPER'"
fi