Reno 98 preview
122
libs/awmtk2.lua
|
@ -9,11 +9,14 @@ local awmtk = {}
|
||||||
awmtk.create_delta = function(name,instance_delta,class_delta,parent_delta)
|
awmtk.create_delta = function(name,instance_delta,class_delta,parent_delta)
|
||||||
-- To save memory, we create proxies for lower layers called "deltas"
|
-- To save memory, we create proxies for lower layers called "deltas"
|
||||||
-- This function creates that proxy layer using metatables
|
-- This function creates that proxy layer using metatables
|
||||||
return setmetatable(instance_delta,{
|
|
||||||
|
-- Fun story - i used instance_delta instead of {} at first.
|
||||||
|
-- The results were horrifying and confusing.
|
||||||
|
return setmetatable({},{
|
||||||
__index = function(self,k)
|
__index = function(self,k)
|
||||||
-- Per-instance overrides are top priority
|
-- Per-instance overrides are top priority
|
||||||
if rawget(self,k) then
|
if rawget(instance_delta,k) then
|
||||||
return rawget(self,k)
|
return rawget(instance_delta,k)
|
||||||
-- Class-wide overrides are second in priority
|
-- Class-wide overrides are second in priority
|
||||||
elseif type(class_delta[name]) == "table"
|
elseif type(class_delta[name]) == "table"
|
||||||
and rawget(class_delta[name],k) then
|
and rawget(class_delta[name],k) then
|
||||||
|
@ -29,11 +32,13 @@ end
|
||||||
awmtk.create_style = function(name,parent,overrides)
|
awmtk.create_style = function(name,parent,overrides)
|
||||||
-- A style is essentially a layer of deltas upon the previous (parent) style
|
-- A style is essentially a layer of deltas upon the previous (parent) style
|
||||||
local new_style = {}
|
local new_style = {}
|
||||||
|
local odelta = (overrides and overrides[name]) or {}
|
||||||
|
local cdelta = (beautiful.widgets and beautiful.widgets[name]) or {}
|
||||||
for name,parent_class in pairs(parent) do
|
for name,parent_class in pairs(parent) do
|
||||||
new_style[name] = awmtk.create_delta(
|
new_style[name] = awmtk.create_delta(
|
||||||
name,
|
name,
|
||||||
(overrides and overrides[name]) or {},
|
odelta,
|
||||||
(beautiful.widgets and beautiful.widgets[style_name]) or {},
|
cdelta,
|
||||||
parent_class
|
parent_class
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
@ -52,7 +57,7 @@ end
|
||||||
|
|
||||||
awmtk.build_templates = function(templates,style)
|
awmtk.build_templates = function(templates,style)
|
||||||
local new_templates = {}
|
local new_templates = {}
|
||||||
for name,template in pairs(awmtk.templates) do
|
for name,template in pairs(awmtk.proto_templates) do
|
||||||
new_templates[name] = templates[name](style)
|
new_templates[name] = templates[name](style)
|
||||||
end
|
end
|
||||||
return new_templates
|
return new_templates
|
||||||
|
@ -70,16 +75,25 @@ end
|
||||||
-- {{{ Default style
|
-- {{{ Default style
|
||||||
|
|
||||||
-- Default style
|
-- Default style
|
||||||
awmtk.default = {
|
awmtk.proto_style = {
|
||||||
base = setmetatable({
|
base = setmetatable({
|
||||||
-- { Backgrounds
|
-- { Backgrounds
|
||||||
-- custom background color for highlighting elements
|
-- custom background color for highlighting elements
|
||||||
bg_highlight = beautiful.bg_highlight or beautiful.bg_focus,
|
bg_highlight = beautiful.bg_highlight or beautiful.bg_focus,
|
||||||
|
-- allow more complex themes to define background images
|
||||||
|
bgimage_focus = beautiful.bgimage_focus,
|
||||||
|
bgimage_normal = beautiful.bgimage_normal,
|
||||||
-- }
|
-- }
|
||||||
-- { Borders
|
-- { Borders
|
||||||
-- Borders for popups
|
-- Borders for popups
|
||||||
shape_border_width = beautiful.shape_border_width or 0,
|
shape_border_width = beautiful.shape_border_width or 0,
|
||||||
shape_border_color = beautiful.shape_border_color or beautiful.bg_normal,
|
shape_border_color = beautiful.shape_border_color or beautiful.bg_normal,
|
||||||
|
-- { Callbacks
|
||||||
|
-- a tiny bit more complex thing to account for more extensibility
|
||||||
|
-- the stub functions do nothing - you should implement functionality inside theme
|
||||||
|
onpress = function() end,
|
||||||
|
onrelease = function() end,
|
||||||
|
-- }
|
||||||
-- }
|
-- }
|
||||||
-- { Shapes
|
-- { Shapes
|
||||||
margins = 5,
|
margins = 5,
|
||||||
|
@ -92,43 +106,50 @@ awmtk.default = {
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Subclasses
|
-- Subclasses
|
||||||
awmtk.default.container = awmtk.create_delta("container",{
|
awmtk.proto_style.container = awmtk.create_delta("container",{
|
||||||
},awmtk.default,awmtk.default.base)
|
},awmtk.proto_style,awmtk.proto_style.base)
|
||||||
|
|
||||||
awmtk.default.button = awmtk.create_delta("button",{
|
awmtk.proto_style.button = awmtk.create_delta("button",{
|
||||||
margins = 3
|
margins = 3
|
||||||
},awmtk.default,awmtk.default.base)
|
},awmtk.proto_style,awmtk.proto_style.base)
|
||||||
|
|
||||||
awmtk.default.icon = awmtk.create_delta("icon",{
|
awmtk.proto_style.icon = awmtk.create_delta("icon",{
|
||||||
margins = 1
|
margins = 1
|
||||||
},awmtk.default,awmtk.default.base)
|
},awmtk.proto_style,awmtk.proto_style.base)
|
||||||
|
|
||||||
awmtk.default.textbox = awmtk.create_delta("textbox",{
|
awmtk.proto_style.textbox = awmtk.create_delta("textbox",{
|
||||||
font = beautiful.font or "sans 8"
|
font = beautiful.font or "sans 8"
|
||||||
}, awmtk.default,awmtk.default.base)
|
}, awmtk.proto_style,awmtk.proto_style.base)
|
||||||
|
|
||||||
awmtk.default.separator = awmtk.create_delta("separator",{
|
awmtk.proto_style.separator = awmtk.create_delta("separator",{
|
||||||
thickness = 1,
|
thickness = 1,
|
||||||
color = beautiful.bg_focus,
|
color = beautiful.bg_focus,
|
||||||
border_width = 0
|
border_width = 0
|
||||||
}, awmtk.default,awmtk.default.base)
|
}, awmtk.proto_style,awmtk.proto_style.base)
|
||||||
|
|
||||||
awmtk.default.article = awmtk.create_delta("article", {
|
awmtk.proto_style.article = awmtk.create_delta("article", {
|
||||||
icon_size = 16,
|
icon_size = 16,
|
||||||
small_font = beautiful.font or "sans 8",
|
small_font = beautiful.small_font or beautiful.font,
|
||||||
font_align = "left",
|
font_align = "left",
|
||||||
small_font_align = "left"
|
small_font_align = "left"
|
||||||
}, awmtk.default,awmtk.default.base)
|
}, awmtk.proto_style,awmtk.proto_style.base)
|
||||||
|
|
||||||
awmtk.default.popup = awmtk.create_delta("popup", {
|
awmtk.proto_style.popup = awmtk.create_delta("popup", {
|
||||||
}, awmtk.default,awmtk.default.base)
|
}, awmtk.proto_style,awmtk.proto_style.base)
|
||||||
|
|
||||||
|
awmtk.proto_style.titlebar = awmtk.create_delta("titlebar", {
|
||||||
|
margins = 1
|
||||||
|
}, awmtk.proto_style,awmtk.proto_style.base)
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
-- {{{ Generic templates
|
-- {{{ Generic templates
|
||||||
awmtk.templates = {
|
awmtk.proto_templates = {
|
||||||
-- Templates are built first using the given style, then applied to contents
|
-- Templates are built first using the given style, then applied to contents
|
||||||
-- through returned function
|
-- through returned function
|
||||||
container = function(style)
|
container = function(style)
|
||||||
|
-- Container is practically any "box" that contains buttons, textboxes,
|
||||||
|
-- and anything you want to put into the container. Do not confuse with
|
||||||
|
-- popup - containers are designed to separate contents within a popup.
|
||||||
return function(layout,options)
|
return function(layout,options)
|
||||||
return awmtk.merge({
|
return awmtk.merge({
|
||||||
{
|
{
|
||||||
|
@ -136,6 +157,7 @@ awmtk.templates = {
|
||||||
margins = (options and options.margins) or style.container.margins,
|
margins = (options and options.margins) or style.container.margins,
|
||||||
widget = wibox.container.margin
|
widget = wibox.container.margin
|
||||||
},
|
},
|
||||||
|
bgimage = style.container.bgimage,
|
||||||
bg = style.container.bg_normal,
|
bg = style.container.bg_normal,
|
||||||
shape = style.container.shape,
|
shape = style.container.shape,
|
||||||
widget = wibox.container.background
|
widget = wibox.container.background
|
||||||
|
@ -144,6 +166,9 @@ awmtk.templates = {
|
||||||
end,
|
end,
|
||||||
|
|
||||||
button = function(style)
|
button = function(style)
|
||||||
|
-- Self explanatory. Notice that this does not bear any function -
|
||||||
|
-- only the visual part of the button. By design, onpress and onrelease
|
||||||
|
-- callbacks should be connected to button events for animations
|
||||||
return function(layout,options)
|
return function(layout,options)
|
||||||
return awmtk.merge({
|
return awmtk.merge({
|
||||||
{
|
{
|
||||||
|
@ -151,6 +176,7 @@ awmtk.templates = {
|
||||||
margins = (options and options.margins) or style.button.margins,
|
margins = (options and options.margins) or style.button.margins,
|
||||||
widget = wibox.container.margin
|
widget = wibox.container.margin
|
||||||
},
|
},
|
||||||
|
bgimage = style.button.bgimage,
|
||||||
bg = style.button.bg_normal,
|
bg = style.button.bg_normal,
|
||||||
shape = style.button.shape,
|
shape = style.button.shape,
|
||||||
widget = wibox.container.background
|
widget = wibox.container.background
|
||||||
|
@ -158,8 +184,8 @@ awmtk.templates = {
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|
||||||
|
|
||||||
textbox = function(style)
|
textbox = function(style)
|
||||||
|
-- Nothing fancy here, but you can set per-widget fonts using beautiful.
|
||||||
return function(options)
|
return function(options)
|
||||||
return awmtk.merge({
|
return awmtk.merge({
|
||||||
font = style.textbox.font,
|
font = style.textbox.font,
|
||||||
|
@ -169,8 +195,9 @@ awmtk.templates = {
|
||||||
end,
|
end,
|
||||||
|
|
||||||
hseparator = function(style)
|
hseparator = function(style)
|
||||||
|
-- Wow, i guess?
|
||||||
return function(options)
|
return function(options)
|
||||||
awmtk.merge({
|
return awmtk.merge({
|
||||||
widget = wibox.widget.separator,
|
widget = wibox.widget.separator,
|
||||||
orientation = "horizontal",
|
orientation = "horizontal",
|
||||||
thickness = style.separator.thickness,
|
thickness = style.separator.thickness,
|
||||||
|
@ -181,8 +208,9 @@ awmtk.templates = {
|
||||||
end,
|
end,
|
||||||
|
|
||||||
vseparator = function(style)
|
vseparator = function(style)
|
||||||
|
-- I'm running out of comments
|
||||||
return function(options)
|
return function(options)
|
||||||
awmtk.merge({
|
return awmtk.merge({
|
||||||
widget = wibox.widget.separator,
|
widget = wibox.widget.separator,
|
||||||
orientation = "vertical",
|
orientation = "vertical",
|
||||||
thickness = style.separator.thickness,
|
thickness = style.separator.thickness,
|
||||||
|
@ -192,9 +220,10 @@ awmtk.templates = {
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|
||||||
-- Article is a template that contains an icon, a headline and a
|
|
||||||
-- short description, side by side. Useful for menus and notifications.
|
|
||||||
article = function(style)
|
article = function(style)
|
||||||
|
-- Article is a template that combines 3 common pieces of a full item:
|
||||||
|
-- Icon, name and description. Designed to be placed within a container
|
||||||
|
-- or a button.
|
||||||
return function(options)
|
return function(options)
|
||||||
return awmtk.merge({
|
return awmtk.merge({
|
||||||
(options.icon and {
|
(options.icon and {
|
||||||
|
@ -237,30 +266,49 @@ awmtk.templates = {
|
||||||
},
|
},
|
||||||
spacing = style.article.spacing,
|
spacing = style.article.spacing,
|
||||||
layout = wibox.layout.fixed.horizontal,
|
layout = wibox.layout.fixed.horizontal,
|
||||||
bg = style.article.bg_normal,
|
|
||||||
widget = wibox.container.background
|
|
||||||
}, options or {})
|
}, options or {})
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|
||||||
popup = function(style)
|
popup = function(style)
|
||||||
|
-- Popup is a distinct template designed to accomodate the "root" of
|
||||||
|
-- a popup, allowing one to add titlebars to popups, for example.
|
||||||
return function(widget,options)
|
return function(widget,options)
|
||||||
return awmtk.merge({
|
return awmtk.merge({
|
||||||
widget = {
|
widget = {
|
||||||
{
|
widget,
|
||||||
widget,
|
margins = (options and options.margins) or style.popup.margins,
|
||||||
margins = (options and options.margins) or style.popup.margins,
|
widget = wibox.container.margin
|
||||||
widget = wibox.container.margin
|
|
||||||
},
|
|
||||||
bg = style.popup.bg_normal,
|
|
||||||
widget = wibox.container.background
|
|
||||||
},
|
},
|
||||||
|
bgimage = style.popup.bgimage,
|
||||||
shape = style.popup.shape,
|
shape = style.popup.shape,
|
||||||
visible = false,
|
visible = false,
|
||||||
ontop = true
|
ontop = true
|
||||||
},options or {})
|
},options or {})
|
||||||
end
|
end
|
||||||
|
end,
|
||||||
|
|
||||||
|
titlebar = function(style)
|
||||||
|
-- Titlebar is a separate class specifically for window and popup
|
||||||
|
-- titlebars. The decision to make it a separate class was due to
|
||||||
|
-- the fact that much customization is done through default theme table
|
||||||
|
return function(layout,options)
|
||||||
|
return awmtk.merge({
|
||||||
|
layout,
|
||||||
|
margins = (options and options.margins) or
|
||||||
|
style.titlebar.margins,
|
||||||
|
widget = wibox.container.margin,
|
||||||
|
left = style.titlebar.left,
|
||||||
|
right = style.titlebar.right,
|
||||||
|
bottom = style.titlebar.bottom,
|
||||||
|
top = style.titlebar.top
|
||||||
|
},options or {})
|
||||||
|
end
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-- yes
|
||||||
|
awmtk.default = awmtk.create_style("default",awmtk.proto_style,{})
|
||||||
|
awmtk.templates = awmtk.create_template_lib("templates",awmtk.proto_templates,{})
|
||||||
-- }}}
|
-- }}}
|
||||||
return awmtk
|
return awmtk
|
||||||
|
|
|
@ -4,14 +4,6 @@ local awful = require("awful")
|
||||||
local beautiful = require("beautiful")
|
local beautiful = require("beautiful")
|
||||||
local gears = require("gears")
|
local gears = require("gears")
|
||||||
|
|
||||||
-- Global settings
|
|
||||||
global = {}
|
|
||||||
global.terminal = "xfce4-terminal" --Mod+Enter (spawn terminal)
|
|
||||||
global.browser = "prime-run librewolf" --Mod+Shift+Enter (spawn browser)
|
|
||||||
global.modkey = "Mod4" -- Default modifier key
|
|
||||||
global.theme = "default"
|
|
||||||
global.shell = "zsh"
|
|
||||||
|
|
||||||
awful.util.shell = global.shell
|
awful.util.shell = global.shell
|
||||||
--error handling
|
--error handling
|
||||||
if awesome.startup_errors then
|
if awesome.startup_errors then
|
||||||
|
@ -50,8 +42,6 @@ awful.rules.rules = {
|
||||||
properties = {
|
properties = {
|
||||||
focus = awful.client.focus.filter,
|
focus = awful.client.focus.filter,
|
||||||
raise = true,
|
raise = true,
|
||||||
keys = clientkeys,
|
|
||||||
buttons = clientbuttons,
|
|
||||||
screen = awful.screen.preferred,
|
screen = awful.screen.preferred,
|
||||||
border_width = beautiful.border_width,
|
border_width = beautiful.border_width,
|
||||||
border_color = beautiful.border_normal,
|
border_color = beautiful.border_normal,
|
||||||
|
|
|
@ -44,6 +44,13 @@ local keys = gears.table.join(
|
||||||
{description = "Open browser", group = "launcher"}))
|
{description = "Open browser", group = "launcher"}))
|
||||||
root.keys(keys)
|
root.keys(keys)
|
||||||
|
|
||||||
|
local buttons = gears.table.join(
|
||||||
|
awful.button({}, 3, function() end),
|
||||||
|
awful.button({}, 4, awful.tag.viewnext),
|
||||||
|
awful.button({}, 5, awful.tag.viewprev)
|
||||||
|
)
|
||||||
|
root.buttons(buttons)
|
||||||
|
|
||||||
local clientkeys = gears.table.join(
|
local clientkeys = gears.table.join(
|
||||||
awful.key({global.modkey, "Shift"},"c",
|
awful.key({global.modkey, "Shift"},"c",
|
||||||
function(c)
|
function(c)
|
||||||
|
|
|
@ -0,0 +1,108 @@
|
||||||
|
local awmtk2 = require("awmtk2")
|
||||||
|
local gears = require("gears")
|
||||||
|
local wibox = require("wibox")
|
||||||
|
local awful = require("awful")
|
||||||
|
local beautiful = require("beautiful")
|
||||||
|
|
||||||
|
-- {{{ Global widgets
|
||||||
|
local runmenu = require("widgets.dismal")({})
|
||||||
|
|
||||||
|
-- }}}
|
||||||
|
|
||||||
|
-- {{{ Titlebars
|
||||||
|
local style = awmtk2.create_style("titlebar",awmtk2.default,{})
|
||||||
|
style.titlebar_top = awmtk2.create_delta("titlebar_top", {},
|
||||||
|
(beautiful.widgets and beautiful.widgets.titlebar) or {}, style.titlebar)
|
||||||
|
style.titlebar_left = awmtk2.create_delta("titlebar_left", {},
|
||||||
|
(beautiful.widgets and beautiful.widgets.titlebar) or {}, style.titlebar)
|
||||||
|
style.titlebar_right = awmtk2.create_delta("titlebar_right", {},
|
||||||
|
(beautiful.widgets and beautiful.widgets.titlebar) or {}, style.titlebar)
|
||||||
|
style.titlebar_bottom = awmtk2.create_delta("titlebar_bottom", {},
|
||||||
|
(beautiful.widgets and beautiful.widgets.titlebar) or {}, style.titlebar)
|
||||||
|
local templates = awmtk2.create_template_lib("titlebar",awmtk2.templates,{})
|
||||||
|
local t = awmtk2.build_templates(templates,style)
|
||||||
|
table.insert(awful.rules.rules,
|
||||||
|
{ rule_any = {type = { "normal", "dialog" }
|
||||||
|
}, properties = { titlebars_enabled = true }
|
||||||
|
}
|
||||||
|
)
|
||||||
|
client.connect_signal("request::titlebars",function(c)
|
||||||
|
local buttons = gears.table.join(
|
||||||
|
awful.button({}, 1, function()
|
||||||
|
c:emit_signal("request::activate","titlebar",{raise=true})
|
||||||
|
awful.mouse.client.move(c)
|
||||||
|
end),
|
||||||
|
awful.button({}, 3, function()
|
||||||
|
c:emit_signal("request::activate","titlebar",{raise=true})
|
||||||
|
awful.mouse.client.resize(c)
|
||||||
|
end)
|
||||||
|
)
|
||||||
|
|
||||||
|
awful.titlebar(c,{
|
||||||
|
size = style.titlebar_top.size or 16,
|
||||||
|
bg_normal = style.titlebar_top.bg_normal,
|
||||||
|
bg_focus = style.titlebar_top.bg_focus,
|
||||||
|
bgimage_normal = style.titlebar_top.bgimage_normal,
|
||||||
|
bgimage_focus = style.titlebar_top.bgimage_focus,
|
||||||
|
fg_normal = style.titlebar_top.fg_normal,
|
||||||
|
fg_focus = style.titlebar_top.fg_focus,
|
||||||
|
font = style.titlebar_top.font
|
||||||
|
}):setup(t.titlebar({
|
||||||
|
{ -- Left
|
||||||
|
awful.titlebar.widget.iconwidget(c),
|
||||||
|
buttons = buttons,
|
||||||
|
layout = wibox.layout.fixed.horizontal
|
||||||
|
},
|
||||||
|
{ -- Middle
|
||||||
|
{ -- Title
|
||||||
|
align = "center",
|
||||||
|
widget = awful.titlebar.widget.titlewidget(c)
|
||||||
|
},
|
||||||
|
buttons = buttons,
|
||||||
|
layout = wibox.layout.flex.horizontal
|
||||||
|
},
|
||||||
|
{ -- Right
|
||||||
|
awful.titlebar.widget.floatingbutton (c),
|
||||||
|
awful.titlebar.widget.maximizedbutton(c),
|
||||||
|
awful.titlebar.widget.stickybutton (c),
|
||||||
|
awful.titlebar.widget.ontopbutton (c),
|
||||||
|
awful.titlebar.widget.closebutton (c),
|
||||||
|
layout = wibox.layout.fixed.horizontal()
|
||||||
|
},
|
||||||
|
layout = wibox.layout.align.horizontal
|
||||||
|
}))
|
||||||
|
awful.titlebar(c,{
|
||||||
|
size = style.titlebar_right.size or 0,
|
||||||
|
position = "right",
|
||||||
|
bg_normal = style.titlebar_right.bg_normal,
|
||||||
|
bg_focus = style.titlebar_right.bg_focus,
|
||||||
|
bgimage_normal = style.titlebar_right.bgimage_normal,
|
||||||
|
bgimage_focus = style.titlebar_right.bgimage_focus,
|
||||||
|
fg_normal = style.titlebar_right.fg_normal,
|
||||||
|
fg_focus = style.titlebar_right.fg_focus,
|
||||||
|
font = style.titlebar_right.font
|
||||||
|
}):setup(t.titlebar({widget = wibox.container.background}))
|
||||||
|
awful.titlebar(c,{
|
||||||
|
size = style.titlebar_bottom.size or 0,
|
||||||
|
position = "bottom",
|
||||||
|
bg_normal = style.titlebar_bottom.bg_normal,
|
||||||
|
bg_focus = style.titlebar_bottom.bg_focus,
|
||||||
|
bgimage_normal = style.titlebar_bottom.bgimage_normal,
|
||||||
|
bgimage_focus = style.titlebar_bottom.bgimage_focus,
|
||||||
|
fg_normal = style.titlebar_bottom.fg_normal,
|
||||||
|
fg_focus = style.titlebar_bottom.fg_focus,
|
||||||
|
font = style.titlebar_bottom.font
|
||||||
|
}):setup(t.titlebar({widget = wibox.container.background}))
|
||||||
|
awful.titlebar(c,{
|
||||||
|
size = style.titlebar_left.size or 0,
|
||||||
|
position = "left",
|
||||||
|
bg_normal = style.titlebar_left.bg_normal,
|
||||||
|
bg_focus = style.titlebar_left.bg_focus,
|
||||||
|
bgimage_normal = style.titlebar_left.bgimage_normal,
|
||||||
|
bgimage_focus = style.titlebar_left.bgimage_focus,
|
||||||
|
fg_normal = style.titlebar_left.fg_normal,
|
||||||
|
fg_focus = style.titlebar_left.fg_focus,
|
||||||
|
font = style.titlebar_left.font
|
||||||
|
}):setup(t.titlebar({widget = wibox.container.background}))
|
||||||
|
end)
|
||||||
|
--}}}
|
|
@ -0,0 +1,8 @@
|
||||||
|
-- Global settings
|
||||||
|
global = {}
|
||||||
|
global.terminal = "xfce4-terminal" --Mod+Enter (spawn terminal)
|
||||||
|
global.browser = "prime-run librewolf" --Mod+Shift+Enter (spawn browser)
|
||||||
|
global.modkey = "Mod4" -- Default modifier key
|
||||||
|
global.theme = "reno98"
|
||||||
|
global.shell = "zsh"
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
local menu = require("widgets.dismal")({})
|
|
||||||
local gears = require("gears")
|
|
||||||
local awful = require("awful")
|
|
||||||
root.buttons(gears.table.join(
|
|
||||||
awful.button({}, 3, function() end),
|
|
||||||
awful.button({}, 4, awful.tag.viewnext),
|
|
||||||
awful.button({}, 5, awful.tag.viewprev)
|
|
||||||
))
|
|
3
rc.lua
|
@ -7,10 +7,11 @@ package.cpath = package.cpath
|
||||||
..";"..root_path.."/libs/?.so"
|
..";"..root_path.."/libs/?.so"
|
||||||
|
|
||||||
-- Modules list
|
-- Modules list
|
||||||
|
require("modules.global")
|
||||||
require("modules.errorlog")
|
require("modules.errorlog")
|
||||||
require("modules.base")
|
require("modules.base")
|
||||||
require("modules.binds")
|
require("modules.binds")
|
||||||
require("modules.xdg_data")
|
require("modules.xdg_data")
|
||||||
require("modules.autostart")
|
require("modules.autostart")
|
||||||
require("modules.static_tags")
|
require("modules.static_tags")
|
||||||
require("modules.menu_test")
|
require("modules.desktop")
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
Background images:
|
||||||
|
Mikael Eriksson <mikael_eriksson@miffe.org>
|
||||||
|
Licensed under CC-BY-SA-3.0
|
After Width: | Height: | Size: 218 KiB |
After Width: | Height: | Size: 262 KiB |
After Width: | Height: | Size: 272 B |
After Width: | Height: | Size: 272 B |
After Width: | Height: | Size: 263 B |
After Width: | Height: | Size: 264 B |
After Width: | Height: | Size: 264 B |
After Width: | Height: | Size: 264 B |
After Width: | Height: | Size: 263 B |
After Width: | Height: | Size: 264 B |
After Width: | Height: | Size: 320 B |
After Width: | Height: | Size: 320 B |
After Width: | Height: | Size: 245 B |
After Width: | Height: | Size: 245 B |
After Width: | Height: | Size: 246 B |
After Width: | Height: | Size: 246 B |
After Width: | Height: | Size: 282 B |
After Width: | Height: | Size: 282 B |
After Width: | Height: | Size: 866 B |
After Width: | Height: | Size: 865 B |
After Width: | Height: | Size: 345 B |
After Width: | Height: | Size: 345 B |
After Width: | Height: | Size: 574 B |
After Width: | Height: | Size: 581 B |
After Width: | Height: | Size: 328 B |
After Width: | Height: | Size: 328 B |
After Width: | Height: | Size: 265 B |
After Width: | Height: | Size: 264 B |
After Width: | Height: | Size: 264 B |
After Width: | Height: | Size: 266 B |
After Width: | Height: | Size: 266 B |
After Width: | Height: | Size: 260 B |
After Width: | Height: | Size: 265 B |
After Width: | Height: | Size: 265 B |
After Width: | Height: | Size: 440 B |
After Width: | Height: | Size: 187 B |
After Width: | Height: | Size: 193 B |
|
@ -0,0 +1,364 @@
|
||||||
|
local theme_assets = require("beautiful.theme_assets")
|
||||||
|
local xresources = require("beautiful.xresources")
|
||||||
|
local dpi = xresources.apply_dpi
|
||||||
|
local gears = require("gears")
|
||||||
|
|
||||||
|
local gfs = require("gears.filesystem")
|
||||||
|
local themes_path = gfs.get_themes_dir()
|
||||||
|
|
||||||
|
local theme = {}
|
||||||
|
|
||||||
|
theme.font = "Liberation Sans 8"
|
||||||
|
|
||||||
|
theme.bg_normal = "#c0c0c0"
|
||||||
|
theme.bg_focus = "#808080"
|
||||||
|
theme.bg_urgent = "#FFEDCC"
|
||||||
|
theme.bg_minimize = "#dfdfdf"
|
||||||
|
theme.bg_highlight_shadow = "#000000FF"
|
||||||
|
theme.bg_highlight_light = "#FFFFFFFF"
|
||||||
|
theme.bg_highlight_outline = "#808080FF"
|
||||||
|
theme.bg_systray = theme.bg_normal
|
||||||
|
|
||||||
|
theme.fg_normal = "#000000"
|
||||||
|
theme.fg_focus = "#000000"
|
||||||
|
theme.fg_urgent = "#000000"
|
||||||
|
theme.fg_minimize = "#000000"
|
||||||
|
|
||||||
|
theme.useless_gap = dpi(0)
|
||||||
|
-- technically speaking these are irrelevant since they're not exactly smart
|
||||||
|
-- borders
|
||||||
|
theme.border_width = dpi(0)
|
||||||
|
theme.border_normal = "#c0c0c0"
|
||||||
|
theme.border_focus = "#c0c0c0"
|
||||||
|
theme.border_marked = "#c0c0c0"
|
||||||
|
|
||||||
|
theme.titlebar_bg_focus = {
|
||||||
|
type = "linear",
|
||||||
|
from = { 0, 0 },
|
||||||
|
to = { 640, 0 },
|
||||||
|
stops = { {0, "#040582"}, {1, "#0F7FCD"} }
|
||||||
|
}
|
||||||
|
|
||||||
|
theme.titlebar_bg_normal = {
|
||||||
|
type = "linear",
|
||||||
|
from = { 0, 0 },
|
||||||
|
to = { 640, 0 },
|
||||||
|
stops = { {0, "#828282"}, {1, "#AFAFAF"} }
|
||||||
|
}
|
||||||
|
local taglist_square_size = dpi(4)
|
||||||
|
theme.taglist_squares_sel = theme_assets.taglist_squares_sel(
|
||||||
|
taglist_square_size, theme.fg_normal
|
||||||
|
)
|
||||||
|
theme.taglist_squares_unsel = theme_assets.taglist_squares_unsel(
|
||||||
|
taglist_square_size, theme.fg_normal
|
||||||
|
)
|
||||||
|
theme.menu_submenu_icon = themes_path.."default/submenu.png"
|
||||||
|
theme.menu_height = dpi(15)
|
||||||
|
theme.menu_width = dpi(100)
|
||||||
|
|
||||||
|
-- Define the image to load
|
||||||
|
theme.titlebar_close_button_normal = themes_path.."default/titlebar/close_normal.png"
|
||||||
|
theme.titlebar_close_button_focus = themes_path.."default/titlebar/close_focus.png"
|
||||||
|
|
||||||
|
theme.titlebar_minimize_button_normal = themes_path.."default/titlebar/minimize_normal.png"
|
||||||
|
theme.titlebar_minimize_button_focus = themes_path.."default/titlebar/minimize_focus.png"
|
||||||
|
|
||||||
|
theme.titlebar_ontop_button_normal_inactive = themes_path.."default/titlebar/ontop_normal_inactive.png"
|
||||||
|
theme.titlebar_ontop_button_focus_inactive = themes_path.."default/titlebar/ontop_focus_inactive.png"
|
||||||
|
theme.titlebar_ontop_button_normal_active = themes_path.."default/titlebar/ontop_normal_active.png"
|
||||||
|
theme.titlebar_ontop_button_focus_active = themes_path.."default/titlebar/ontop_focus_active.png"
|
||||||
|
|
||||||
|
theme.titlebar_sticky_button_normal_inactive = themes_path.."default/titlebar/sticky_normal_inactive.png"
|
||||||
|
theme.titlebar_sticky_button_focus_inactive = themes_path.."default/titlebar/sticky_focus_inactive.png"
|
||||||
|
theme.titlebar_sticky_button_normal_active = themes_path.."default/titlebar/sticky_normal_active.png"
|
||||||
|
theme.titlebar_sticky_button_focus_active = themes_path.."default/titlebar/sticky_focus_active.png"
|
||||||
|
|
||||||
|
theme.titlebar_floating_button_normal_inactive = themes_path.."default/titlebar/floating_normal_inactive.png"
|
||||||
|
theme.titlebar_floating_button_focus_inactive = themes_path.."default/titlebar/floating_focus_inactive.png"
|
||||||
|
theme.titlebar_floating_button_normal_active = themes_path.."default/titlebar/floating_normal_active.png"
|
||||||
|
theme.titlebar_floating_button_focus_active = themes_path.."default/titlebar/floating_focus_active.png"
|
||||||
|
|
||||||
|
theme.titlebar_maximized_button_normal_inactive = themes_path.."default/titlebar/maximized_normal_inactive.png"
|
||||||
|
theme.titlebar_maximized_button_focus_inactive = themes_path.."default/titlebar/maximized_focus_inactive.png"
|
||||||
|
theme.titlebar_maximized_button_normal_active = themes_path.."default/titlebar/maximized_normal_active.png"
|
||||||
|
theme.titlebar_maximized_button_focus_active = themes_path.."default/titlebar/maximized_focus_active.png"
|
||||||
|
|
||||||
|
theme.wallpaper = themes_path.."default/background.png"
|
||||||
|
|
||||||
|
-- You can use your own layout icons like this:
|
||||||
|
theme.layout_fairh = themes_path.."default/layouts/fairhw.png"
|
||||||
|
theme.layout_fairv = themes_path.."default/layouts/fairvw.png"
|
||||||
|
theme.layout_floating = themes_path.."default/layouts/floatingw.png"
|
||||||
|
theme.layout_magnifier = themes_path.."default/layouts/magnifierw.png"
|
||||||
|
theme.layout_max = themes_path.."default/layouts/maxw.png"
|
||||||
|
theme.layout_fullscreen = themes_path.."default/layouts/fullscreenw.png"
|
||||||
|
theme.layout_tilebottom = themes_path.."default/layouts/tilebottomw.png"
|
||||||
|
theme.layout_tileleft = themes_path.."default/layouts/tileleftw.png"
|
||||||
|
theme.layout_tile = themes_path.."default/layouts/tilew.png"
|
||||||
|
theme.layout_tiletop = themes_path.."default/layouts/tiletopw.png"
|
||||||
|
theme.layout_spiral = themes_path.."default/layouts/spiralw.png"
|
||||||
|
theme.layout_dwindle = themes_path.."default/layouts/dwindlew.png"
|
||||||
|
theme.layout_cornernw = themes_path.."default/layouts/cornernww.png"
|
||||||
|
theme.layout_cornerne = themes_path.."default/layouts/cornernew.png"
|
||||||
|
theme.layout_cornersw = themes_path.."default/layouts/cornersww.png"
|
||||||
|
theme.layout_cornerse = themes_path.."default/layouts/cornersew.png"
|
||||||
|
|
||||||
|
-- Generate Awesome icon:
|
||||||
|
theme.awesome_icon = theme_assets.awesome_icon(
|
||||||
|
theme.menu_height, theme.bg_focus, theme.fg_focus
|
||||||
|
)
|
||||||
|
|
||||||
|
theme.bgimage_outset = function(context, cr, width, height,...)
|
||||||
|
local light = gears.color(theme.bg_highlight_light)
|
||||||
|
local shadow = gears.color(theme.bg_highlight_shadow)
|
||||||
|
local outline = gears.color(theme.bg_highlight_outline)
|
||||||
|
-- Background
|
||||||
|
|
||||||
|
-- Light
|
||||||
|
cr:set_source(light)
|
||||||
|
cr.line_width=2
|
||||||
|
cr:move_to(0,0)
|
||||||
|
cr:line_to(width,0)
|
||||||
|
cr:move_to(0,0)
|
||||||
|
cr:line_to(0,height)
|
||||||
|
cr:stroke()
|
||||||
|
|
||||||
|
-- Outline
|
||||||
|
cr:set_source(outline)
|
||||||
|
cr:move_to(width-1,height-1)
|
||||||
|
cr:line_to(width-1,1)
|
||||||
|
cr:move_to(width-2,height-1)
|
||||||
|
cr:line_to(1,height-1)
|
||||||
|
cr:stroke()
|
||||||
|
|
||||||
|
-- Shadow
|
||||||
|
cr:set_source(shadow)
|
||||||
|
cr:move_to(width,height)
|
||||||
|
cr:line_to(width,0)
|
||||||
|
cr:move_to(width-1,height)
|
||||||
|
cr:line_to(0,height)
|
||||||
|
cr:stroke()
|
||||||
|
end
|
||||||
|
|
||||||
|
theme.bgimage_inset = function(context,cr,width,height)
|
||||||
|
local light = gears.color(theme.bg_highlight_light)
|
||||||
|
local shadow = gears.color(theme.bg_highlight_shadow)
|
||||||
|
local outline = gears.color(theme.bg_highlight_outline)
|
||||||
|
|
||||||
|
-- Light
|
||||||
|
cr:set_source(light)
|
||||||
|
cr.line_width=2
|
||||||
|
cr:move_to(width,height)
|
||||||
|
cr:line_to(width,0)
|
||||||
|
cr:move_to(width,height)
|
||||||
|
cr:line_to(0,height)
|
||||||
|
cr:stroke()
|
||||||
|
|
||||||
|
-- Shadow
|
||||||
|
cr:set_source(shadow)
|
||||||
|
cr.line_width=2
|
||||||
|
cr:move_to(0,0)
|
||||||
|
cr:line_to(0,height)
|
||||||
|
cr:move_to(0,0)
|
||||||
|
cr:line_to(width,0)
|
||||||
|
cr:stroke()
|
||||||
|
end
|
||||||
|
|
||||||
|
theme.bgimage_highlight = function(context,cr,width,height)
|
||||||
|
local light = gears.color(theme.bg_highlight_light)
|
||||||
|
local shadow = gears.color(theme.bg_highlight_shadow)
|
||||||
|
local outline = gears.color(theme.bg_highlight_outline)
|
||||||
|
|
||||||
|
-- Light
|
||||||
|
cr:set_source(light)
|
||||||
|
cr.line_width=2
|
||||||
|
cr:move_to(1,1)
|
||||||
|
cr:line_to(1,height-2)
|
||||||
|
cr:move_to(1,1)
|
||||||
|
cr:line_to(width-2,1)
|
||||||
|
cr:stroke()
|
||||||
|
|
||||||
|
-- Outline
|
||||||
|
cr:set_source(outline)
|
||||||
|
cr.line_width=2
|
||||||
|
cr:rectangle(0,0,width-1,height-1)
|
||||||
|
cr:stroke()
|
||||||
|
|
||||||
|
-- Light (bottom)
|
||||||
|
cr:set_source(light)
|
||||||
|
cr:move_to(width,height)
|
||||||
|
cr:line_to(width,0)
|
||||||
|
cr:move_to(width,height)
|
||||||
|
cr:line_to(0,height)
|
||||||
|
cr:stroke()
|
||||||
|
end
|
||||||
|
|
||||||
|
-- A complex piece of "code" to simulate borders.
|
||||||
|
theme.titlebar_bgimage_top = function(context, cr, width, height,...)
|
||||||
|
local light = gears.color(theme.bg_highlight_light)
|
||||||
|
local shadow = gears.color(theme.bg_highlight_shadow)
|
||||||
|
local outline = gears.color(theme.bg_highlight_outline)
|
||||||
|
cr.line_width = 2
|
||||||
|
cr:set_source(gears.color(theme.bg_normal))
|
||||||
|
cr:rectangle(2,2,width-5,height-3)
|
||||||
|
cr:stroke()
|
||||||
|
-- Light
|
||||||
|
cr:set_source(light)
|
||||||
|
cr.line_width=2
|
||||||
|
cr:move_to(0,0)
|
||||||
|
cr:line_to(width,0)
|
||||||
|
cr:move_to(0,0)
|
||||||
|
cr:line_to(0,height)
|
||||||
|
cr:stroke()
|
||||||
|
|
||||||
|
-- Outline
|
||||||
|
cr:set_source(outline)
|
||||||
|
cr:move_to(width-1,height)
|
||||||
|
cr:line_to(width-1,1)
|
||||||
|
cr:stroke()
|
||||||
|
|
||||||
|
-- Shadow
|
||||||
|
cr:set_source(shadow)
|
||||||
|
cr:move_to(width,height)
|
||||||
|
cr:line_to(width,0)
|
||||||
|
cr:stroke()
|
||||||
|
end
|
||||||
|
theme.titlebar_bgimage_bottom = function(context, cr, width, height, ...)
|
||||||
|
local light = gears.color(theme.bg_highlight_light)
|
||||||
|
local shadow = gears.color(theme.bg_highlight_shadow)
|
||||||
|
local outline = gears.color(theme.bg_highlight_outline)
|
||||||
|
-- Background
|
||||||
|
|
||||||
|
-- Light
|
||||||
|
cr:set_source(light)
|
||||||
|
cr.line_width=2
|
||||||
|
cr:move_to(0,0)
|
||||||
|
cr:line_to(0,height)
|
||||||
|
cr:stroke()
|
||||||
|
|
||||||
|
-- Outline
|
||||||
|
cr:set_source(outline)
|
||||||
|
cr:move_to(width-1,height-1)
|
||||||
|
cr:line_to(width-1,0)
|
||||||
|
cr:move_to(width-2,height-1)
|
||||||
|
cr:line_to(1,height-1)
|
||||||
|
cr:stroke()
|
||||||
|
|
||||||
|
-- Shadow
|
||||||
|
cr:set_source(shadow)
|
||||||
|
cr:move_to(width,height)
|
||||||
|
cr:line_to(width,0)
|
||||||
|
cr:move_to(width-1,height)
|
||||||
|
cr:line_to(0,height)
|
||||||
|
cr:stroke()
|
||||||
|
|
||||||
|
end
|
||||||
|
theme.titlebar_bgimage_left = function(context, cr, width, height,...)
|
||||||
|
local light = gears.color(theme.bg_highlight_light)
|
||||||
|
-- Light
|
||||||
|
cr:set_source(light)
|
||||||
|
cr.line_width=2
|
||||||
|
cr:move_to(0,0)
|
||||||
|
cr:line_to(0,height)
|
||||||
|
cr:stroke()
|
||||||
|
end
|
||||||
|
theme.titlebar_bgimage_right = function(context, cr, width, height,...)
|
||||||
|
local shadow = gears.color(theme.bg_highlight_shadow)
|
||||||
|
local outline = gears.color(theme.bg_highlight_outline)
|
||||||
|
cr.line_width=2
|
||||||
|
|
||||||
|
-- Outline
|
||||||
|
cr:set_source(outline)
|
||||||
|
cr:move_to(width-1,height)
|
||||||
|
cr:line_to(width-1,0)
|
||||||
|
cr:stroke()
|
||||||
|
|
||||||
|
-- Shadow
|
||||||
|
cr:set_source(shadow)
|
||||||
|
cr:move_to(width,height)
|
||||||
|
cr:line_to(width,0)
|
||||||
|
cr:stroke()
|
||||||
|
end
|
||||||
|
|
||||||
|
---theme.bgimage_outset
|
||||||
|
-- Define the icon theme for application icons. If not set then the icons
|
||||||
|
-- from /usr/share/icons and /usr/share/icons/hicolor will be used.
|
||||||
|
theme.icon_theme = nil
|
||||||
|
|
||||||
|
theme.widgets = {
|
||||||
|
default = {
|
||||||
|
container = {
|
||||||
|
bgimage = theme.bgimage_highlight,
|
||||||
|
shape = function(cr,width,height)
|
||||||
|
return require("gears").shape.rounded_rect(cr,width,height,0)
|
||||||
|
end
|
||||||
|
},
|
||||||
|
button = {
|
||||||
|
bgimage = theme.bgimage_outset,
|
||||||
|
shape = function(cr,width,height)
|
||||||
|
return require("gears").shape.rounded_rect(cr,width,height,0)
|
||||||
|
end,
|
||||||
|
onpress = function(widget)
|
||||||
|
widget:set_bg(theme.bg_focus)
|
||||||
|
widget:set_bgimage(theme.bgimage_inset)
|
||||||
|
end,
|
||||||
|
onrelease = function(widget)
|
||||||
|
widget:set_bg(theme.bg_normal)
|
||||||
|
widget:set_bgimage(theme.bgimage_outset)
|
||||||
|
end
|
||||||
|
},
|
||||||
|
popup = {
|
||||||
|
bgimage = theme.bgimage_outset,
|
||||||
|
shape = function(cr,width,height)
|
||||||
|
return gears.shape.rounded_rect(cr,width,height,0)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
titlebar = {
|
||||||
|
bgimage = theme.bgimage_outset,
|
||||||
|
margins = 4,
|
||||||
|
left = 5,
|
||||||
|
right = 5
|
||||||
|
}
|
||||||
|
},
|
||||||
|
dismal = {
|
||||||
|
container = {
|
||||||
|
bg = theme.bg_focus
|
||||||
|
},
|
||||||
|
button = {
|
||||||
|
height = 34
|
||||||
|
}
|
||||||
|
},
|
||||||
|
titlebar = {
|
||||||
|
titlebar_top = {
|
||||||
|
bgimage_normal = theme.titlebar_bgimage_top,
|
||||||
|
bgimage_focus = theme.titlebar_bgimage_top,
|
||||||
|
bg_focus = theme.titlebar_bg_focus,
|
||||||
|
bg_normal = theme.titlebar_bg_normal,
|
||||||
|
fg_focus = "#FAFAFA",
|
||||||
|
fg_normal = theme.fg_normal,
|
||||||
|
size = 22
|
||||||
|
},
|
||||||
|
titlebar_left = {
|
||||||
|
bgimage_normal = theme.titlebar_bgimage_left,
|
||||||
|
bgimage_focus = theme.titlebar_bgimage_left,
|
||||||
|
size = 4,
|
||||||
|
bg_focus = theme.bg_normal
|
||||||
|
},
|
||||||
|
titlebar_right = {
|
||||||
|
bgimage_normal = theme.titlebar_bgimage_right,
|
||||||
|
bgimage_focus = theme.titlebar_bgimage_right,
|
||||||
|
size = 4,
|
||||||
|
bg_focus = theme.bg_normal
|
||||||
|
},
|
||||||
|
titlebar_bottom = {
|
||||||
|
bgimage_normal = theme.titlebar_bgimage_bottom,
|
||||||
|
bgimage_focus = theme.titlebar_bgimage_bottom,
|
||||||
|
size = 4,
|
||||||
|
bg_focus = theme.bg_normal
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return theme
|
||||||
|
|
||||||
|
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
|
After Width: | Height: | Size: 966 B |
After Width: | Height: | Size: 966 B |
After Width: | Height: | Size: 386 B |
After Width: | Height: | Size: 237 B |
After Width: | Height: | Size: 386 B |
After Width: | Height: | Size: 237 B |
After Width: | Height: | Size: 480 B |
After Width: | Height: | Size: 452 B |
After Width: | Height: | Size: 480 B |
After Width: | Height: | Size: 452 B |
After Width: | Height: | Size: 234 B |
After Width: | Height: | Size: 225 B |
After Width: | Height: | Size: 467 B |
After Width: | Height: | Size: 604 B |
After Width: | Height: | Size: 467 B |
After Width: | Height: | Size: 604 B |
After Width: | Height: | Size: 654 B |
After Width: | Height: | Size: 758 B |
After Width: | Height: | Size: 654 B |
After Width: | Height: | Size: 758 B |
|
@ -3,6 +3,7 @@ local awmtk2 = require("awmtk2")
|
||||||
local wibox = require("wibox")
|
local wibox = require("wibox")
|
||||||
local gears = require("gears")
|
local gears = require("gears")
|
||||||
local awful = require("awful")
|
local awful = require("awful")
|
||||||
|
local beautiful = require("beautiful")
|
||||||
|
|
||||||
local xdg_search = function(name,rlimit)
|
local xdg_search = function(name,rlimit)
|
||||||
local results = {}
|
local results = {}
|
||||||
|
@ -38,7 +39,7 @@ return function(args)
|
||||||
forced_width = style.button.width or 180
|
forced_width = style.button.width or 180
|
||||||
}),
|
}),
|
||||||
t.textbox({
|
t.textbox({
|
||||||
markup = "<b>Enter</b> - Run;\n<b>Ctrl+Enter</b> - run in terminal"
|
markup = "<b>Enter</b> - run\n<b>Ctrl+Enter</b> - run in terminal"
|
||||||
}),
|
}),
|
||||||
spacing = style.container.spacing,
|
spacing = style.container.spacing,
|
||||||
layout = wibox.layout.fixed.vertical
|
layout = wibox.layout.fixed.vertical
|
||||||
|
@ -46,18 +47,24 @@ return function(args)
|
||||||
local button_cache = gears.cache(function(name,exec,description,icon)
|
local button_cache = gears.cache(function(name,exec,description,icon)
|
||||||
-- beacause apparently cache doesn't allow nil values
|
-- beacause apparently cache doesn't allow nil values
|
||||||
if icon == "" then icon = nil end
|
if icon == "" then icon = nil end
|
||||||
|
-- contents of our button
|
||||||
local widget = wibox.widget(t.button(t.article({
|
local widget = wibox.widget(t.button(t.article({
|
||||||
icon = icon,
|
icon = icon,
|
||||||
resize = true,
|
resize = true,
|
||||||
title = name,
|
title = name,
|
||||||
description = description,
|
description = description,
|
||||||
icon_size = (style.button.height and
|
icon_size = (style.button.height and
|
||||||
(style.button.height-style.container.margins)) or
|
(style.button.height-style.button.margins)) or
|
||||||
30-style.container.margins
|
34-style.button.margins
|
||||||
}),{
|
}),{
|
||||||
forced_height = style.button.height or 30
|
forced_height = style.button.height or 30
|
||||||
}))
|
}))
|
||||||
local exec = exec:gsub("%%%w","")
|
local exec = exec:gsub("%%%w","")
|
||||||
|
-- theme-declared highlight function, because why not
|
||||||
|
-- maybe you'd like to add duck noises to button presses idk.
|
||||||
|
widget:connect_signal("button::press",style.button.onpress)
|
||||||
|
widget:connect_signal("button::release",style.button.onrelease)
|
||||||
|
widget:connect_signal("mouses::leave",style.button.onrelease)
|
||||||
widget:buttons(
|
widget:buttons(
|
||||||
gears.table.join(
|
gears.table.join(
|
||||||
awful.button({},1,function()
|
awful.button({},1,function()
|
||||||
|
@ -87,6 +94,7 @@ return function(args)
|
||||||
root.keys(gears.table.join(
|
root.keys(gears.table.join(
|
||||||
root.keys(),
|
root.keys(),
|
||||||
awful.key({ global.modkey }, "r", function()
|
awful.key({ global.modkey }, "r", function()
|
||||||
|
results_list:reset()
|
||||||
launchpad.visible = true
|
launchpad.visible = true
|
||||||
if launchpad.visible then
|
if launchpad.visible then
|
||||||
awful.prompt.run {
|
awful.prompt.run {
|
||||||
|
|