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: dev:
scripts/run.sh start scripts/run.sh start

View File

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

View File

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