From d1210eff48f9f6d5e226ff9cf225638536107361 Mon Sep 17 00:00:00 2001 From: Frodd Date: Fri, 29 Aug 2025 11:13:23 +0100 Subject: [PATCH] add randomiser for wallpapers hyprpaper --- hyprpaper/.config/hypr/hyprpaper.conf | 2 ++ nvim/.config/nvim/lazy-lock.json | 2 +- scripts/.config/scripts/random-hyprpaper.sh | 10 ++++++++++ 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100755 scripts/.config/scripts/random-hyprpaper.sh diff --git a/hyprpaper/.config/hypr/hyprpaper.conf b/hyprpaper/.config/hypr/hyprpaper.conf index b6cc622..23daab1 100644 --- a/hyprpaper/.config/hypr/hyprpaper.conf +++ b/hyprpaper/.config/hypr/hyprpaper.conf @@ -1,2 +1,4 @@ preload = ~/.config/backgrounds/shaded.png wallpaper = , ~/.config/backgrounds/shaded.png + +ipc = on diff --git a/nvim/.config/nvim/lazy-lock.json b/nvim/.config/nvim/lazy-lock.json index 5cd1f0c..f4b37ae 100644 --- a/nvim/.config/nvim/lazy-lock.json +++ b/nvim/.config/nvim/lazy-lock.json @@ -9,7 +9,7 @@ "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, "nvim-lspconfig": { "branch": "master", "commit": "cb33dea610b7eff240985be9f6fe219920e630ef" }, "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, - "nvim-web-devicons": { "branch": "master", "commit": "4ae47f4fb18e85b80e84b729974fe65483b06aaf" }, + "nvim-web-devicons": { "branch": "master", "commit": "f66cdfef5e84112045b9ebc3119fee9bddb3c687" }, "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, "render-markdown.nvim": { "branch": "main", "commit": "f626e90bbc4b3d8f4fd29c909d958b165af13f4a" }, "snacks.nvim": { "branch": "main", "commit": "bc0630e43be5699bb94dadc302c0d21615421d93" }, diff --git a/scripts/.config/scripts/random-hyprpaper.sh b/scripts/.config/scripts/random-hyprpaper.sh new file mode 100755 index 0000000..42dc362 --- /dev/null +++ b/scripts/.config/scripts/random-hyprpaper.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +WALLPAPER_DIR="$HOME/.config/backgrounds/" +CURRENT_WALL=$(hyprctl hyprpaper listloaded) + +# Get a random wallpaper that is not the current one +WALLPAPER=$(find "$WALLPAPER_DIR" -type f ! -name "$(basename "$CURRENT_WALL")" | shuf -n 1) + +# Apply the selected wallpaper +hyprctl hyprpaper reload ,"$WALLPAPER"