1
0
mirror of https://github.com/frebib/dotfiles.git synced 2024-06-14 12:57:23 +00:00

i3: replace i3lock with lightdm

This commit is contained in:
Joe Groocock 2018-11-06 15:28:31 +00:00
parent 4cb02a72da
commit add6050146
Signed by: frebib
GPG Key ID: E0B16BEACFBB6A86
3 changed files with 1 additions and 41 deletions

View File

@ -187,7 +187,7 @@ bindsym XF86MonBrightnessDown exec xbacklight -dec 5 && pkill -RTMIN+12 i3bloc
exec --no-startup-id ~/.config/i3/disable-standby-fs.py
exec --no-startup-id "ip monitor | while read; do pkill -RTMIN+15 i3blocks; done"
exec --no-startup-id feh --no-fehbg --no-xinerama --bg-fill ~/pictures/lakesidesunrise.jpg
exec --no-startup-id xautolock -time 5 -locker ~/.config/i3/lock.sh -nocloseout -nocloseerr
exec --no-startup-id xautolock -time 5 -locker 'dm-tool lock' -nocloseout -nocloseerr
# startup programs
exec --no-startup-id pulseaudio

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

View File

@ -1,40 +0,0 @@
#!/usr/bin/env bash
icon="$HOME/.config/i3/lock.png"
tmpbg='/tmp/screen.png'
(( $# )) && { icon=$1; }
PX=0
PY=0
# lockscreen image info
R=$(file $icon | grep -o '[0-9]* x [0-9]*')
RX=$(echo $R | cut -d' ' -f 1)
RY=$(echo $R | cut -d' ' -f 3)
RES=$(xrandr --query | grep ' connected primary' | cut -f4 -d' ')
# monitor position/offset
SRX=$(echo $RES | cut -d'x' -f 1) # x pos
SRY=$(echo $RES | cut -d'x' -f 2 | cut -d'+' -f 1) # y pos
SROX=$(echo $RES | cut -d'x' -f 2 | cut -d'+' -f 2) # x offset
SROY=$(echo $RES | cut -d'x' -f 2 | cut -d'+' -f 3) # y offset
PX=$(($SROX + $SRX/2 - $RX/2))
PY=$(($SROY + $SRY/2 - $RY/2))
# screenshot, pixelise and overlay
maim | convert - -scale 5% -scale 2000% $icon -geometry +$PX+$PY -composite -matte $tmpbg
if command mpc 2>&1 1>/dev/null; then
playing=$(mpc status | grep playing | wc -l)
[[ $playing == 1 ]] && mpc pause
fi
i3lock -i "$tmpbg" -n -e
if command mpc 2>&1 1>/dev/null; then
[[ $playing == 1 ]] && mpc play
fi
rm "$tmpbg"