Browse Source

Reno 98 preview

master
Yessiest 2 years ago
parent
commit
9903e67202
  1. 126
      libs/awmtk2.lua
  2. 10
      modules/base.lua
  3. 7
      modules/binds.lua
  4. 108
      modules/desktop.lua
  5. 8
      modules/global.lua
  6. 8
      modules/menu_test.lua
  7. 3
      rc.lua
  8. 3
      themes/reno98/README
  9. BIN
      themes/reno98/background.png
  10. BIN
      themes/reno98/background_white.png
  11. BIN
      themes/reno98/layouts/cornerne.png
  12. BIN
      themes/reno98/layouts/cornernew.png
  13. BIN
      themes/reno98/layouts/cornernw.png
  14. BIN
      themes/reno98/layouts/cornernww.png
  15. BIN
      themes/reno98/layouts/cornerse.png
  16. BIN
      themes/reno98/layouts/cornersew.png
  17. BIN
      themes/reno98/layouts/cornersw.png
  18. BIN
      themes/reno98/layouts/cornersww.png
  19. BIN
      themes/reno98/layouts/dwindle.png
  20. BIN
      themes/reno98/layouts/dwindlew.png
  21. BIN
      themes/reno98/layouts/fairh.png
  22. BIN
      themes/reno98/layouts/fairhw.png
  23. BIN
      themes/reno98/layouts/fairv.png
  24. BIN
      themes/reno98/layouts/fairvw.png
  25. BIN
      themes/reno98/layouts/floating.png
  26. BIN
      themes/reno98/layouts/floatingw.png
  27. BIN
      themes/reno98/layouts/fullscreen.png
  28. BIN
      themes/reno98/layouts/fullscreenw.png
  29. BIN
      themes/reno98/layouts/magnifier.png
  30. BIN
      themes/reno98/layouts/magnifierw.png
  31. BIN
      themes/reno98/layouts/max.png
  32. BIN
      themes/reno98/layouts/maxw.png
  33. BIN
      themes/reno98/layouts/spiral.png
  34. BIN
      themes/reno98/layouts/spiralw.png
  35. BIN
      themes/reno98/layouts/tile.png
  36. BIN
      themes/reno98/layouts/tilebottom.png
  37. BIN
      themes/reno98/layouts/tilebottomw.png
  38. BIN
      themes/reno98/layouts/tileleft.png
  39. BIN
      themes/reno98/layouts/tileleftw.png
  40. BIN
      themes/reno98/layouts/tiletop.png
  41. BIN
      themes/reno98/layouts/tiletopw.png
  42. BIN
      themes/reno98/layouts/tilew.png
  43. BIN
      themes/reno98/submenu.png
  44. BIN
      themes/reno98/taglist/squarefw.png
  45. BIN
      themes/reno98/taglist/squarew.png
  46. 364
      themes/reno98/theme.lua
  47. BIN
      themes/reno98/titlebar/close_focus.png
  48. BIN
      themes/reno98/titlebar/close_normal.png
  49. BIN
      themes/reno98/titlebar/floating_focus_active.png
  50. BIN
      themes/reno98/titlebar/floating_focus_inactive.png
  51. BIN
      themes/reno98/titlebar/floating_normal_active.png
  52. BIN
      themes/reno98/titlebar/floating_normal_inactive.png
  53. BIN
      themes/reno98/titlebar/maximized_focus_active.png
  54. BIN
      themes/reno98/titlebar/maximized_focus_inactive.png
  55. BIN
      themes/reno98/titlebar/maximized_normal_active.png
  56. BIN
      themes/reno98/titlebar/maximized_normal_inactive.png
  57. BIN
      themes/reno98/titlebar/minimize_focus.png
  58. BIN
      themes/reno98/titlebar/minimize_normal.png
  59. BIN
      themes/reno98/titlebar/ontop_focus_active.png
  60. BIN
      themes/reno98/titlebar/ontop_focus_inactive.png
  61. BIN
      themes/reno98/titlebar/ontop_normal_active.png
  62. BIN
      themes/reno98/titlebar/ontop_normal_inactive.png
  63. BIN
      themes/reno98/titlebar/sticky_focus_active.png
  64. BIN
      themes/reno98/titlebar/sticky_focus_inactive.png
  65. BIN
      themes/reno98/titlebar/sticky_normal_active.png
  66. BIN
      themes/reno98/titlebar/sticky_normal_inactive.png
  67. 14
      widgets/dismal.lua

126
libs/awmtk2.lua

