GithubHelp home page GithubHelp logo

mmitch / slock-exec Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 96 KB

slock (X screen locker) variant with script execution

License: MIT License

Makefile 14.71% C 76.76% Shell 0.74% Perl 2.95% Roff 4.84%

slock-exec's Introduction

slock-exec

Build Status MIT

what is this?

This is a small hack of slock that runs scripts on the lock/unlock events:

  1. slock-script-lock is run on locking the screen.
    This is rather pointless and could also be achieved simply by putting the slock invocation in a little script, but it was a nice simple task to practice some C stuff.

  2. slock-script-unlock is run after unlocking the screen and the password you entered to unlock the screen is passed to the script on STDIN.

why is this?

The reason for this is that I want to drop my cached identities from ssh-agent on screen-lock and automatically re-add them after unlocking the screen as described here:

how to build

Have a look at the README file.

copyright

See the LICENSE file for the original copyright notice of slock. (While it says MIT/X Consortium License in the first line, the wording is that of the plain MIT license; the additional paragraphs used by the X Consortium are missing. Perhaps an upstream bug?)

homepage

slock-exec is available at https://github.com/mmitch/slock-exec

TODOs

  • add notice to manpage/version number that this is not the real slock
    • or better yet: change executable name
  • install empty/default slock-lock-* scripts to /usr/local/bin to provide a fallback? to be overriden with own scripts in ~/bin

slock-exec's People

Contributors

frign avatar garbeam avatar hexid avatar hiltjo avatar mmitch avatar phillid avatar schachmat avatar stoeckmann avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.