Browse Source

Use pipes instead of a temporary file in lock.sh

Frans Bergman 4 years ago
parent
commit
2f4d1c8c9c
1 changed files with 2 additions and 4 deletions
  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