Misc cleanup

This commit is contained in:
2022-07-16 17:41:00 -07:00
parent 7d1a0b6155
commit ea62dabfc1
21 changed files with 143 additions and 175 deletions

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

@ -0,0 +1,17 @@
local script = conf_dir .. "modules/i3lock/lock.fish"
script = script .. " "
return {
keybinds = gears.table.join(
awful.key( {"Mod4"}, "a",
function ()
awful.spawn(script .. beautiful.icons.lockicon, false)
end,
{
description = "Lock screen",
group = "System"
}
)
)
}

13
modules/i3lock/lock.fish Executable file
View File

@ -0,0 +1,13 @@
#!/usr/bin/env bash
icon=$1
tmpbg="/tmp/lockscreen.png"
tmpic="/tmp/lockscreenicon.png"
#(( $# )) && { icon=$1; }
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"