chore: clean up swaylock-bg script

This commit is contained in:
teutat3s 2023-11-20 18:47:00 +01:00
parent ac4144facd
commit d7acdc4820
Signed by: teutat3s
GPG key ID: 4FA1D3FA524F22C1

View file

@ -2,17 +2,10 @@ self:
with self; '' with self; ''
# Dependencies: # Dependencies:
# swaylock # swaylock
# Make sure we aren't running twice
RUNNING=$(${procps}/bin/pgrep -c ${swaylock}/bin/swaylock)
if [ "$RUNNING" -ne 0 ]; then
exit 0
fi
IMAGE="$XDG_CONFIG_HOME/wallpaper.jpg" IMAGE="$XDG_CONFIG_HOME/wallpaper.jpg"
LOCKARGS="" LOCKARGS=""
for OUTPUT in $(${sway}/bin/swaymsg -t get_outputs | ${jq}/bin/jq -r '.[].name') for OUTPUT in $(${sway}/bin/swaymsg --type get_outputs | ${jq}/bin/jq --raw-output '.[].name')
do do
LOCKARGS="''${LOCKARGS} --image ''${OUTPUT}:''${IMAGE}" LOCKARGS="''${LOCKARGS} --image ''${OUTPUT}:''${IMAGE}"
done done