Fix swaylock-bg, now a bash script
- reference jq from pkgs - shellcheck fixes
This commit is contained in:
parent
b7ba1b7ba9
commit
d563b1d469
|
@ -3,18 +3,17 @@ self: with self; ''
|
||||||
# swaylock
|
# swaylock
|
||||||
|
|
||||||
# Make sure we aren't running twice
|
# Make sure we aren't running twice
|
||||||
RUNNING=$(ps -A | grep swaylock | wc -l)
|
RUNNING=$(${procps}/bin/pgrep -c ${swaylock}/bin/swaylock)
|
||||||
if [ $RUNNING -ne 0 ]; then
|
if [ "$RUNNING" -ne 0 ]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
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 -r '.[].name'`
|
for OUTPUT in $(${sway}/bin/swaymsg -t get_outputs | ${jq}/bin/jq -r '.[].name')
|
||||||
do
|
do
|
||||||
LOCKARGS="''${LOCKARGS} --image ''${OUTPUT}:''${IMAGE}"
|
LOCKARGS="''${LOCKARGS} --image ''${OUTPUT}:''${IMAGE}"
|
||||||
IMAGES="''${IMAGES} ''${IMAGE}"
|
|
||||||
done
|
done
|
||||||
exec ${swaylock}/bin/swaylock $LOCKARGS
|
exec ${swaylock}/bin/swaylock $LOCKARGS
|
||||||
''
|
''
|
||||||
|
|
Loading…
Reference in a new issue