12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- version=1.0
- if [[ "$#" -ge 2 ]]; then
- echo "Usage: $0 {-v, --version | -h --help}"
- exit 0
- elif [[ "$#" -eq 1 ]]; then
- case $1 in
- -v | --version)
- echo "$0 - Version $version"
- exit 0;;
- -h | --help)
- echo "This is a simple program that blurs the current screen and uses it as a screensaver. scrot and i3lock have to be installed in order to make it work."
- echo "- v, --version Display current version"
- echo "-h, --help Display this message"
- exit 0;;
- *)
- echo "Usage: $0 {-v, --version | -h, --help}"
- exit 2;;
- esac
- fi
- if [ -f /bin/scrot -a -f /bin/i3lock ]; then
- scrot /tmp/screenshot.png
- convert /tmp/screenshot.png -blur 0x5 /tmp/screenshotblur.png
- i3lock -f -i /tmp/screenshotblur.png
- else
- echo "i3lock and/or scrot are not installed. Please install them."
- exit 2
- fi
|