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
|
#!/bin/bash
|
||||||
source $HOME/.config/sway/bin/sway_helpers
|
source $HOME/.config/sway/bin/sway_helpers
|
||||||
IMAGE=$HOME/.lockscreen.jpg
|
IMAGE=$HOME/.lockscreen.jpg
|
||||||
|
LOCK_IMAGE=$HOME/.config/sway/bin/lock.png
|
||||||
SCROT_APP=grim
|
SCROT_APP=grim
|
||||||
SCROT_ARGS=" -t jpeg"
|
SCROT_ARGS=" -t jpeg"
|
||||||
LOCK_APP=swaylock
|
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
|
INHIBIT_FILE=$HOME/.inhibit_lock
|
||||||
|
|
||||||
function _clean() {
|
function _clean() {
|
||||||
|
@ -27,6 +28,7 @@ function _on() {
|
||||||
function _screenshot() {
|
function _screenshot() {
|
||||||
$SCROT_APP $SCROT_ARGS $IMAGE
|
$SCROT_APP $SCROT_ARGS $IMAGE
|
||||||
convert -blur 4x4 $IMAGE $IMAGE
|
convert -blur 4x4 $IMAGE $IMAGE
|
||||||
|
convert -composite -gravity center $IMAGE $LOCK_IMAGE $IMAGE
|
||||||
}
|
}
|
||||||
|
|
||||||
## main
|
## main
|
||||||
|
@ -35,7 +37,7 @@ _check_app $LOCK_APP
|
||||||
_check_app $SCROT_APP
|
_check_app $SCROT_APP
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
inhibit)
|
i*)
|
||||||
_set_inhibit $INHIBIT_FILE $2
|
_set_inhibit $INHIBIT_FILE $2
|
||||||
;;
|
;;
|
||||||
lock)
|
lock)
|
||||||
|
|
|
@ -32,7 +32,7 @@ function _suspend() {
|
||||||
_log SUSPEND INFO args: $*
|
_log SUSPEND INFO args: $*
|
||||||
|
|
||||||
case $1 in
|
case $1 in
|
||||||
inhibit)
|
i*)
|
||||||
_set_inhibit $INHIBIT_FILE $2
|
_set_inhibit $INHIBIT_FILE $2
|
||||||
;;
|
;;
|
||||||
suspend)
|
suspend)
|
||||||
|
|
Loading…
Reference in a new issue