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:
parent
77ce301c22
commit
820a48dea0
|
@ -0,0 +1 @@
|
||||||
|
/lua_modules
|
21
Makefile
21
Makefile
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -16,71 +16,83 @@ local cairo = lgi.cairo
|
||||||
|
|
||||||
local slots = {}
|
local slots = {}
|
||||||
|
|
||||||
function slots.wallpaper(screen)
|
function slots.wallpaper()
|
||||||
local screen_geo = screen.geometry
|
return function(screen)
|
||||||
local source = cairo.ImageSurface(cairo.Format.RGB32, screen_geo.width, screen_geo.height)
|
local screen_geo = screen.geometry
|
||||||
local cr = cairo.Context(source)
|
local source = cairo.ImageSurface(cairo.Format.RGB32, screen_geo.width, screen_geo.height)
|
||||||
|
local cr = cairo.Context(source)
|
||||||
|
|
||||||
-- Load base image
|
-- Load base image
|
||||||
local image_surface = gsurface.load_uncached(beautiful.wallpaper)
|
local image_surface = gsurface.load_uncached(beautiful.wallpaper)
|
||||||
local w, h = gsurface.get_size(image_surface)
|
local w, h = gsurface.get_size(image_surface)
|
||||||
cr:scale(screen_geo.width / w, screen_geo.height / h)
|
cr:scale(screen_geo.width / w, screen_geo.height / h)
|
||||||
cr:set_source_surface(image_surface, 0, 0)
|
cr:set_source_surface(image_surface, 0, 0)
|
||||||
cr:paint()
|
cr:paint()
|
||||||
|
|
||||||
-- Add color layer
|
-- Add color layer
|
||||||
local color_pattern = gcolor.create_linear_pattern {
|
local color_pattern = gcolor.create_linear_pattern {
|
||||||
from = { 0, 0 },
|
from = { 0, 0 },
|
||||||
to = { screen.width, screen.height },
|
to = { screen.width, screen.height },
|
||||||
stops = {
|
stops = {
|
||||||
{ 0, "#26323840" },
|
{ 0, "#26323840" },
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
cr:set_source(color_pattern)
|
cr:set_source(color_pattern)
|
||||||
cr:paint()
|
cr:paint()
|
||||||
|
|
||||||
awallpaper {
|
awallpaper {
|
||||||
screen = screen,
|
screen = screen,
|
||||||
widget = {
|
widget = {
|
||||||
image = source,
|
image = source,
|
||||||
widget = imagebox,
|
widget = imagebox,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function slots.create_tags(screen)
|
function slots.create_tags()
|
||||||
local first_tag = atag.add("home", {
|
return function(screen)
|
||||||
screen = screen,
|
local first_tag = atag.add("home", {
|
||||||
layout = alayout.suit.tile,
|
screen = screen,
|
||||||
icon = beautiful.icon_hometag,
|
layout = alayout.suit.tile,
|
||||||
gap = beautiful.gaps_hometag,
|
icon = beautiful.icon_hometag,
|
||||||
})
|
gap = beautiful.gaps_hometag,
|
||||||
|
})
|
||||||
|
|
||||||
gtimer.delayed_call(function()
|
gtimer.delayed_call(function()
|
||||||
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()
|
||||||
desktop_bar(screen)
|
return function(screen)
|
||||||
|
desktop_bar(screen)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function slots.build_titlebars(client)
|
function slots.build_titlebars()
|
||||||
titlebar(client)
|
return function(client)
|
||||||
|
titlebar(client)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function slots.client_shape(client)
|
function slots.client_shape()
|
||||||
client.shape = nice_shapes.rounded_rect {
|
return function(client)
|
||||||
tl = beautiful.client_corner_radius_top,
|
client.shape = nice_shapes.rounded_rect {
|
||||||
tr = beautiful.client_corner_radius_top,
|
tl = beautiful.client_corner_radius_top,
|
||||||
bl = beautiful.client_corner_radius_bottom,
|
tr = beautiful.client_corner_radius_top,
|
||||||
br = beautiful.client_corner_radius_bottom,
|
bl = beautiful.client_corner_radius_bottom,
|
||||||
}
|
br = beautiful.client_corner_radius_bottom,
|
||||||
|
}
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function slots.naughty_display(notification)
|
function slots.naughty_display()
|
||||||
naughty.layout.box { notification = notification }
|
return function(notification)
|
||||||
|
naughty.layout.box { notification = notification }
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return slots
|
return slots
|
||||||
|
|
Loading…
Reference in New Issue