You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
417 B

#!/bin/bash
SCRIPTS_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
source $SCRIPTS_DIR/config.sh
directory=$WALLPAPER_DIR
monitor=`hyprctl monitors | grep Monitor | awk '{print $2}'`
if [ -d "$directory" ]; then
background=$(ls $directory/$1*)
hyprctl hyprpaper unload all
hyprctl hyprpaper preload $background
hyprctl hyprpaper wallpaper "$monitor, $background"
fi
exit