Commit cddee238 authored by Sadman Kazi's avatar Sadman Kazi 🎸

Add working lock script

parent ba0c9906
......@@ -200,7 +200,7 @@ assign [class="Chromium"] $ws10
#workspace $ws2 gaps outer 100
# lock the screen
bindsym $mod+x exec "i3lock -i $HOME/Pictures/wallpaper.jpg"
bindsym $mod+x exec "~/.i3/scripts/lock.sh"
# reload the configuration file
bindsym $mod+Shift+c reload
......
#!/bin/bash
scrot /tmp/screen.png
convert /tmp/screen.png -scale 10% -scale 1000% /tmp/screen.png
[[ -f $1 ]] && convert /tmp/screen.png $1 -gravity center -composite -matte /tmp/screen.png
dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Stop
i3lock -u -i /tmp/screen.png
rm /tmp/screen.png
TMPBG=/tmp/screen.png
LOCK=$HOME/.i3/res/lock.png
RES=1920x1080
ffmpeg -f x11grab -video_size $RES -y -i $DISPLAY -i $LOCK -filter_complex "boxblur=5:1,overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2" -vframes 1 $TMPBG
i3lock -u -i $TMPBG
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment