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
|
||||
|
||||
# Make sure we aren't running twice
|
||||
RUNNING=$(ps -A | grep swaylock | wc -l)
|
||||
if [ $RUNNING -ne 0 ]; then
|
||||
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=""
|
||||
|
||||
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
|
||||
LOCKARGS="''${LOCKARGS} --image ''${OUTPUT}:''${IMAGE}"
|
||||
IMAGES="''${IMAGES} ''${IMAGE}"
|
||||
done
|
||||
exec ${swaylock}/bin/swaylock $LOCKARGS
|
||||
''
|
||||
|
|
Loading…
Reference in a new issue