bin: update lock/suspend
This commit is contained in:
parent
a39887e8c1
commit
a935771610
3 changed files with 5 additions and 3 deletions
BIN
bin/lock.png
Normal file
BIN
bin/lock.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
|
@ -1,10 +1,11 @@
|
|||
#!/bin/bash
|
||||
source $HOME/.config/sway/bin/sway_helpers
|
||||
IMAGE=$HOME/.lockscreen.jpg
|
||||
LOCK_IMAGE=$HOME/.config/sway/bin/lock.png
|
||||
SCROT_APP=grim
|
||||
SCROT_ARGS=" -t jpeg"
|
||||
LOCK_APP=swaylock
|
||||
LOCK_ARGS=" -f -c 000000 -i $IMAGE"
|
||||
LOCK_ARGS=" -f -F -e -c 000000 --indicator-radius 100 --indicator-thickness 20 -i $IMAGE"
|
||||
INHIBIT_FILE=$HOME/.inhibit_lock
|
||||
|
||||
function _clean() {
|
||||
|
@ -27,6 +28,7 @@ function _on() {
|
|||
function _screenshot() {
|
||||
$SCROT_APP $SCROT_ARGS $IMAGE
|
||||
convert -blur 4x4 $IMAGE $IMAGE
|
||||
convert -composite -gravity center $IMAGE $LOCK_IMAGE $IMAGE
|
||||
}
|
||||
|
||||
## main
|
||||
|
@ -35,7 +37,7 @@ _check_app $LOCK_APP
|
|||
_check_app $SCROT_APP
|
||||
|
||||
case "$1" in
|
||||
inhibit)
|
||||
i*)
|
||||
_set_inhibit $INHIBIT_FILE $2
|
||||
;;
|
||||
lock)
|
||||
|
|
|
@ -32,7 +32,7 @@ function _suspend() {
|
|||
_log SUSPEND INFO args: $*
|
||||
|
||||
case $1 in
|
||||
inhibit)
|
||||
i*)
|
||||
_set_inhibit $INHIBIT_FILE $2
|
||||
;;
|
||||
suspend)
|
||||
|
|
Loading…
Reference in a new issue