add randomiser for wallpapers hyprpaper
This commit is contained in:
@@ -1,2 +1,4 @@
|
||||
preload = ~/.config/backgrounds/shaded.png
|
||||
wallpaper = , ~/.config/backgrounds/shaded.png
|
||||
|
||||
ipc = on
|
||||
|
||||
@@ -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" },
|
||||
|
||||
10
scripts/.config/scripts/random-hyprpaper.sh
Executable file
10
scripts/.config/scripts/random-hyprpaper.sh
Executable file
@@ -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"
|
||||
Reference in New Issue
Block a user