]> git.sev.monster Git - dotfiles.git/blame - bin/l
fixed urxvt url matcher regex
[dotfiles.git] / bin / l
CommitLineData
de6b1600 1#!/bin/sh
2
3# term lock
4if [ -z "$DISPLAY" ]; then
5 lock -npv
6 exit
7fi
8
9# xorg lock
10img=~/tmp/lock.png
11if [ -f "$img" ]; then
12 # rudimentary attempt to prevent multiple locks
13 # XXX: could block lock and replace with malicious locker
14 echo "Lock file exists at '$img', exiting"
15 exit 1
16fi
17res="$(xdpyinfo | grep dimensions | awk '{print $2}')"
18scale=0.07
19ffmpeg -y -loglevel 0 \
20 -s "$res" -f x11grab -i $DISPLAY -i ~/share/l/overlay.png \
21 -filter_complex "
22 [0]
23 scale=iw * $scale:ih * $scale,
24 noise=alls=2,
25 scale=`echo $res | tr x :`:flags=neighbor,
26 noise=alls=5,
27 gblur=8
28 [composite];
29 [composite]
30 [1] overlay=x=(main_w - overlay_w) / 2 + 0.5:
31 y=(main_h - overlay_h) / 2
32 [out]" \
33 -map "[out]" -vframes 1 "$img"
34# pause dunst
35killall -USR1 dunst
36i3lock -nefi "$img"
37rm "$img"
38killall -USR2 dunst
This page took 0.153265 seconds and 4 git commands to generate.