Improved lock module
This commit is contained in:
BIN
modules/lock/arch.png
Normal file
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
3
modules/lock/dm-tool.bash
Executable file
@ -0,0 +1,3 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
dm-tool lock
|
12
modules/lock/i3lock.bash
Executable file
12
modules/lock/i3lock.bash
Executable 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
17
modules/lock/init.lua
Normal 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"
|
||||
}
|
||||
)
|
||||
)
|
||||
}
|
Reference in New Issue
Block a user