~kris/suckless

slock

2d2a21a9 — Markus Teich 9 years ago
rm trailing whitespace in README
325581b9 — Markus Teich 9 years ago
syntax fix
0ff0d9f7 — Markus Teich 9 years ago
there can only be one window in the event
7a604ec1 — Bob Uhl 9 years ago
Fix resize with multiple monitors and portrait mode

When connecting/disconnecting a portrait monitor, the
XRRScreenChangeNotifyEvent height & width are reversed due to the XRandR
rotation; detect this and DTRT.
fa115895 — Markus Teich 9 years ago
bump version
d5da84cf — Markus Teich 9 years ago
add arg.h and util.h to Makefile
ae96836f — Markus Teich 9 years ago
clarify colors in config.def.h
7d31ff65 — Markus Teich 9 years ago
move config.h inclusion after type declarations
59746954 — Laslo Hunhold 9 years ago
Unboolify slock.c
c96e725d — FRIGN 9 years ago
Use explicit strcmp() instead of inlining it

Makes it a tad more readable; the previous "optimization" will be done
by the compiler anyway.
6a1bd896 — FRIGN 9 years ago
No need for oldc to be static
b099d2fd — FRIGN 9 years ago
Use NUL character constant explicitly
0a43b78d — FRIGN 9 years ago
Keep the line-lengths at bay

This makes the code more readable and prevents wraparounds in the
editor.
bd069b08 — FRIGN 9 years ago
Add a section on security considerations

The section on security considerations sheds some light on the problems that we
can't solve within slock but which the user has to solve in his X configuration.
2d85c5ba — Markus Teich 9 years ago
remove confusing DPMS comment

FRIGN on hackers@suckless.org:
What has been bugging me for quite a while is this DPMS comment that was added
there for no reason. Every sane mind would agree that fiddling with DPMS makes
no sense whatsoever. When I slock, my screen turns off after 10 minutes. So, if
I don't like that, I disable DPMS. If I do, I just fiddle around with my mouse a
bit and get the slock promt.
a98fba89 — Markus Teich 9 years ago
error out early on crypt() fail
Stop using $USER for shadow entries

This was extremely bad practice, effectively making the program behave
different depending on which architecture you are running it on.

OpenBSD offers getpwuid_shadow, but there is no getspuid for getspnam,
so we resort to using the pw_name entry in the struct passwd we filled
earlier.

This prevents slock from crashing when $USER is empty (easy to do). If
you want to run slock as a different user, don't use

	$ USER="tom" slock

but doas or sudo which were designed for this purpose.
Rename getpw() and pws to gethash() and hash
Remove cleanup and deglobalize and rework data structures

The cleanup removal is a joint-venture with Markus. We assume the X server does
the cleanup, so we don't need it. The idea is that the fds are closed at exit
and thus already indicate to the X server that the client has quit. Analogously
the same applies to freeing memory sections previously allocated for the X
server.

We love XXXXXL burgers and therefore removed
XUngrabPointer
XUngrabKeyboard
XFreeColors
XFreePixmap
XDestroyWindow
Lines of Code.

For a project like slock there is no need to carry around global state. By
moving the three structures to main() it is now clear which functions modify
which state, greatly improving the readability of the code, especially given
slock is a suid program.
cd3c546c — Quentin Rameau 10 years ago
config.mk: be more explicative about FLAGS

Group each *FLAG with its description and add a NetBSD specific.
Next