Skip to content

Instantly share code, notes, and snippets.

@adamwojt
Last active November 24, 2021 07:29
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adamwojt/99e309ddf127cf4b2b71b2e358ffc20a to your computer and use it in GitHub Desktop.
Save adamwojt/99e309ddf127cf4b2b71b2e358ffc20a to your computer and use it in GitHub Desktop.
cmatrix + alock + awesomewm = matrixlock

Prerequisites:

  1. In awesomewm's rc.lua:
awful.key(
    {modkey},
    "m",
    function()
        awful.util.spawn("kitty cmatrix", {floating = true, screen = 1, fullscreen = true})
        awful.util.spawn("kitty cmatrix", {floating = true, screen = 2, fullscreen = true})
        awful.spawn.with_shell("alock -bg none && pkill cmatrix")
    end,
    {description = "matrixlock", group = "super"}
)
  1. Replace terminal if needed (I use kitty), also I use two screens, you may want to delete one line to only use 1 screen.
  2. Now modkey + m
  3. Enter your password promptly to escape the matrix, frame should give you hints 👩‍💻
  4. And you're in!
  • 2021-11-21 07-52-19
@raven2cz
Copy link

+1 :-D

@tbreslein
Copy link

You can probably make this agnostic to how many screens you have, if you want to it to show on all screens. This should just get you all screens to iterate over: https://awesomewm.org/doc/api/classes/screen.html#screen:screen

Or you can use this to get the number of screens and then just iterate from to 1 that number: https://awesomewm.org/doc/api/classes/screen.html#screen:count

Can't test it myself right now, but I can take a look at it some time throughout the week.

@adamwojt
Copy link
Author

@tbreslein Thanks for sharing. I completely agree to would be superior setup. Please do share your code and I will include it here. I spent quite a long time ricing this week so I cannot afford more :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment