• Stars
    star
    125
  • Rank 284,721 (Top 6 %)
  • Language
    C++
  • License
    GNU General Publi...
  • Created about 11 years ago
  • Updated over 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Auto-lock your Windows computer when the lid is closed or the screen turns off.

laplock

Author: Etienne Dechamps (a.k.a e-t172) [email protected]

https://github.com/dechamps/laplock

This extremely small (102 lines, 21KB binary) C++ program allows you to automatically lock your Windows computer on two events:

  • The computer is a laptop and its lid is closed;
  • The computer screen is turned off. Note that this probably won't work with the power button of your monitor since the system is not notified when this happens; however, it works when the screen is turned off automatically after the delay specified in the Windows power management options.

laplock runs on Windows Vista, 7, and probably later versions; it won't work on Windows XP, since it doesn't implement the necessary power management interface.

Compilation

There is only one C++ file and it should compile using any Windows compiler. Project files are provided for Microsoft Visual C++ 2010. Note that you'll need the Windows SDK version 7.0 or greater.

Usage

Just run it. At first, nothing will happen; this is normal as laplock runs silently in the background (you can check this using the Windows task manager). laplock will keep running until you log off or kill it. It is recommended to add laplock to your Startup folder; then you can happily forget about it.

Note that laplock listens intelligently for events; meaning, it doesn't consume any CPU at all while waiting.

More Repositories

1

FlexASIO

A flexible universal ASIO driver that uses the PortAudio sound I/O library. Supports WASAPI (shared and exclusive), KS, DirectSound and MME.
C++
1,339
star
2

WinIPBroadcast

Automagically sends IP broadcast packets to all interfaces on Windows
C
244
star
3

RudeWindowFixer

Fix Windows taskbar always-on-top issues
C
102
star
4

APO

Some random notes about Windows Audio Processing Objects (APOs).
62
star
5

WinSoftVol

A Windows filter driver that disables hardware volume control on audio devices.
C
35
star
6

LoudspeakerExplorer

A loudspeaker measurement visualization, analysis and comparison tool.
Python
21
star
7

audiotools

Random potpourri of docs and tools related to audio measurement and analysis.
Python
20
star
8

yabe

Yet Another Bacnet Explorer - unofficial GitHub mirror. NOT THE OFFICIAL REPO - PULL REQUESTS WILL NOT BE REVIEWED
C#
19
star
9

WindowInvestigator

A Windows window manager investigation toolbox
C
10
star
10

LGTVDeviceListener

Switch LGTV inputs based on Windows device changes
C++
9
star
11

videojitter

Tools for physical measurement of video frame presentation timing
Jupyter Notebook
9
star
12

ASIO401

An unofficial ASIO driver for the QuantAsylum QA403, QA402 and QA401 audio analyzers.
C++
6
star
13

HDRCompare

A suite of ffmpeg filters for comparing SDR and HDR video material
6
star
14

ASIOUtil

Random grab bag of utilities for developing ASIO audio drivers.
C++
5
star
15

LoudspeakerExplorer-rendered

Pre-rendered Loudspeaker Explorer notebook with some example settings for demonstration purposes.
Jupyter Notebook
5
star
16

kmlpipe

A geographic data processing toolbox based on KML, bash, and XSLT.
XSLT
5
star
17

ASIOTest

A library for testing ASIO audio drivers.
C++
5
star
18

AudioMeterEvent

A utility that triggers HTTP requests based on Windows audio device levels.
C#
4
star
19

MMEBufferSizes

Minimal repro for unexpected glitching with MME small buffer sizes
C
2
star
20

cpplog

A basic logging library for C++. (Windows-only, for now.)
C++
1
star
21

CMakeUtils

Random grab bag of generic CMake utilities.
CMake
1
star
22

scrypt

http://www.tarsnap.com/scrypt.html
C
1
star
23

cpputil

Random grab bag of generic C++ utilities.
C++
1
star
24

WorldInConflict-FPM

World In Conflict mod for playing non-FPM games with FPM rules
Python
1
star
25

mso2eapo

Multi-Sub Optimizer to Equalizer APO converter
Shell
1
star