Improved lock module

This commit is contained in:
2022-11-04 10:23:41 -07:00
parent 35267764b6
commit aa4ebcb292
7 changed files with 14 additions and 14 deletions

BIN
modules/lock/arch.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

3
modules/lock/dm-tool.bash Executable file
View File

@ -0,0 +1,3 @@
#!/usr/bin/env bash
dm-tool lock

12
modules/lock/i3lock.bash Executable file
View File

@ -0,0 +1,12 @@
#!/usr/bin/env bash
icon="./arch.png"
tmpbg="/tmp/lockscreen.png"
tmpic="/tmp/lockscreenicon.png"
scrot --overwrite "$tmpbg"
convert "$icon" -scale 25% "$tmpic"
convert "$tmpbg" -scale 10% -scale 1000% "$tmpbg"
convert "$tmpbg" "$tmpic" -gravity center -composite -matte "$tmpbg"
i3lock -u -i "$tmpbg"

17
modules/lock/init.lua Normal file
View File

@ -0,0 +1,17 @@
return {
keybinds = gears.table.join(
awful.key( {"Mod4"}, "l",
function ()
awful.spawn(
conf_dir .. "modules/lock/" .. config.lock.type .. ".bash",
false
)
end,
{
description = "Lock screen",
group = "System"
}
)
)
}