mirror of
http://github.com/JaeUs3792/dotfiles
synced 2025-12-13 23:51:34 +09:00
25 lines
645 B
Bash
Executable File
25 lines
645 B
Bash
Executable File
#!/bin/bash
|
|
wal_dir1=~/walls/normal
|
|
wal_dir2=~/walls/normal
|
|
|
|
# random wallpaper
|
|
files=()
|
|
while IFS= read -r -d $'\0'; do
|
|
files+=("$REPLY")
|
|
done < <(find $wal_dir1 -type f -name "*" -print0)
|
|
randomfile=$(printf "%s\n" "${files[RANDOM % ${#files[@]}]}")
|
|
echo $randomfile
|
|
|
|
hyprctl hyprpaper preload $randomfile
|
|
hyprctl hyprpaper wallpaper "DP-3,$randomfile"
|
|
|
|
files=()
|
|
while IFS= read -r -d $'\0'; do
|
|
files+=("$REPLY")
|
|
done < <(find $wal_dir2 -type f -name "*" -print0)
|
|
randomfile=$(printf "%s\n" "${files[RANDOM % ${#files[@]}]}")
|
|
echo $randomfile
|
|
hyprctl hyprpaper preload $randomfile
|
|
hyprctl hyprpaper wallpaper "HDMI-A-1,$randomfile"
|
|
|