From b289393d41509971934e6ce2b8edd90d20d34175 Mon Sep 17 00:00:00 2001 From: "Matthieu Fortin [CPC/CCP]" Date: Mon, 18 Nov 2024 14:55:19 -0500 Subject: [PATCH] update --- scripts/.local/bin/wpaperdchanger | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 scripts/.local/bin/wpaperdchanger diff --git a/scripts/.local/bin/wpaperdchanger b/scripts/.local/bin/wpaperdchanger new file mode 100755 index 0000000..4992e2f --- /dev/null +++ b/scripts/.local/bin/wpaperdchanger @@ -0,0 +1,12 @@ +#!/bin/bash +set -euo pipefail + +directory=~/Pictures/wallpapers +#wallpaper=~/.cache/images/wallpaper.png +#monitor=$(hyprctl monitors | grep Monitor | awk '{print $2}') + +if [ -d "$directory" ]; then + random_background=$(find $directory -type f | shuf -n 1) + wallpaper "$random_background" + wpaperctl reload-wallpaper +fi