mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-22 16:23:55 -05:00
hyprpaper: add dynamic multimonitor support
This commit is contained in:
parent
4a1a587353
commit
5e0b3a3d0e
|
@ -6,12 +6,12 @@
|
||||||
}: let
|
}: let
|
||||||
hyprpaper-random = pkgs.writeShellScriptBin "hyprpaper-random" ''
|
hyprpaper-random = pkgs.writeShellScriptBin "hyprpaper-random" ''
|
||||||
directory=${config.home.homeDirectory}/.local/share/backgrounds
|
directory=${config.home.homeDirectory}/.local/share/backgrounds
|
||||||
monitor=`hyprctl monitors | grep Monitor | awk '{print $2}'`
|
|
||||||
|
|
||||||
if [ -d "$directory" ]; then
|
if [ -d "$directory" ]; then
|
||||||
while true; do
|
while true; do
|
||||||
sleep 30
|
sleep 30
|
||||||
hyprctl hyprpaper unload all
|
hyprctl hyprpaper unload all
|
||||||
|
monitor=`hyprctl monitors | grep Monitor | awk '{print $2}'`
|
||||||
for m in ''${monitor[@]}; do
|
for m in ''${monitor[@]}; do
|
||||||
random_background=$(ls $directory/*.{png,jpg} | shuf -n 1)
|
random_background=$(ls $directory/*.{png,jpg} | shuf -n 1)
|
||||||
hyprctl hyprpaper preload $random_background
|
hyprctl hyprpaper preload $random_background
|
||||||
|
|
Loading…
Reference in a new issue