add i3 configuration
This commit is contained in:
31
tree/.local/bin/i3lock-cool
Executable file
31
tree/.local/bin/i3lock-cool
Executable file
@ -0,0 +1,31 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -x
|
||||
|
||||
# check if i3lock is running
|
||||
if ps -e | grep " i3lock$"; then
|
||||
echo "i3lock is already running!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
OPTIONAL_CMDS="scrot lockscreen-blur"
|
||||
|
||||
for CMD in $OPTIONAL_CMDS; do
|
||||
echo "checking $CMD"
|
||||
if ! command -v "$CMD" &> /dev/null
|
||||
then
|
||||
echo "$CMD could not be found, falling back to basic mode."
|
||||
|
||||
i3lock -c 302f3b "$@"
|
||||
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
|
||||
TMP_IMG="/tmp/lock.png"
|
||||
|
||||
scrot - | lockscreen-blur -o "$TMP_IMG" -b 20 --stamp ~/.config/sway/ferris-stamp.png
|
||||
|
||||
i3lock -nef --image="$TMP_IMG" "$@"
|
||||
|
||||
rm "$TMP_IMG"
|
||||
Reference in New Issue
Block a user