chore: build awesome-slot from source

I'm working on some new updates on awesome-slot that I want to test here
on my config before pushing the commits.
This commit is contained in:
Aire-One 2024-11-27 01:35:36 +01:00
parent 77ce301c22
commit 820a48dea0
4 changed files with 87 additions and 52 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/lua_modules

View File

@ -1,3 +1,24 @@
# Install the dependencies in the local tree (aka project directory). This is
# useful for development, since we may require a different version of a
# dependency than the one installed in the system.
# awesome-slot is on heavy development, so we need to install the dependencies
# from the local source code.
install:
cd /home/aireone/documents/prog/awesome-slot \
&& luarocks \
--lua-version 5.4 \
make \
--tree /home/aireone/documents/prog/awesomerc/lua_modules
luarocks \
--lua-version 5.4 \
install \
--tree lua_modules \
--only-deps \
awesomerc-dev-1.rockspec
clean:
rm -rf lua_modules
dev:
scripts/run.sh start

View File

@ -17,7 +17,8 @@ startXephyr() {
runAwesome() {
DISPLAY=$display $awesome \
--config $rcfile \
--search $confdir
--search $confdir \
--search ./lua_modules/share/lua/5.4
}
case $1 in

View File

@ -16,7 +16,8 @@ local cairo = lgi.cairo
local slots = {}
function slots.wallpaper(screen)
function slots.wallpaper()
return function(screen)
local screen_geo = screen.geometry
local source = cairo.ImageSurface(cairo.Format.RGB32, screen_geo.width, screen_geo.height)
local cr = cairo.Context(source)
@ -46,9 +47,11 @@ function slots.wallpaper(screen)
widget = imagebox,
},
}
end
end
function slots.create_tags(screen)
function slots.create_tags()
return function(screen)
local first_tag = atag.add("home", {
screen = screen,
layout = alayout.suit.tile,
@ -60,27 +63,36 @@ function slots.create_tags(screen)
first_tag:view_only()
-- spawn(apps.open_terminal(), { screen = screen, tag = first_tag })
end)
end
end
function slots.build_desktop_decoration(screen)
function slots.build_desktop_decoration()
return function(screen)
desktop_bar(screen)
end
end
function slots.build_titlebars(client)
function slots.build_titlebars()
return function(client)
titlebar(client)
end
end
function slots.client_shape(client)
function slots.client_shape()
return function(client)
client.shape = nice_shapes.rounded_rect {
tl = beautiful.client_corner_radius_top,
tr = beautiful.client_corner_radius_top,
bl = beautiful.client_corner_radius_bottom,
br = beautiful.client_corner_radius_bottom,
}
end
end
function slots.naughty_display(notification)
function slots.naughty_display()
return function(notification)
naughty.layout.box { notification = notification }
end
end
return slots