@ -6,14 +6,17 @@ local beautiful = require("beautiful")
local awmtk = {}
-- {{{ Utils
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"
-- 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)
-- Per-instance overrides are top priority
if rawget(self,k) then
return rawget(self,k)
if rawget(instance_delta,k) then
return rawget(instance_delta,k)
-- Class-wide overrides are second in priority
elseif type(class_delta[name]) == "table"
and rawget(class_delta[name],k) then
@ -29,11 +32,13 @@ end
awmtk.create_style = function(name,parent,overrides)
-- A style is essentially a layer of deltas upon the previous (parent) 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
new_style[name] = awmtk.create_delta(
name,
(overrides and overrides[name]) or {},
(beautiful.widgets and beautiful.widgets[style_name]) or {},
odelta,
cdelta,
parent_class
)
end
@ -52,7 +57,7 @@ end
awmtk.build_templates = function(templates,style)
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)
end
return new_templates
@ -70,16 +75,25 @@ end
-- {{{ Default style
-- Default style
awmtk.default = {
awmtk.proto_style = {
base = setmetatable({
-- { Backgrounds
-- custom background color for highlighting elements
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 for popups
shape_border_width = beautiful.shape_border_width or 0,
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
margins = 5,
@ -92,43 +106,50 @@ awmtk.default = {
}
-- Subclasses
awmtk.default.container = awmtk.create_delta("container",{
},awmtk.default,awmtk.default.base)
awmtk.proto_style.container = awmtk.create_delta("container",{
},awmtk.proto_style,awmtk.proto_style.base)
awmtk.default.button = awmtk.create_delta("button",{
awmtk.proto_style.button = awmtk.create_delta("button",{
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
},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"
}, 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,
color = beautiful.bg_focus,
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,
small_font = beautiful.font or "sans 8",
small_font = beautiful.small_font or beautiful.font,
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.default,awmtk.default.base)
-- }}}
awmtk.proto_style.popup = awmtk.create_delta("popup", {
}, 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
awmtk.templates = {
awmtk.proto_templates = {
-- Templates are built first using the given style, then applied to contents
-- through returned function
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 awmtk.merge({
{
@ -136,6 +157,7 @@ awmtk.templates = {
margins = (options and options.margins) or style.container.margins,
widget = wibox.container.margin
},
bgimage = style.container.bgimage,
bg = style.container.bg_normal,
shape = style.container.shape,
widget = wibox.container.background
@ -144,6 +166,9 @@ awmtk.templates = {
end,
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 awmtk.merge({
{
@ -151,6 +176,7 @@ awmtk.templates = {
margins = (options and options.margins) or style.button.margins,
widget = wibox.container.margin
},
bgimage = style.button.bgimage,
bg = style.button.bg_normal,
shape = style.button.shape,
widget = wibox.container.background
@ -158,8 +184,8 @@ awmtk.templates = {
end
end,
textbox = function(style)
-- Nothing fancy here, but you can set per-widget fonts using beautiful.
return function(options)
return awmtk.merge({
font = style.textbox.font,
@ -169,8 +195,9 @@ awmtk.templates = {
end,
hseparator = function(style)
-- Wow, i guess?
return function(options)
awmtk.merge({
return awmtk.merge({
widget = wibox.widget.separator,
orientation = "horizontal",
thickness = style.separator.thickness,
@ -181,8 +208,9 @@ awmtk.templates = {
end,
vseparator = function(style)
-- I'm running out of comments
return function(options)
awmtk.merge({
return awmtk.merge({
widget = wibox.widget.separator,
orientation = "vertical",
thickness = style.separator.thickness,
@ -192,9 +220,10 @@ awmtk.templates = {
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 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 awmtk.merge({
(options.icon and {
@ -237,30 +266,49 @@ awmtk.templates = {
},
spacing = style.article.spacing,
layout = wibox.layout.fixed.horizontal,
bg = style.article.bg_normal,
widget = wibox.container.background
}, options or {})
end
end,
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 awmtk.merge({
widget = {
{
widget,
margins = (options and options.margins) or style.popup.margins,
widget = wibox.container.margin
},
bg = style.popup.bg_normal,
widget = wibox.container.background
widget,
margins = (options and options.margins) or style.popup.margins,
widget = wibox.container.margin
},
bgimage = style.popup.bgimage,
shape = style.popup.shape,
visible = false,
ontop = true
},options or {})
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
}
-- yes
awmtk.default = awmtk.create_style("default",awmtk.proto_style,{})
awmtk.templates = awmtk.create_template_lib("templates",awmtk.proto_templates,{})
-- }}}
return awmtk

10
modules/base.lua

@ -4,14 +4,6 @@ local awful = require("awful")
local beautiful = require("beautiful")
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
--error handling
if awesome.startup_errors then
@ -50,8 +42,6 @@ awful.rules.rules = {
properties = {
focus = awful.client.focus.filter,
raise = true,
keys = clientkeys,
buttons = clientbuttons,
screen = awful.screen.preferred,
border_width = beautiful.border_width,
border_color = beautiful.border_normal,

7
modules/binds.lua

@ -44,6 +44,13 @@ local keys = gears.table.join(
{description = "Open browser", group = "launcher"}))
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(
awful.key({global.modkey, "Shift"},"c",
function(c)

108
modules/desktop.lua

@ -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)
--}}}

8
modules/global.lua

@ -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"

8
modules/menu_test.lua

@ -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"
-- Modules list
require("modules.global")
require("modules.errorlog")
require("modules.base")
require("modules.binds")
require("modules.xdg_data")
require("modules.autostart")
require("modules.static_tags")
require("modules.menu_test")
require("modules.desktop")

3
themes/reno98/README

@ -0,0 +1,3 @@
Background images:
Mikael Eriksson <mikael_eriksson@miffe.org>
Licensed under CC-BY-SA-3.0

BIN
themes/reno98/background.png

After

Width: 2048  |  Height: 1536  |  Size: 218 KiB

BIN
themes/reno98/background_white.png

After

Width: 2048  |  Height: 1536  |  Size: 262 KiB

BIN
themes/reno98/layouts/cornerne.png

After

Width: 64  |  Height: 64  |  Size: 272 B

BIN
themes/reno98/layouts/cornernew.png

After

Width: 64  |  Height: 64  |  Size: 272 B

BIN
themes/reno98/layouts/cornernw.png

After

Width: 64  |  Height: 64  |  Size: 263 B

BIN
themes/reno98/layouts/cornernww.png

After

Width: 64  |  Height: 64  |  Size: 264 B

BIN
themes/reno98/layouts/cornerse.png

After

Width: 64  |  Height: 64  |  Size: 264 B

BIN
themes/reno98/layouts/cornersew.png

After

Width: 64  |  Height: 64  |  Size: 264 B

BIN
themes/reno98/layouts/cornersw.png

After

Width: 64  |  Height: 64  |  Size: 263 B

BIN
themes/reno98/layouts/cornersww.png

After

Width: 64  |  Height: 64  |  Size: 264 B

BIN
themes/reno98/layouts/dwindle.png

After

Width: 64  |  Height: 64  |  Size: 320 B

BIN
themes/reno98/layouts/dwindlew.png

After

Width: 64  |  Height: 64  |  Size: 320 B

BIN
themes/reno98/layouts/fairh.png

After

Width: 64  |  Height: 64  |  Size: 245 B

BIN
themes/reno98/layouts/fairhw.png

After

Width: 64  |  Height: 64  |  Size: 245 B

BIN
themes/reno98/layouts/fairv.png

After

Width: 64  |  Height: 64  |  Size: 246 B

BIN
themes/reno98/layouts/fairvw.png

After

Width: 64  |  Height: 64  |  Size: 246 B

BIN
themes/reno98/layouts/floating.png

After

Width: 64  |  Height: 64  |  Size: 282 B

BIN
themes/reno98/layouts/floatingw.png

After

Width: 64  |  Height: 64  |  Size: 282 B

BIN
themes/reno98/layouts/fullscreen.png

After

Width: 64  |  Height: 64  |  Size: 866 B

BIN
themes/reno98/layouts/fullscreenw.png

After

Width: 64  |  Height: 64  |  Size: 865 B

BIN
themes/reno98/layouts/magnifier.png

After

Width: 64  |  Height: 64  |  Size: 345 B

BIN
themes/reno98/layouts/magnifierw.png

After

Width: 64  |  Height: 64  |  Size: 345 B

BIN
themes/reno98/layouts/max.png

After

Width: 64  |  Height: 64  |  Size: 574 B

BIN
themes/reno98/layouts/maxw.png

After

Width: 64  |  Height: 64  |  Size: 581 B

BIN
themes/reno98/layouts/spiral.png

After

Width: 64  |  Height: 64  |  Size: 328 B

BIN
themes/reno98/layouts/spiralw.png

After

Width: 64  |  Height: 64  |  Size: 328 B

BIN
themes/reno98/layouts/tile.png

After

Width: 64  |  Height: 64  |  Size: 265 B

BIN
themes/reno98/layouts/tilebottom.png

After

Width: 64  |  Height: 64  |  Size: 264 B

BIN
themes/reno98/layouts/tilebottomw.png

After

Width: 64  |  Height: 64  |  Size: 264 B

BIN
themes/reno98/layouts/tileleft.png

After

Width: 64  |  Height: 64  |  Size: 266 B

BIN
themes/reno98/layouts/tileleftw.png

After

Width: 64  |  Height: 64  |  Size: 266 B

BIN
themes/reno98/layouts/tiletop.png

After

Width: 56  |  Height: 56  |  Size: 260 B

BIN
themes/reno98/layouts/tiletopw.png

After

Width: 64  |  Height: 64  |  Size: 265 B

BIN
themes/reno98/layouts/tilew.png

After

Width: 64  |  Height: 64  |  Size: 265 B

BIN
themes/reno98/submenu.png

After

Width: 25  |  Height: 25  |  Size: 440 B

BIN
themes/reno98/taglist/squarefw.png

After

Width: 8  |  Height: 32  |  Size: 187 B

BIN
themes/reno98/taglist/squarew.png

After

Width: 8  |  Height: 32  |  Size: 193 B

364
themes/reno98/theme.lua

@ -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

BIN
themes/reno98/titlebar/close_focus.png

After

Width: 64  |  Height: 64  |  Size: 966 B

BIN
themes/reno98/titlebar/close_normal.png

After

Width: 64  |  Height: 64  |  Size: 966 B

BIN
themes/reno98/titlebar/floating_focus_active.png

After

Width: 64  |  Height: 64  |  Size: 386 B

BIN
themes/reno98/titlebar/floating_focus_inactive.png

After

Width: 64  |  Height: 64  |  Size: 237 B

BIN
themes/reno98/titlebar/floating_normal_active.png

After

Width: 64  |  Height: 64  |  Size: 386 B

BIN
themes/reno98/titlebar/floating_normal_inactive.png

After

Width: 64  |  Height: 64  |  Size: 237 B

BIN
themes/reno98/titlebar/maximized_focus_active.png

After

Width: 64  |  Height: 64  |  Size: 480 B

BIN
themes/reno98/titlebar/maximized_focus_inactive.png

After

Width: 64  |  Height: 64  |  Size: 452 B

BIN
themes/reno98/titlebar/maximized_normal_active.png

After

Width: 64  |  Height: 64  |  Size: 480 B

BIN
themes/reno98/titlebar/maximized_normal_inactive.png

After

Width: 64  |  Height: 64  |  Size: 452 B

BIN
themes/reno98/titlebar/minimize_focus.png

After

Width: 64  |  Height: 64  |  Size: 234 B

BIN
themes/reno98/titlebar/minimize_normal.png

After

Width: 64  |  Height: 64  |  Size: 225 B

BIN
themes/reno98/titlebar/ontop_focus_active.png

After

Width: 64  |  Height: 64  |  Size: 467 B

BIN
themes/reno98/titlebar/ontop_focus_inactive.png

After

Width: 64  |  Height: 64  |  Size: 604 B

BIN
themes/reno98/titlebar/ontop_normal_active.png

After

Width: 64  |  Height: 64  |  Size: 467 B

BIN
themes/reno98/titlebar/ontop_normal_inactive.png

After

Width: 64  |  Height: 64  |  Size: 604 B

BIN
themes/reno98/titlebar/sticky_focus_active.png

After

Width: 64  |  Height: 64  |  Size: 654 B

BIN
themes/reno98/titlebar/sticky_focus_inactive.png

After

Width: 64  |  Height: 64  |  Size: 758 B

BIN
themes/reno98/titlebar/sticky_normal_active.png

After

Width: 64  |  Height: 64  |  Size: 654 B

BIN
themes/reno98/titlebar/sticky_normal_inactive.png

After

Width: 64  |  Height: 64  |  Size: 758 B

14
widgets/dismal.lua

@ -3,6 +3,7 @@ local awmtk2 = require("awmtk2")
local wibox = require("wibox")
local gears = require("gears")
local awful = require("awful")
local beautiful = require("beautiful")
local xdg_search = function(name,rlimit)
local results = {}
@ -38,7 +39,7 @@ return function(args)
forced_width = style.button.width or 180
}),
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,
layout = wibox.layout.fixed.vertical
@ -46,18 +47,24 @@ return function(args)
local button_cache = gears.cache(function(name,exec,description,icon)
-- beacause apparently cache doesn't allow nil values
if icon == "" then icon = nil end
-- contents of our button
local widget = wibox.widget(t.button(t.article({
icon = icon,
resize = true,
title = name,
description = description,
icon_size = (style.button.height and
(style.button.height-style.container.margins)) or
30-style.container.margins
(style.button.height-style.button.margins)) or
34-style.button.margins
}),{
forced_height = style.button.height or 30
}))
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(
gears.table.join(
awful.button({},1,function()
@ -87,6 +94,7 @@ return function(args)
root.keys(gears.table.join(
root.keys(),
awful.key({ global.modkey }, "r", function()
results_list:reset()
launchpad.visible = true
if launchpad.visible then
awful.prompt.run {

Loading…
Cancel
Save