From 80661d4f8615bd581a769aecf87227dcd1395773 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Mon, 19 May 2025 22:40:06 +0200 Subject: [PATCH] wallpaper switcher: prompt video dep installation thru notif --- .config/quickshell/scripts/switchwall.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.config/quickshell/scripts/switchwall.sh b/.config/quickshell/scripts/switchwall.sh index 38f2684a3..f04ef44d5 100755 --- a/.config/quickshell/scripts/switchwall.sh +++ b/.config/quickshell/scripts/switchwall.sh @@ -104,7 +104,19 @@ switch() { fi if [ ${#missing_deps[@]} -gt 0 ]; then echo "Missing deps: ${missing_deps[*]}" - echo "Arch: yay -S ${missing_deps[*]}" + echo "Arch: sudo pacman -S ${missing_deps[*]}" + action=$(notify-send \ + -a "Wallpaper Switcher" \ + -c "im.error" \ + -A "install_arch=Install (Arch)" \ + "Can't switch to video wallpaper" \ + "Missing dependencies: ${missing_deps[*]}") + if [[ "$action" == "install_arch" ]]; then + foot sudo pacman -S "${missing_deps[*]}" + if command -v mpvpaper &>/dev/null && command -v ffmpeg &>/dev/null; then + notify-send 'Wallpaper switcher' 'Alright, try again!' + fi + fi exit 0 fi