You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
524 B
Bash
21 lines
524 B
Bash
#!/bin/bash
|
|
|
|
wallpapers_dir=~/.local/share/wallpapers
|
|
finder="rofi-dmenu Wallpaper"
|
|
|
|
cd "$wallpapers_dir"
|
|
|
|
if [ "$1" == "-s" ] ; then
|
|
selection=$(find -L -type f -printf '%P\n' | $finder)
|
|
if [ -n "$selection" ] ; then
|
|
# didnt exit, overwrite wallpaper
|
|
ln -sf "$wallpapers_dir/$selection" "$HOME/.wallpaper"
|
|
fi
|
|
fi
|
|
|
|
# fill in wallpaper on each dispaly
|
|
for display in $(swaymsg -t get_outputs | gojq '.[].name' | tr -d '"')
|
|
do
|
|
swaymsg output "$display" bg "$HOME/.wallpaper" fill '#000000'
|
|
done
|