Rice laptop
This commit is contained in:
		| @@ -10,7 +10,7 @@ if ! [ -d "$WALLPAPER_DIR" ]; then | ||||
|     exit 1 | ||||
| fi | ||||
|  | ||||
| wallpaper_path=$(find "$WALLPAPER_DIR" -mindepth 1 | sort -R | tail -n 1) | ||||
| wallpaper_path=$(find "$WALLPAPER_DIR" -mindepth 1 | grep png| sort -R | tail -n 1) | ||||
|  | ||||
| if [ -z "$wallpaper_path" ]; then | ||||
|     echo "Unable to find wallpaper" | ||||
| @@ -26,6 +26,13 @@ echo "setting $wallpaper_path as wallpaper" | ||||
| hyprctl hyprpaper unload all | ||||
| hyprctl hyprpaper preload "$wallpaper_path" | ||||
|  | ||||
| if command -v wal &> /dev/null; then | ||||
|     wal -i "$wallpaper_path" | ||||
| fi | ||||
|  | ||||
| unlink "$WALLPAPER_DIR/current" || true | ||||
| ln -s "$wallpaper_path" "$WALLPAPER_DIR/current" | ||||
|  | ||||
| for monitor in $(hyprctl monitors | grep 'Monitor' | awk '{ print $2 }'); do | ||||
|     hyprctl hyprpaper wallpaper "$monitor,$wallpaper_path" | ||||
| done | ||||
|   | ||||
		Reference in New Issue
	
	Block a user