Skip to content

Commit e1251b7

Browse files
AUTplayedpavanjadhaw
authored andcommitted
shortened and imo improved Readme (betterlockscreen#26)
related to betterlockscreen#25 and adds documentation for betterlockscreen#21
1 parent 4c938cb commit e1251b7

File tree

1 file changed

+44
-159
lines changed

1 file changed

+44
-159
lines changed

README.md

Lines changed: 44 additions & 159 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ without the need to apply same effect again and again
1010

1111
## Screenshots
1212

13-
Screenshots or it didnt happen... :P
14-
1513
![scrot1](https://github.com/pavanjadhaw/betterlockscreen.demo/raw/master/scrots/scrot1.png "scrot1.png")
1614

1715
![scrot2](https://github.com/pavanjadhaw/betterlockscreen.demo/raw/master/scrots/scrot2.png "scrot2.png")
@@ -20,7 +18,28 @@ Screenshots or it didnt happen... :P
2018

2119
* [Demonstration](https://www.youtube.com/watch?v=9Ng5FZwnn6M&feature=youtu.be) - youtube.com
2220

23-
## Getting Started
21+
## Features
22+
23+
```
24+
# Lock screen
25+
betterlockscreen -l | --lock [modifier]
26+
# Set wallpaper
27+
betterlockscreen -w | --wall [modifier]
28+
# Suspend system
29+
betterlockscreen -s | --suspend [modifier]
30+
# Update image cache
31+
betterlockscreen -u | --update (path/to/image.png | path/to/directory) [-r | --resolution <resolution>] [-b | --blur <factor>]
32+
33+
Modifiers:
34+
dim
35+
blur
36+
dimblur
37+
38+
Example update image cache:
39+
betterlockscreen -u path/to/directory -r 1920x1080 -b 0.5
40+
In this case a random image from the directory is chosen, and converted to a 1920x1080 resolution with the blur factor set to 0.5
41+
```
42+
2443

2544
## Installation via [AUR package](https://aur.archlinux.org/packages/betterlockscreen-git/)
2645

@@ -38,34 +57,43 @@ yaourt -S betterlockscreen-git
3857

3958
Clone this repo, push this script somewhere handy or you can even copy this script to /usr/local/bin so that it can be used from your i3config without defining whole path.
4059

60+
```
61+
git clone https://github.com/pavanjadhaw/betterlockscreen
62+
# optionally copy the script to /usr/local/bin so you can execute it everywhere
63+
cp betterlockscreen/betterlockscreen /usr/local/bin/betterlockscreen
64+
```
65+
66+
OR
67+
68+
If you dont want to clone the repo and save some bandwidth and diskspace you can do the following
69+
70+
```
71+
wget https://raw.githubusercontent.com/pavanjadhaw/betterlockscreen/master/betterlockscreen
72+
chmod u+x betterlockscreen
73+
```
74+
4175
### Prerequisites
4276

4377
Make sure you have following packages installed.
4478

4579
* [i3lock-color](https://github.com/PandorasFox/i3lock-color) - i3lock fork with additional features (use development branch while building from source for arch use i3lock-color-git from AUR)
4680
* [imagemagick](https://www.imagemagick.org/script/index.php) - to apply effects to images
47-
* [feh](https://feh.finalrewind.org/) - used to set custom wallpaper
4881
* [xdpyinfo](https://www.x.org/archive/X11R7.7/doc/man/man1/xdpyinfo.1.xhtml) - find your screen resolution (to resize images accordingly)
4982
* [xrandr](https://www.x.org/wiki/Projects/XRandR/) - depends for xdpyinfo
50-
* [background.jpg](https://unsplash.com/) - find your fav background image
83+
* [bc](https://www.gnu.org/software/bc/) - used for setting the blur level
84+
* [feh](https://feh.finalrewind.org/) - used to set custom wallpaper
5185

5286
*Note: systemd is required for the suspend feature.*
5387

5488
### Arch users
5589

5690
To install required packages
5791

58-
Install feh and imagemagick
59-
60-
```
61-
pacman -S imagemagick feh
62-
```
63-
64-
Install xrandr and xdpyinfo (currently used to find screenresolution)
92+
Install feh, imagemagick, xrandr and xdpyinfo (currently used to find screenresolution)
6593
If anyone knows better way so that these dependencies could be minimized, please open issue.
6694

6795
```
68-
pacman -S xorg-xrandr xorg-xdpyinfo
96+
pacman -S imagemagick feh xorg-xrandr xorg-xdpyinfo
6997
```
7098

7199
Install i3lock-color-git from AUR
@@ -79,145 +107,11 @@ Yaourt users
79107
```
80108
yaourt -S i3lock-color-git
81109
```
82-
83-
### How to get started
84-
85-
#### Clone this repo
86-
87-
```
88-
git clone https://github.com/pavanjadhaw/betterlockscreen
89-
```
90-
91-
navigate to cloned repository
92-
93-
```
94-
cd betterlockscreen
95-
```
96-
97-
---
98-
99-
#### If you dont want to clone the repo and save some bandwidth and diskspace you can do the following
100-
101-
```
102-
wget https://raw.githubusercontent.com/pavanjadhaw/betterlockscreen/master/betterlockscreen
103-
104-
chmod u+x betterlockscreen
105-
```
106-
107-
---
108-
109-
### Load/Update the image cache
110-
111-
*Grab your favourite image for lockscreen background*
112-
113-
```
114-
betterlockscreen -u path/to/image.img
115-
```
116-
117-
*if you want to use random image from specific directory*
118-
119-
```
120-
betterlockscreen -u path/to/imagedir
121-
```
122-
123-
*set random image as desktop background too*
124-
125-
```
126-
betterlockscreen -u path/to/imagedir && betterlockscreen -w
127-
```
128-
129-
---
130-
131-
### To lockscreen
132-
133-
Original image as background
134-
135-
```
136-
betterlockscreen -l
137-
```
138-
139-
Use dimmed image as lockscreen background
140-
141-
```
142-
betterlockscreen -l dim
143-
```
144-
145-
Use blurred image as lockscreen background
146-
147-
```
148-
betterlockscreen -l blur
149-
```
150-
151-
Use dim + blurred image as lockscreen background
152-
153-
```
154-
betterlockscreen -l dimblur
155-
```
156-
157-
---
158-
159-
### To suspend system with lockscreen
160-
161-
Original image as background
162-
163-
```
164-
betterlockscreen -s
165-
```
166-
167-
Use dimmed image as lockscreen background
168-
169-
```
170-
betterlockscreen -s dim
171-
```
172-
173-
Use blurred image as lockscreen background
174-
175-
```
176-
betterlockscreen -s blur
177-
```
178-
179-
Use dim + blurred image as lockscreen background
180-
181-
```
182-
betterlockscreen -s dimblur
183-
```
184-
185-
---
186-
187-
### To set wallpaper
188-
189-
Original Image
190-
191-
```
192-
betterlockscreen -w
193-
```
194-
195-
Use dimmed image as desktop background
196-
197-
```
198-
betterlockscreen -w dim
199-
```
200-
201-
Use blurred image as desktop background
202-
203-
```
204-
betterlockscreen -w blur
205-
```
206-
207-
Use dim + blurred image as desktop background
208-
209-
```
210-
betterlockscreen -w dimblur
211-
```
212-
213110
---
214111

215112
To set desktop background on startup, add following lines to your .xintrc after pushing script to your path or you can use absolute path to script too
216113

217114
```
218-
# below line no longer needed as cached images are now permanently stored
219-
# exec betterlockscreen -u ~/.wall.png &
220-
221115
exec betterlockscreen -w
222116
```
223117

@@ -229,25 +123,18 @@ If you are i3wm user, add following line to your i3config (~/.config/i3/config o
229123
bindsym $mod+shift+x exec betterlockscreen --lock
230124
```
231125

232-
*update image cache and set last cached image as desktop background*
126+
*set last cached image as desktop background*
233127
```
234-
# Update image cache
235-
# no longer required as cached images are permanently stored
236-
# exec --no-startup-id betterlockscreen -u ~/.wall.png
237-
238128
# Set last used image as desktop background
239-
# comment out below line if you use different desktop background utility
240129
exec --no-startup-id betterlockscreen -w
241130
```
242131

243-
**OR**
244-
245-
*use following if you would like to be surprised by random wallpaper from directory of your choice on each startup*
132+
*set the image cache to a random image from a directory of your choice on each startup*
246133
```
247134
# where Pictures/Wallpapers is the directory you would want to get random wallpapers from
248135
exec --no-startup-id betterlockscreen -u ~/Pictures/Wallpapers
249136
250-
# add this only if you want to use same random image as desktop background too (you might want to)
137+
# add this only if you want to use same random image as desktop background too
251138
# it might not work as it takes few seconds for images to be cached,
252139
# try adding delay of 5 seconds if thats the case
253140
exec --no-startup-id betterlockscreen -w
@@ -262,5 +149,3 @@ This is my first bash script so if you think this could be improved or if you ha
262149
* Hat tip to anyone who's code was used
263150
* Thanks to those who contributed to make it better
264151
* Inspiration - r/unixporn
265-
* etc
266-

0 commit comments

Comments
 (0)