forked from Raymo111/i3lock-color
-
Notifications
You must be signed in to change notification settings - Fork 0
/
i3lock.1
559 lines (468 loc) · 15.9 KB
/
i3lock.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.TH i3lock-color 1 "JAN 2022" Linux "User Manuals"
.SH NAME
i3lock-color \- improved screen locker
.SH SYNOPSIS
.B i3lock
.RB [\|\-v\|]
.RB [\|\-n\|]
.RB [\|\-b\|]
.RB [\|\-i
.IR image.png \|]
.RB [\|\-c
.IR color \|]
.RB [\|\-t\|]
.RB [\|\-p
.IR pointer\|]
.RB [\|\-u\|]
.RB [\|\-e\|]
.RB [\|\-f\|]
.RB [\|\-m\|]
.SH DESCRIPTION
.B i3lock\-color
is a simple screen locker like slock. After starting it, you will see a white
screen (you can configure the color/an image). You can return to your screen by
entering your password.
.SH FEATURES
.IP \[bu] 2
i3lock forks, so you can combine it with an alias to suspend to RAM
(run "i3lock && echo mem > /sys/power/state" to get a locked screen after waking
up your computer from suspend to RAM)
.IP \[bu]
You can specify either a background color or a PNG image which will be displayed
while your screen is locked.
.IP \[bu]
You can specify whether i3lock should bell upon a wrong password.
.IP \[bu]
i3lock uses PAM and therefore is compatible with LDAP, etc.
.SH OPTIONS
.TP
.B \-v, \-\-version
Display the version of your
.B i3lock
.TP
.B \-n, \-\-nofork
Don't fork after starting.
.TP
.B \-b, \-\-beep
Enable beeping. Be sure to not do this when you are about to annoy other people,
like when opening your laptop in a boring lecture.
.TP
.B \-u, \-\-no\-unlock\-indicator
Disable the unlock indicator. i3lock will by default show an unlock indicator
after pressing keys. This will give feedback for every keypress and it will
show you the current PAM state (whether your password is currently being
verified or whether it is wrong).
.TP
.BI \-i\ path \fR,\ \fB\-\-image= path
Display the given PNG image instead of a blank screen.
.TP
.BI \fB\-\-raw= format
Read the image given by \-\-image as a raw image instead of PNG. The argument is
the image's format as <width>x<height>:<pixfmt>.
The supported pixel formats are:
\'native', 'rgb', 'xrgb', 'rgbx', 'bgr', 'xbgr', and 'bgrx'.
The "native" pixel format expects a pixel as a 32-bit (4-byte) integer in
the machine's native endianness, with the upper 8 bits unused.
Red, green and blue are stored in the remaining bits, in that order.
.BR Example:
.Vb 6
\& --raw=1920x1080:rgb
.Ve
You can use ImageMagick’s
.IR convert(1)
program to feed raw images into i3lock:
.Vb 6
\& convert wallpaper.jpg RGB:- | i3lock --raw 3840x2160:rgb --image /dev/stdin
.Ve
This allows you to load a variety of image formats without i3lock having to
support each one explicitly.
You can also use it to resize images to the screen ratio:
.Vb 6
\& convert wallpaper.jpg -resize $(xdpyinfo | grep dimensions | sed -r 's/^[^0-9]*([0-9]+x[0-9]+).*$/\1/') RGB:- | i3lock --raw $(xdpyinfo | grep dimensions | sed -r 's/^[^0-9]*([0-9]+x[0-9]+).*$/\1/'):rgb --image /dev/stdin
.Ve
Note that $(xdpyinfo | grep dimensions | sed -r 's/^[^0-9]*([0-9]+x[0-9]+).*$/\1/')
gets you the current screen dimensions in the wxh (e.g. 1920x1080) format.
.TP
.BI \-c\ rrggbbaa \fR,\ \fB\-\-color= rrggbbaa
Turn the screen into the given color instead of white. Color must be given in
4-byte format: rrggbbaa (i.e. ff0000ff is opaque red).
Use the last byte for alpha. Setting this below FF (i.e. ff000088) will allow
your screen to be shown translucently if you use a compositor (e.g. compton,
xcompmgr).
.TP
.B \-t, \-\-tiling
If an image is specified (via \-i) it will display the image tiled all over the
screen.
Note: For all image options, with a multi-monitor setup, the image is visible on
all screens.
.TP
.B \-C, \-\-centered
If an image is specified (via \-i) it will display the image centered on the
screen.
.TP
.B \-F, \-\-fill
If an image is specified (via \-i) it will scale the image until it fills the
screen. A portion of the image will be cropped.
.TP
.B \-M, \-\-max
If an image is specified (via \-i) it will scale the image until either the
width or the height fits the screen without being cropped. The border color
can be set via \-c.
.TP
.B \-L, \-\-scale
If an image is specified (via \-i) it will stretch the image until both the
width and the height fits the screen.
.TP
.BI \-p\ win|default \fR,\ \fB\-\-pointer= win|default
If you specify "default",
.B i3lock
does not hide your mouse pointer. If you specify "win",
.B i3lock
displays a hardcoded Windows-Pointer (thus enabling you to mess with your
friends by using a screenshot of a Windows desktop as a locking-screen).
.TP
.B \-e, \-\-ignore\-empty\-password
When an empty password is provided by the user, do not validate it. Without this
option, the empty password will be provided to PAM and, if invalid, the user
will have to wait a few seconds before another try. This can be useful if the
XF86ScreenSaver key is used to put a laptop to sleep and bounce on resume or if
you happen to wake up your computer with the enter key.
.TP
.B \-f, \-\-show\-failed\-attempts
Show the number of failed attempts, if any.
.TP
.B \-\-debug
Enables debug logging.
Note, that this will log the password used for authentication to stdout.
.SH i3lock-color OPTIONS
.TP
.B \-S number, \-\-screen=number
Specifies which display to draw the unlock indicator and clock on. By default,
they'll be placed on every screen.
Note that this number is zero indexed. The ordering is dependent on libxinerama.
.TP
.B \-B sigma, \-\-blur=sigma
Captures the screen and blurs it using the given sigma (radius).
Images may still be overlaid over the blurred screenshot.
As an alternative to this option, you could specify a translucent background
color (-c option) with a fully transparent or translucent color, and use a
compositor to perform blurring (e.g. compton, picom).
.TP
.B \-k, \-\-clock, \-\-force\-clock
Displays the clock. \-\-force\-clock also displays the clock when there's
indicator text (useful for when the clock is not positioned with the indicator).
.TP
.B \-\-indicator
Forces the indicator to always be visible, instead of only showing on activity.
.TP
.B \-\-radius
The radius of the circle. Defaults to 90.
.TP
.B \-\-ring\-width
The width of the ring unlock indicator. Defaults to 7.0.
.TP
.B \-\-{inside, ring}\-color=rrggbbaa
Sets the idle color for the interior circle and ring. Note: use individual
options per element unless the shell supports brace expansion (in which case
remove the spaces inside the curly braces).
.TP
.B \-\-{inside, ring}ver\-color=rrggbbaa
Sets the interior circle and ring color while the password is being verified.
.TP
.B \-\-{inside, ring}wrong\-color=rrggbbaa
Sets the interior circle and ring color for during incorrect password flashes.
.TP
.B \-\-line\-color=rrggbbaa
Sets the color for the line separating the inside circle and the outer ring.
.TP
.B \-\-line\-uses\-{inside, ring}
Overrides \-\-line\-color. The line will match the {inside, ring} color.
Note: these two options conflict with each other.
.TP
.B \-\-{key, bs}hl\-color=rrggbbaa
Sets the color of highlight arcs on the ring upon keypress and backspace.
.TP
.B \-\-separator\-color=rrggbbaa
Sets the color of the seperators at both ends of the highlight arcs on the ring.
.TP
.B \-\-{verif, wrong, modif}\-color=rrggbbaa
Sets the color of the status text while verifying and when password is wrong.
.TP
.B \-\-{layout, time, date, greeter}\-color=rrggbbaa
Sets text colors.
.TP
.B \-\-keylayout mode
Displays the keylayout. Positionable similar to date, time, and indicator.
Modes are as follows:
.RS
.IP \[bu] 2
0 - Displays the full string returned by the query, i.e. "English (US)"
.IP \[bu]
1 - Displays up until the first parenthesis, i.e. "English"
.IP \[bu]
2 - Displays just the contents of the parenthesis, i.e. "US"
.RE
.B For all following -str or -text options, some control characters
.B (i.e. \\\\n, \\\\t) are supported. See \fBCONTROL CHARACTERS\fR
.B for more details.
.TP
.B \-\-time\-str="%H:%M:%S"
Sets the format used for generating the time string.
See strftime(3) for a full list of format specifiers.
.TP
.B \-\-date\-str="%A, %m %Y"
Sets the format used for generating the date string.
.TP
.B \-\-verif\-text="verifying…"
Sets the string to be shown while verifying the password/input/key/etc.
.TP
.B \-\-wrong\-text="wrong!"
Sets the string to be shown upon entering an incorrect password.
.TP
.B \-\-noinput\-text="no input"
Sets the string to be shown upon pressing backspace without anything to delete.
.TP
.B \-\-lock\-text="locking…"
Sets the string to be shown while acquiring pointer and keyboard focus.
.TP
.B \-\-lockfailed\-text="lock failed!"
Sets the string to be shown after failing to acquire pointer and keyboard focus.
.TP
.B \-\-greeter\-text=""
Sets the greeter text.
.TP
.B \-\-no\-modkey\-text
Hides the modkey indicator (Num, Caps Lock ...)
.TP
.B \-\-{time, date, layout, verif, wrong, modif, greeter}\-align
Sets the text alignment of the time, date, keylayout, verification, wrong,
modifier and greeter texts.
.RS
.IP \[bu] 2
0 - centered (default)
.IP \[bu]
1 - left aligned
.IP \[bu]
2 - right aligned
.RE
.TP
.B \-\-{time, date, layout, verif, wrong, greeter, modif}outline\-color=rrggbbaa
Sets the color of the outlines.
.TP
.B \-\-{time, date, layout, verif, wrong, greeter}\-font=sans\-serif
Sets the font used to render various strings.
.TP
.B \-\-{time, date, layout, verif, wrong, greeter}\-size=number
Sets the font size used to render various strings.
.TP
.B \-\-{time, date, layout, verif, wrong, greeter, modifier}outline\-width=number
Sets the width of the outline.
.TP
.B \-\-ind\-pos="x\-position:y\-position"
Sets the position for the unlock indicator. Valid variables include:
.RS
.IP \[bu] 2
x - x position of the current display.
Corresponds to the leftmost column of pixels on that display.
.IP \[bu]
y - y position of the current display.
Corresponds to the topmost row of pixels on that display.
.IP \[bu]
w - width of the current display.
.IP \[bu]
h - height of the current display.
.IP \[bu]
r - unlock indicator radius.
.RE
.TP
.B \-\-time\-pos="x\-position:y\-position"
Sets the position for the time string. All the variables from \-\-ind\-pos may
be used, in addition to:
.RS
.IP \[bu] 2
ix - x position of the indicator on the current display.
.IP \[bu]
iy - y position of the indicator on the current display.
If the \-\-bar\-indicator option is used, the following variables may be used:
.IP \[bu] 2
bw - width of the bar indicator.
.IP \[bu]
bx - x position of the bar indicator on the current display.
.IP \[bu]
by - y position of the bar indicator on the current display.
.RE
.TP
.B \-\-date\-pos="x\-position:y\-position"
Sets the position for the date string. All the variables from \-\-ind\-pos and
\-\-time\-pos may be used, in addition to:
.RS
.IP \[bu] 2
tx - x position of the timestring on the current display.
.IP \[bu]
ty - y position of the timestring on the current display.
.RE
.TP
.B \-\-greeter\-pos="x\-position:y\-position"
Sets the position for the greeter string. All the variables from \-\-ind\-pos and
\-\-time\-pos may be used.
.TP
.B \-\-pass\-{media, screen, power, volume}\-keys
Allow the following keys to be used normally while the screen is locked by
passing them through:
.RS
.IP \[bu] 2
media - XF86AudioPlay, XF86AudioPause, XF86AudioStop, XF86AudioPrev,
XF86AudioNext, XF86AudioMute, XF86AudioLowerVolume, XF86AudioRaiseVolume,
XF86AudioMicMute
.IP \[bu]
screen - XF86MonBrightnessUp, XF86MonBrightnessDown
.IP \[bu]
power - XF86PowerDown, XF86PowerOff, XF86Sleep
.IP \[bu]
volume - XF86AudioMute, XF86AudioLowerVolume, XF86AudioRaiseVolume
.RE
.TP
.B \-\-custom\-key\-commands
Enables custom shell commands for media, screen, power and volume keys. An alternative to \-\-pass\-media\0keys that will work in any environment.
.TP
.B \-\-cmd\-**
Shell command to run when the corresponding key is pressed. Requires \-\-custom\-key\-commands
.RS
.IP \[bu] 2
brightness\-up - XF86MonBrightnessUp
.IP \[bu]
brightness\-down - XF86MonBrightnessDown
.IP \[bu]
media\-play - XF86AudioPlay
.IP \[bu]
media\-pause - XF86AudioPause
.IP \[bu]
media\-stop - XF86AudioStop
.IP \[bu]
media\-next - XF86AudioNext
.IP \[bu]
media\-prev - XF86AudioPrev
.IP \[bu]
audio\-mute - XF86AudioMute
.IP \[bu]
volume\-up - XF86AudioRaiseVolume
.IP \[bu]
volume\-down - XF86AudioLowerVolume
.IP \[bu]
mic\-mute - XF86AudioMicMute
.IP \[bu]
power\-down - XF86PowerDown
.IP \[bu]
power\-off - XF86PowerOff
.IP \[bu]
power\-sleep - XF86Sleep
.RE
.TP
.B \-\-bar\-indicator
Replaces the usual ring indicator with a bar indicator. Comes with perks.
.TP
.B \-\-bar\-direction={0, 1, 2}
Sets the direction the bars grow in. 0 is the default (downwards, or rightwards,
depending on the bar orientation). 1 is the reverse, and 2 is both.
.TP
.B \-\-bar\-orientation={vertical,horizontal}
Sets whether the bar is vertically or horizontally oriented.
Defaults to horizontal.
.TP
.B \-\-bar\-step
Sets the step that each bar decreases by when a key is pressed. A random bar is
set to its max height, then each neighbor is set to (height - step*distance).
.TP
.B \-\-bar\-max\-height
The maximum height a bar can get to. When a key is pressed, a random bar is set
to this value, then its neighbors are set to its height, minus the step value.
.TP
.B \-\-bar\-base\-width
The thickness of the "base" bar that all the bars originate from.
This bar also takes on the ring verification and wrong colors to give
authentication feedback.
.TP
.B \-\-bar\-color
Sets the default color of the bar base.
.TP
.B \-\-bar\-periodic\-step
The value by which the bars decrease each time the screen is redrawn.
.TP
.B \-\-bar\-pos
Works similarly to the time/date/indicator expressions. If only one number is
provided, this sets the vertical offset from the top or left edge. If two
numbers are provided in the form of x:y, sets the starting position of the bar.
.TP
.B \-\-bar\-count
Sets the number of minibars to draw on each screen.
.TP
.B \-\-bar\-total\-width
The total width of the bar. Can be an expression.
.TP
.B \-\-redraw\-thread
Starts a separate thread for redrawing the screen. Potentially worse from a
security standpoint, but makes the bar indicator still do its usual periodic
redraws when PAM is authenticating.
.TP
.B \-\-refresh\-rate=seconds\-as\-double
The refresh rate of the indicator, given in seconds. This should automatically
align itself, but is somewhat buggy currently.
Values less than one will work, but may result in poor system performance.
.TP
.B \-\-composite
Some compositors have problems with i3lock trying to render over them, so this
argument is disabled by default. However, some will work properly with it, so
it's been left enabled.
.TP
.B \-\-no\-verify
Do not verify the password entered by the user and unlock immediately.
.B Use only for quickly testing new configurations and remember to remove to
.B actually lock your screen!
.TP
.B \-\-slideshow\-interval
The interval to wait until switching to the next image.
.TP
.B \-\-slideshow\-random\-selection
Randomize the order of the images.
.SH CONTROL CHARACTERS
Control characters (\\r \\n \\b \\t) are supported in text OPTIONS. Their behavior
are almost as same as anywhere else.
.TP
.B Carriage Return(\\\\r)
Move to the start of line (left edge).
Notes: The rendered characters would still live there.
.TP
.B Line Feed(\\\\n)
Move to start of next line (left edge).
.TP
.B Backspace(\\\\b)
Overwrite last one char if exists.
Notes: The rendered character would still live there.
.TP
.B Tab(\\\\t)
Move to next tab stop position.The width of one character for moving is as same as character 'a'.
Note: The width may be strange if the font is not mono-spaced.
.SH SEE ALSO
.IR xautolock(1)
\- use i3lock as your screen saver
.IR convert(1)
\- feed a wide variety of image formats to i3lock
.SH HOMEPAGE
https://github.com/Raymo111/i3lock-color
Please report bugs and submit pull-requests as follows:
For i3lock (upstream): https://github.com/i3/i3lock
For i3lock-color (enhancements on top of i3lock): https://github.com/Raymo111/i3lock-color
.SH AUTHORS
Michael Stapelberg <michael+i3lock at stapelberg dot de>
Jan-Erik Rediger <badboy at archlinux.us>
Pandora <pandora at techfo dot xyz>
Raymond Li <i3lock-color at raymond.li>