mirror of
https://git.adityakumar.xyz/betterlockscreen-openrc.git
synced 2024-11-12 11:49:45 +00:00
Add suspend and lock support (#20)
This commit is contained in:
parent
828df2052d
commit
7dd83ed6e9
2 changed files with 71 additions and 0 deletions
30
README.md
30
README.md
|
@ -49,6 +49,8 @@ Make sure you have following packages installed.
|
||||||
* [xrandr](https://www.x.org/wiki/Projects/XRandR/) - depends for xdpyinfo
|
* [xrandr](https://www.x.org/wiki/Projects/XRandR/) - depends for xdpyinfo
|
||||||
* [background.jpg](https://unsplash.com/) - find your fav background image
|
* [background.jpg](https://unsplash.com/) - find your fav background image
|
||||||
|
|
||||||
|
*Note: systemd is required for the suspend feature.*
|
||||||
|
|
||||||
### Arch users
|
### Arch users
|
||||||
|
|
||||||
To install required packages
|
To install required packages
|
||||||
|
@ -154,6 +156,34 @@ betterlockscreen -l dimblur
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
### To suspend system with lockscreen
|
||||||
|
|
||||||
|
Original image as background
|
||||||
|
|
||||||
|
```
|
||||||
|
betterlockscreen -s
|
||||||
|
```
|
||||||
|
|
||||||
|
Use dimmed image as lockscreen background
|
||||||
|
|
||||||
|
```
|
||||||
|
betterlockscreen -s dim
|
||||||
|
```
|
||||||
|
|
||||||
|
Use blurred image as lockscreen background
|
||||||
|
|
||||||
|
```
|
||||||
|
betterlockscreen -s blur
|
||||||
|
```
|
||||||
|
|
||||||
|
Use dim + blurred image as lockscreen background
|
||||||
|
|
||||||
|
```
|
||||||
|
betterlockscreen -s dimblur
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
### To set wallpaper
|
### To set wallpaper
|
||||||
|
|
||||||
Original Image
|
Original Image
|
||||||
|
|
|
@ -132,6 +132,14 @@ case "$1" in
|
||||||
echo " Ex: betterlockscreen -l dimblur (for dimmed + blurred background)"
|
echo " Ex: betterlockscreen -l dimblur (for dimmed + blurred background)"
|
||||||
echo
|
echo
|
||||||
echo
|
echo
|
||||||
|
echo " -s --suspend"
|
||||||
|
echo " to suspend system and lock screen, Ex. betterlockscreen -s"
|
||||||
|
echo " you can also use dimmed or blurred background for lockscreen"
|
||||||
|
echo " Ex: betterlockscreen -s dim (for dimmed background)"
|
||||||
|
echo " Ex: betterlockscreen -s blur (for blurred background)"
|
||||||
|
echo " Ex: betterlockscreen -s dimblur (for dimmed + blurred background)"
|
||||||
|
echo
|
||||||
|
echo
|
||||||
echo " -w --wall"
|
echo " -w --wall"
|
||||||
echo " you can also set lockscreen background as wallpaper"
|
echo " you can also set lockscreen background as wallpaper"
|
||||||
echo " to set wallpaper. Ex betterlockscreen -w or betterlockscreen --wall"
|
echo " to set wallpaper. Ex betterlockscreen -w or betterlockscreen --wall"
|
||||||
|
@ -174,6 +182,39 @@ case "$1" in
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
-s | --suspend)
|
||||||
|
case "$2" in
|
||||||
|
"")
|
||||||
|
# default lockscreen
|
||||||
|
prelock
|
||||||
|
systemctl suspend && lock "$l_resized"
|
||||||
|
postlock
|
||||||
|
;;
|
||||||
|
|
||||||
|
dim)
|
||||||
|
# lockscreen with dimmed background
|
||||||
|
prelock
|
||||||
|
systemctl suspend && lock "$l_dim"
|
||||||
|
postlock
|
||||||
|
;;
|
||||||
|
|
||||||
|
blur)
|
||||||
|
# set lockscreen with blurred background
|
||||||
|
prelock
|
||||||
|
systemctl suspend && lock "$l_blur"
|
||||||
|
postlock
|
||||||
|
;;
|
||||||
|
|
||||||
|
dimblur)
|
||||||
|
# set lockscreen with dimmed + blurred background
|
||||||
|
prelock
|
||||||
|
systemctl suspend && lock "$l_dimblur"
|
||||||
|
postlock
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
|
||||||
|
|
||||||
-w | --wall)
|
-w | --wall)
|
||||||
case "$2" in
|
case "$2" in
|
||||||
"")
|
"")
|
||||||
|
|
Loading…
Reference in a new issue