os/pkgs/swaylock-bg.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
350 B
Nix
Raw Permalink Normal View History

self:
with self; ''
# Dependencies:
# swaylock
IMAGE="$XDG_CONFIG_HOME/wallpaper.jpg"
LOCKARGS=""
for OUTPUT in $(${sway}/bin/swaymsg --type get_outputs | ${jq}/bin/jq --raw-output '.[].name')
do
LOCKARGS="''${LOCKARGS} --image ''${OUTPUT}:''${IMAGE}"
done
exec ${swaylock}/bin/swaylock --scaling fill --daemonize $LOCKARGS
''