reno/themes/reno98/theme.lua

600 lines
19 KiB
Lua
Raw Normal View History

2022-08-25 15:27:31 +00:00
-- Reno98 - a retro replica of a very recognizable theme
2022-08-31 12:20:58 +00:00
--[[
Reno98 - A theme for Reno desktop
Written in 2022 by Yessiest (yessiest@memeware.net)
To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty.
You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
--]]
2022-08-11 19:34:25 +00:00
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")
2022-08-21 12:28:28 +00:00
local themes_path = root_path.."/themes/"
2022-08-11 19:34:25 +00:00
local theme = {}
2022-08-25 15:27:31 +00:00
theme.font = "Terminus 8"
2022-08-11 19:34:25 +00:00
theme.bg_normal = "#c0c0c0"
theme.bg_focus = "#808080"
theme.bg_urgent = "#FFEDCC"
2022-08-21 12:28:28 +00:00
theme.bg_minimize = "#efefef"
2022-09-07 17:43:25 +00:00
theme.bg_highlight = "#dadada"
2022-08-11 19:34:25 +00:00
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"
2023-05-06 08:56:25 +00:00
theme.useless_gap = dpi(10)
2022-08-11 19:34:25 +00:00
-- 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"
2022-09-08 10:56:04 +00:00
theme.window_rounding = 0
2022-08-11 19:34:25 +00:00
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_height = dpi(15)
theme.menu_width = dpi(100)
2022-08-25 15:27:31 +00:00
theme.systray_icon_spacing = 2
2022-08-11 19:34:25 +00:00
-- Define the image to load
2022-08-21 12:28:28 +00:00
theme.titlebar_ontop_button_normal_inactive = themes_path.."reno98/titlebar/ontop_normal_inactive.png"
theme.titlebar_ontop_button_focus_inactive = themes_path.."reno98/titlebar/ontop_focus_inactive.png"
theme.titlebar_ontop_button_normal_active = themes_path.."reno98/titlebar/ontop_normal_active.png"
theme.titlebar_ontop_button_focus_active = themes_path.."reno98/titlebar/ontop_focus_active.png"
2022-08-11 19:34:25 +00:00
2022-08-21 12:28:28 +00:00
theme.titlebar_sticky_button_normal_inactive = themes_path.."reno98/titlebar/sticky_normal_inactive.png"
theme.titlebar_sticky_button_focus_inactive = themes_path.."reno98/titlebar/sticky_focus_inactive.png"
theme.titlebar_sticky_button_normal_active = themes_path.."reno98/titlebar/sticky_normal_active.png"
theme.titlebar_sticky_button_focus_active = themes_path.."reno98/titlebar/sticky_focus_active.png"
2022-08-11 19:34:25 +00:00
2022-08-21 12:28:28 +00:00
theme.titlebar_floating_button_normal_inactive = themes_path.."reno98/titlebar/floating_normal_inactive.png"
theme.titlebar_floating_button_focus_inactive = themes_path.."reno98/titlebar/floating_focus_inactive.png"
theme.titlebar_floating_button_normal_active = themes_path.."reno98/titlebar/floating_normal_active.png"
theme.titlebar_floating_button_focus_active = themes_path.."reno98/titlebar/floating_focus_active.png"
2022-08-11 19:34:25 +00:00
2022-08-25 15:27:31 +00:00
theme = theme_assets.recolor_titlebar(theme,theme.fg_normal,"normal")
theme = theme_assets.recolor_titlebar(theme,theme.fg_focus,"focus")
theme.titlebar_close_button_normal = themes_path.."reno98/titlebar/close_normal.png"
theme.titlebar_close_button_focus = themes_path.."reno98/titlebar/close_focus.png"
theme.titlebar_minimize_button_normal = themes_path.."reno98/titlebar/minimize_normal.png"
theme.titlebar_minimize_button_focus = themes_path.."reno98/titlebar/minimize_focus.png"
2022-08-21 12:28:28 +00:00
theme.titlebar_maximized_button_normal_inactive = themes_path.."reno98/titlebar/maximized_normal_inactive.png"
theme.titlebar_maximized_button_focus_inactive = themes_path.."reno98/titlebar/maximized_focus_inactive.png"
theme.titlebar_maximized_button_normal_active = themes_path.."reno98/titlebar/maximized_normal_active.png"
theme.titlebar_maximized_button_focus_active = themes_path.."reno98/titlebar/maximized_focus_active.png"
2022-08-11 19:34:25 +00:00
2022-08-21 12:28:28 +00:00
theme.wallpaper = themes_path.."reno98/background.png"
2022-08-30 07:00:35 +00:00
theme.wallpapers_icon = themes_path.."reno98/icons/wallpapers.png"
2022-08-11 19:34:25 +00:00
-- You can use your own layout icons like this:
2022-08-21 12:28:28 +00:00
theme.layout_fairh = themes_path.."reno98/layouts/fairhw.png"
theme.layout_fairv = themes_path.."reno98/layouts/fairvw.png"
theme.layout_floating = themes_path.."reno98/layouts/floatingw.png"
theme.layout_magnifier = themes_path.."reno98/layouts/magnifierw.png"
theme.layout_max = themes_path.."reno98/layouts/maxw.png"
theme.layout_fullscreen = themes_path.."reno98/layouts/fullscreenw.png"
theme.layout_tilebottom = themes_path.."reno98/layouts/tilebottomw.png"
theme.layout_tileleft = themes_path.."reno98/layouts/tileleftw.png"
theme.layout_tile = themes_path.."reno98/layouts/tilew.png"
theme.layout_tiletop = themes_path.."reno98/layouts/tiletopw.png"
theme.layout_spiral = themes_path.."reno98/layouts/spiralw.png"
theme.layout_dwindle = themes_path.."reno98/layouts/dwindlew.png"
theme.layout_cornernw = themes_path.."reno98/layouts/cornernww.png"
theme.layout_cornerne = themes_path.."reno98/layouts/cornernew.png"
theme.layout_cornersw = themes_path.."reno98/layouts/cornersww.png"
theme.layout_cornerse = themes_path.."reno98/layouts/cornersew.png"
2022-08-11 19:34:25 +00:00
-- Generate Awesome icon:
theme.awesome_icon = theme_assets.awesome_icon(
theme.menu_height, theme.bg_focus, theme.fg_focus
)
2022-09-07 17:43:25 +00:00
theme.hotkeys_border_width = 3
theme.hotkeys_border_color = theme.bg_focus
theme.hotkeys_modifiers_fg = theme.fg_normal
theme.hotkeys_label_fg = theme.fg_normal
2023-05-20 15:54:06 +00:00
theme_assets.recolor_layout(theme,theme.fg_normal)
2022-08-11 19:34:25 +00:00
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.
2022-08-21 12:28:28 +00:00
theme.icon_theme = "Chicago95"
2022-08-30 07:00:35 +00:00
-- Icons
local icons = {
"battery-caution-charging-symbolic",
"battery-empty-charging-symbolic",
"battery-full-charging-symbolic",
"battery-good-charging-symbolic",
"battery-low-charging-symbolic"
}
for k,v in pairs(icons) do
theme[v] = themes_path.."reno98/icons/"..v..".png"
theme[v:gsub("-charging","")] = themes_path.."reno98/icons/"..v:gsub("-charging","")..".png"
end
theme["battery-full-charged-symbolic"] = themes_path.."reno98/icons/battery-full-charged-symbolic.png"
theme["battery-missing-symbolic"] = themes_path.."reno98/icons/battery-missing-symbolic.png"
theme["ac-adapter-symbolic"] = themes_path.."reno98/icons/ac-adapter-symbolic.png"
theme["backlight-symbolic"] = themes_path.."reno98/icons/backlight-symbolic.png"
theme["notifications-area-symbolic"] = themes_path.."reno98/icons/notifications-area-symbolic.png"
2023-03-10 23:35:55 +00:00
theme["notifications-area-flagged-symbolic"] = themes_path.."reno98/icons/notifications-area-flagged-symbolic.png"
2022-08-30 07:00:35 +00:00
2022-08-31 12:20:58 +00:00
theme["mpc-previous-symbolic"] = themes_path.."reno98/icons/mpc-previous-symbolic.png"
theme["mpc-play-symbolic"] = themes_path.."reno98/icons/mpc-play-symbolic.png"
theme["mpc-pause-symbolic"] = themes_path.."reno98/icons/mpc-pause-symbolic.png"
theme["mpc-next-symbolic"] = themes_path.."reno98/icons/mpc-next-symbolic.png"
theme["action-poweroff-symbolic"] = themes_path.."reno98/icons/action-poweroff-symbolic.png"
theme["action-lock-screen-symbolic"] = themes_path.."reno98/icons/action-lock-screen-symbolic.png"
theme["action-suspend-symbolic"] = themes_path.."reno98/icons/action-suspend-symbolic.png"
2023-03-11 11:52:30 +00:00
theme["volume-high-symbolic"] = themes_path.."reno98/icons/volume-high-symbolic.png"
theme["volume-medium-symbolic"] = themes_path.."reno98/icons/volume-medium-symbolic.png"
theme["volume-low-symbolic"] = themes_path.."reno98/icons/volume-low-symbolic.png"
theme["volume-muted-symbolic"] = themes_path.."reno98/icons/volume-muted-symbolic.png"
2022-08-30 07:00:35 +00:00
-- Notification popups settings
2022-09-04 10:49:18 +00:00
theme.notification_width = 240
theme.notification_height = 60
2022-08-30 07:00:35 +00:00
2022-08-21 12:28:28 +00:00
-- Default icon for clients
2022-08-23 13:03:15 +00:00
-- This one has to be baked as a surface to avoid memory leaks
theme.icon_default = gears.surface(themes_path.."reno98/icons/unknown-app.png")
2022-08-11 19:34:25 +00:00
theme.widgets = {
2022-09-05 21:54:11 +00:00
-- {{{ Widget base
2022-08-11 19:34:25 +00:00
default = {
container = {
2022-09-07 17:43:25 +00:00
bgimage_normal = theme.bgimage_highlight,
2022-08-11 19:34:25 +00:00
shape = function(cr,width,height)
return require("gears").shape.rounded_rect(cr,width,height,0)
2022-09-07 17:43:25 +00:00
end,
bgimage_highlight = theme.bgimage_inset
2022-08-11 19:34:25 +00:00
},
button = {
2022-09-07 17:43:25 +00:00
bgimage_normal = theme.bgimage_outset,
2022-08-11 19:34:25 +00:00
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 = {
2022-09-07 17:43:25 +00:00
bgimage_normal = theme.bgimage_outset,
2022-08-11 19:34:25 +00:00
shape = function(cr,width,height)
return gears.shape.rounded_rect(cr,width,height,0)
end,
},
titlebar = {
hidden_size = 2,
2022-09-07 17:43:25 +00:00
bgimage_normal = theme.bgimage_outset,
2022-08-21 12:28:28 +00:00
--margins = 5,
left = 4,
right = 5,
top = 4,
bottom = 3,
spacing = 1
},
wibar = {
height = 26,
width = 60,
margins = 3,
shape = function(cr,width,height)
return gears.shape.rounded_rect(cr,width,height,0)
end,
2022-09-07 17:43:25 +00:00
bgimage_normal = theme.bgimage_outset,
2022-08-23 13:03:15 +00:00
stretch = true
2022-08-30 07:00:35 +00:00
},
2023-05-20 15:54:06 +00:00
checkbox = {
width = 15,
height = 15,
shape = gears.shape.circle,
border_width = 2,
border_color = theme.bg_normal,
bg = theme.bg_highlight,
check_color = "#000000",
paddings = 2
},
2022-08-30 07:00:35 +00:00
slider = {
shape = function(cr,width,height)
return gears.shape.rounded_rect(cr,width,height,0)
end,
height = 20,
width = 140,
handle_width = 8,
handle_border_color = theme.bg_focus,
handle_border_width = 2,
bar_height = 6
}
},
2022-09-05 21:54:11 +00:00
-- }}}
-- {{{ Menus
generic_menu = {
2022-08-31 12:20:58 +00:00
base = {
2022-09-05 21:54:11 +00:00
spacing = 2,
menu_slide = true
},
button = {
forced_height = 20,
forced_width = 160
},
2022-08-31 12:20:58 +00:00
},
2022-09-05 21:54:11 +00:00
--}}}
2022-09-07 17:43:25 +00:00
-- {{{ Bars/Panels/Menu popups
generic_composite_widget = {
base = {
spacing = 2
}
},
-- }}}
2022-09-05 21:54:11 +00:00
-- {{{ Status panel widgets
generic_status_widget = {
container = {
2022-09-07 17:43:25 +00:00
bgimage_normal = function() end,
2022-09-05 21:54:11 +00:00
margins = 0
},
2022-08-30 07:00:35 +00:00
button = {
margins = 0,
onpress = function() end,
onrelease = function() end,
2022-09-07 17:43:25 +00:00
bgimage_normal = function() end
2022-08-30 07:00:35 +00:00
}
},
2022-09-05 21:54:11 +00:00
-- }}}
2022-09-07 17:43:25 +00:00
-- {{{ Various button lists
generic_button_list = {
button = {
forced_width = 20,
forced_height = 20
2022-08-31 12:20:58 +00:00
},
2022-09-07 17:43:25 +00:00
base = {
spacing = 2
}
},
-- }}}
-- {{{ All widgets that fit into a single line
generic_oneline_widget = {
2022-08-31 12:20:58 +00:00
container = {
2022-09-07 17:43:25 +00:00
bgimage_normal = theme.bgimage_inset
2022-08-31 12:20:58 +00:00
}
},
2022-09-07 17:43:25 +00:00
-- }}}
-- {{{ All kinds of widget popups
generic_popup = {
2022-08-30 07:00:35 +00:00
button = {
2022-09-07 17:43:25 +00:00
width = 180,
height = 40
2022-08-30 07:00:35 +00:00
},
article = {
2022-09-07 17:43:25 +00:00
icon_size = 30
},
},
-- }}}
popuptitle = {
container = {
bg_normal = {
type = "linear",
from = { 0, 0 },
to = { 90, 0 },
stops = { {0, "#040582"}, {1, "#0F7FCD"} }
},
-- awesomewm: yo pass me that pango markup
-- pango: you better not make unintuitive cryptic shit
-- awesomewm: *attaches foreground text color setting to container*
2022-09-07 17:43:25 +00:00
fg_normal = "#FAFAFA"
2022-08-21 12:28:28 +00:00
}
},
2022-09-07 17:43:25 +00:00
soundclown = {
--[[ --Uncomment to leetify that MPC
container = {
bg_normal = "#0c0c0c",
fg_normal = "#00FF00"
2022-08-25 15:27:31 +00:00
},
2022-09-07 17:43:25 +00:00
]]
base = {
width = 140
2022-08-25 15:27:31 +00:00
},
},
2022-08-21 12:28:28 +00:00
subpanel = {
container = {
2022-09-07 17:43:25 +00:00
bgimage_normal = theme.bgimage_inset,
bg_normal = theme.bg_normal,
2022-08-25 15:27:31 +00:00
margins = 2
2022-08-11 19:34:25 +00:00
}
},
2022-09-07 17:43:25 +00:00
taglist = {
base = {
spacing = 2,
layout = require("wibox").layout.flex.horizontal
2022-08-11 19:34:25 +00:00
},
button = {
2022-09-07 17:43:25 +00:00
bgimage_focus = theme.bgimage_inset,
bgimage_normal = theme.bgimage_outset,
},
container = {
margins = 3
2022-08-11 19:34:25 +00:00
}
},
2022-08-21 12:28:28 +00:00
tasklist = {
button = {
2022-08-21 14:18:09 +00:00
width = 160,
2022-08-21 12:28:28 +00:00
height = 50,
bgimage_focus = theme.bgimage_inset,
bgimage_normal = theme.bgimage_outset,
bgimage_urgent = theme.bgimage_outset,
bgimage_minimize = theme.bgimage_outset
}
},
2022-08-31 12:20:58 +00:00
lockscreen = {
popup = {
margins = 0
}
},
lockbar = {
base = {
height = 22
}
},
lockpanel = {
base = {
icon_height = 60,
icon_width = 60,
panel_height = 300,
panel_width = 200,
panel_bgimage = theme.bgimage_outset
}
},
lock_clock = {
textbox = {
font = "Terminus 20"
}
},
2022-08-11 19:34:25 +00:00
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,
2022-08-21 12:28:28 +00:00
size = 22,
2022-08-11 19:34:25 +00:00
},
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