Added logs
This commit is contained in:
parent
b85260739e
commit
5d0f798109
@ -55,6 +55,9 @@ do
|
|||||||
install -d -m755 "$HOME/.config/termite"
|
install -d -m755 "$HOME/.config/termite"
|
||||||
install -m644 -v /tmp/i3config/tmp/termite "$HOME/.config/termite/config"
|
install -m644 -v /tmp/i3config/tmp/termite "$HOME/.config/termite/config"
|
||||||
|
|
||||||
|
printf '%b%s%b%s%b\n' '\e[1;32m' '==> ' '\e[0m\033[1m' 'Make log directory...' '\e[m'
|
||||||
|
install -d -m755 "$HOME/.config/i3/logs/"
|
||||||
|
|
||||||
# clean up temp files
|
# clean up temp files
|
||||||
rm -rf /tmp/i3config/
|
rm -rf /tmp/i3config/
|
||||||
}
|
}
|
||||||
|
@ -3,10 +3,32 @@ revert() {
|
|||||||
rm /tmp/*screen*.png
|
rm /tmp/*screen*.png
|
||||||
xset dpms 0 0 0
|
xset dpms 0 0 0
|
||||||
}
|
}
|
||||||
|
|
||||||
trap revert HUP INT TERM
|
trap revert HUP INT TERM
|
||||||
xset +dpms dpms 0 0 5
|
|
||||||
scrot -d 1 /tmp/locking_screen.png
|
if [[ $(command -v xset) ]]; then
|
||||||
convert -blur 0x8 /tmp/locking_screen.png /tmp/screen_blur.png
|
xset +dpms dpms 0 0 5
|
||||||
convert -composite /tmp/screen_blur.png "$HOME/.config/i3/images/imagelock.png" -gravity South -geometry -20x1200 /tmp/screen.png
|
else
|
||||||
i3lock -i /tmp/screen.png
|
echo 'xset command not found' >> "$HOME/.config/i3/logs/xset-log-$(date +'%F-%k-%M-%S').log" 2>&1 # debug
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $(command -v scrot) ]]; then
|
||||||
|
scrot -d 1 /tmp/locking_screen.png
|
||||||
|
else
|
||||||
|
echo 'scrot is not installed' >> "$HOME/.config/i3/logs/scrot-log-$(date +'%F-%k-%M-%S').log" 2>&1 # debug
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $(command -v convert) ]]; then
|
||||||
|
convert -blur 0x8 /tmp/locking_screen.png /tmp/screen_blur.png
|
||||||
|
convert -composite /tmp/screen_blur.png "$HOME/.config/i3/images/imagelock.png" -gravity South -geometry -20x1200 /tmp/screen.png
|
||||||
|
else
|
||||||
|
echo 'convert command not found' >> "$HOME/.config/i3/logs/convert-log-$(date +'%F-%k-%M-%S').log" 2>&1 # debug
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $(command -v i3lock) ]]; then
|
||||||
|
i3lock -i /tmp/screen.png
|
||||||
|
else
|
||||||
|
echo 'i3lock is not installed' >> "$HOME/.config/i3/logs/i3lock-log-$(date +'%F-%k-%M-%S').log" 2>&1 # debug
|
||||||
|
fi
|
||||||
|
|
||||||
revert "$@"
|
revert "$@"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user