dgy
/
hexagons
Archived
1
0
Fork 0
This repository has been archived on 2021-03-24. You can view files and clone it, but cannot push or open issues or pull requests.
hexagons/bin/exeflock4

80 lines
1.4 KiB
Plaintext
Raw Normal View History

2018-08-23 19:00:30 +00:00
#!/usr/bin/env bash
2017-09-04 19:19:36 +00:00
dunst() {
pkill -0 --exact dunst || return 0
case ${1:-} in
stop)
pkill -USR1 --euid "$(id -u)" --exact dunst
;;
resume)
pkill -USR2 --euid "$(id -u)" --exact dunst
;;
*)
echo "dunst argument required: stop or resume"
return 1
;;
esac
}
2018-05-02 02:30:43 +00:00
dunst stop
2017-09-04 19:19:36 +00:00
2018-07-21 04:46:57 +00:00
# lock colors
c0='#00000000' # clear
2018-08-23 19:00:30 +00:00
c1='#000000ff' # black
c2='#FABD2F88'
c3='#FB493488'
c4='#EBDBB2FF'
2018-07-21 04:46:57 +00:00
c5='#00d70000'
2018-08-23 19:00:30 +00:00
c6='#28282888'
c7='#282828FF'
2018-07-21 04:46:57 +00:00
c8='#eeeeecff'
c9='#12121200'
cA='#c4a000ff'
2018-08-23 19:00:30 +00:00
lock="$HOME/Pictures/barlock.png"
image=$(mktemp --suffix=.png)
trap 'rm -f "$image"' SIGINT SIGTERM EXIT
maim -u \
| convert png:- -scale 10% -scale 1000% \
"$lock" -gravity center -composite -matte "$image"
2018-05-02 02:30:43 +00:00
i3lock \
2018-08-23 19:00:30 +00:00
--image="$image" \
2018-07-21 04:46:57 +00:00
--insidevercolor=$c2 \
--insidewrongcolor=$c3 \
--insidecolor=$c0 \
2018-08-23 19:00:30 +00:00
--ringvercolor=$c7 \
--ringwrongcolor=$c7 \
2018-07-21 04:46:57 +00:00
--ringcolor=$c7 \
--verifcolor=$c8 \
--wrongcolor=$c4 \
2018-08-23 19:00:30 +00:00
--linecolor=$c4 \
--separatorcolor=$c7 \
--keyhlcolor=$c4 \
--bshlcolor=$c3 \
--timecolor=$c4 \
--datecolor=$c0 \
--layoutcolor=$c0 \
--indpos='x+73:y+514' \
--timepos='x+210:y+525' \
--timestr='%H:%M' \
--time-font='Sarasa UI J' \
--force-clock \
--refresh-rate=30 \
--radius=32 \
--ring-width=4 \
--veriftext='' \
--wrongtext='' \
--noinputtext='' \
2018-07-21 04:46:57 +00:00
--ignore-empty-password \
--nofork &
2017-09-04 19:19:36 +00:00
2018-05-02 02:30:43 +00:00
pid="$!"
while 2>/dev/null kill -0 "$pid"; do
sleep 1
done
2017-09-04 19:19:36 +00:00
2018-05-02 02:30:43 +00:00
dunst resume