Jelajahi Sumber

Use pipes instead of a temporary file in lock.sh

Frans Bergman 4 tahun lalu
induk
melakukan
2f4d1c8c9c
1 mengubah file dengan 2 tambahan dan 4 penghapusan
  1. 2 4
      .scripts/lock.sh

+ 2 - 4
.scripts/lock.sh

@@ -2,7 +2,5 @@
 
 playerctl pause
 
-scrot /tmp/lock.png
-convert /tmp/lock.png -paint 2 /tmp/lock.png
-i3lock -i /tmp/lock.png
-rm /tmp/lock.png
+SIZE="$(xrandr | awk -F, '/Screen 0/ { print $2 }' | awk '{print $2 "x" $4 }')"
+maim -u | convert - -paint 2 RGB:- | i3lock --raw "$SIZE":rgb -i /dev/stdin