diff --git a/bin/swaylock-blur b/bin/swaylock-blur new file mode 100755 index 0000000..a113f07 --- /dev/null +++ b/bin/swaylock-blur @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +LOCK=~/.config/sway/lock.png + +# go over each output and ss/blur then add to img +for OUTPUT in $(swaymsg -t get_outputs | gojq '.[].name' | tr -d '"') +do + IMAGE="${OUTPUT}_img.jpg" + grim -t jpeg -o $OUTPUT $IMAGE + convert $IMAGE -blur 5x3 - | composite -gravity center $LOCK - $IMAGE + LOCKARGS="${LOCKARGS} --image ${OUTPUT}:${IMAGE}" + IMAGES="${IMAGES} ${IMAGE}" +done + +swaylock $LOCKARGS +rm $IMAGES diff --git a/bin/wallpaper.sh b/bin/wallpaper.sh index dc62239..48c0b96 100755 --- a/bin/wallpaper.sh +++ b/bin/wallpaper.sh @@ -5,20 +5,16 @@ finder="rofi-dmenu Wallpaper" cd "$wallpapers_dir" -# fzf selector -if [ "$1" == '-s' ] ; then - # follows links and omits the env file +if [ "$1" == "-s" ] ; then selection=$(find -L -type f -printf '%P\n' | $finder) if [ -n "$selection" ] ; then - # didnt exit - swaybg --mode fill -i "$selection" + # didnt exit, overwrite wallpaper + ln -sf "$wallpapers_dir/$selection" "$HOME/.wallpaper" fi fi -# feh slideshow selector -if [ "$1" == '-p' ] ; then - # follows links and omits the env file - # find -L -type f -printf '%P\n' | feh -A "echo '%f';" - echo "BROKEN">&2 - exit 1 -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