Code Monkey home page Code Monkey logo

wslock's Introduction

wslock

wslock is a simple X screen locker. Similar to slock and i3lock. In fact, wslock is more like a stripped version of i3lock, implementing its own event-loop to drop libev dependancy. i3lock just using libev for its timer anyway. With PAM support (optional).

Installation

make && sudo make install

Needs root privilege to set setuid permission properly if not using PAM to auth. for wslock needs root to read from shadow file for hashed password, and then drop root privilege.

Usage:

Just

./wslock

and then input your password then Enter to exit.

wslock's People

Contributors

vaygr avatar wsmithril avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

vaygr

wslock's Issues

Infinite loop after returning from sleep state

Once the box returns from sleep (via echo "mem" > /sys/power/state), wslock goes into infinite loop:

…
epoll_wait(4, {{EPOLLIN, {u32=3, u64=3}}}, 1, 0) = 1
epoll_wait(4, {{EPOLLIN, {u32=3, u64=3}}}, 1, 0) = 1
epoll_wait(4, {{EPOLLIN, {u32=3, u64=3}}}, 1, 0) = 1
epoll_wait(4, {{EPOLLIN, {u32=3, u64=3}}}, 1, 0) = 1
epoll_wait(4, {{EPOLLIN, {u32=3, u64=3}}}, 1, 0) = 1
epoll_wait(4, {{EPOLLIN, {u32=3, u64=3}}}, 1, 0) = 1
epoll_wait(4, {{EPOLLIN, {u32=3, u64=3}}}, 1, 0) = 1
epoll_wait(4, {{EPOLLIN, {u32=3, u64=3}}}, 1, 0) = 1
epoll_wait(4, {{EPOLLIN, {u32=3, u64=3}}}, 1, 0) = 1
…

Avoid multiple instances of wslock running

This would be useful when you already have wslock running, and your ACPI script makes sure you always run wslock before putting computer into sleep.

For now I use this workaround:

…
pgrep -x wslock || … wslock &

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.