Reno is the second iteration of the AWMTK-powered AwesomeWM config.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

458 lines
14 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. -- Reno98 - a retro replica of a very recognizable theme
  2. local theme_assets = require("beautiful.theme_assets")
  3. local xresources = require("beautiful.xresources")
  4. local dpi = xresources.apply_dpi
  5. local gears = require("gears")
  6. local gfs = require("gears.filesystem")
  7. local themes_path = root_path.."/themes/"
  8. local theme = {}
  9. theme.font = "Terminus 8"
  10. theme.bg_normal = "#c0c0c0"
  11. theme.bg_focus = "#808080"
  12. theme.bg_urgent = "#FFEDCC"
  13. theme.bg_minimize = "#efefef"
  14. theme.bg_highlight_shadow = "#000000FF"
  15. theme.bg_highlight_light = "#FFFFFFFF"
  16. theme.bg_highlight_outline = "#808080FF"
  17. theme.bg_systray = theme.bg_normal
  18. theme.fg_normal = "#000000"
  19. theme.fg_focus = "#000000"
  20. theme.fg_urgent = "#000000"
  21. theme.fg_minimize = "#000000"
  22. theme.useless_gap = dpi(0)
  23. -- technically speaking these are irrelevant since they're not exactly smart
  24. -- borders
  25. theme.border_width = dpi(0)
  26. theme.border_normal = "#c0c0c0"
  27. theme.border_focus = "#c0c0c0"
  28. theme.border_marked = "#c0c0c0"
  29. theme.titlebar_bg_focus = {
  30. type = "linear",
  31. from = { 0, 0 },
  32. to = { 640, 0 },
  33. stops = { {0, "#040582"}, {1, "#0F7FCD"} }
  34. }
  35. theme.titlebar_bg_normal = {
  36. type = "linear",
  37. from = { 0, 0 },
  38. to = { 640, 0 },
  39. stops = { {0, "#828282"}, {1, "#AFAFAF"} }
  40. }
  41. local taglist_square_size = dpi(4)
  42. theme.taglist_squares_sel = theme_assets.taglist_squares_sel(
  43. taglist_square_size, theme.fg_normal
  44. )
  45. theme.taglist_squares_unsel = theme_assets.taglist_squares_unsel(
  46. taglist_square_size, theme.fg_normal
  47. )
  48. theme.menu_height = dpi(15)
  49. theme.menu_width = dpi(100)
  50. theme.systray_icon_spacing = 2
  51. -- Define the image to load
  52. theme.titlebar_ontop_button_normal_inactive = themes_path.."reno98/titlebar/ontop_normal_inactive.png"
  53. theme.titlebar_ontop_button_focus_inactive = themes_path.."reno98/titlebar/ontop_focus_inactive.png"
  54. theme.titlebar_ontop_button_normal_active = themes_path.."reno98/titlebar/ontop_normal_active.png"
  55. theme.titlebar_ontop_button_focus_active = themes_path.."reno98/titlebar/ontop_focus_active.png"
  56. theme.titlebar_sticky_button_normal_inactive = themes_path.."reno98/titlebar/sticky_normal_inactive.png"
  57. theme.titlebar_sticky_button_focus_inactive = themes_path.."reno98/titlebar/sticky_focus_inactive.png"
  58. theme.titlebar_sticky_button_normal_active = themes_path.."reno98/titlebar/sticky_normal_active.png"
  59. theme.titlebar_sticky_button_focus_active = themes_path.."reno98/titlebar/sticky_focus_active.png"
  60. theme.titlebar_floating_button_normal_inactive = themes_path.."reno98/titlebar/floating_normal_inactive.png"
  61. theme.titlebar_floating_button_focus_inactive = themes_path.."reno98/titlebar/floating_focus_inactive.png"
  62. theme.titlebar_floating_button_normal_active = themes_path.."reno98/titlebar/floating_normal_active.png"
  63. theme.titlebar_floating_button_focus_active = themes_path.."reno98/titlebar/floating_focus_active.png"
  64. theme = theme_assets.recolor_titlebar(theme,theme.fg_normal,"normal")
  65. theme = theme_assets.recolor_titlebar(theme,theme.fg_focus,"focus")
  66. theme.titlebar_close_button_normal = themes_path.."reno98/titlebar/close_normal.png"
  67. theme.titlebar_close_button_focus = themes_path.."reno98/titlebar/close_focus.png"
  68. theme.titlebar_minimize_button_normal = themes_path.."reno98/titlebar/minimize_normal.png"
  69. theme.titlebar_minimize_button_focus = themes_path.."reno98/titlebar/minimize_focus.png"
  70. theme.titlebar_maximized_button_normal_inactive = themes_path.."reno98/titlebar/maximized_normal_inactive.png"
  71. theme.titlebar_maximized_button_focus_inactive = themes_path.."reno98/titlebar/maximized_focus_inactive.png"
  72. theme.titlebar_maximized_button_normal_active = themes_path.."reno98/titlebar/maximized_normal_active.png"
  73. theme.titlebar_maximized_button_focus_active = themes_path.."reno98/titlebar/maximized_focus_active.png"
  74. theme.wallpaper = themes_path.."reno98/background.png"
  75. -- You can use your own layout icons like this:
  76. theme.layout_fairh = themes_path.."reno98/layouts/fairhw.png"
  77. theme.layout_fairv = themes_path.."reno98/layouts/fairvw.png"
  78. theme.layout_floating = themes_path.."reno98/layouts/floatingw.png"
  79. theme.layout_magnifier = themes_path.."reno98/layouts/magnifierw.png"
  80. theme.layout_max = themes_path.."reno98/layouts/maxw.png"
  81. theme.layout_fullscreen = themes_path.."reno98/layouts/fullscreenw.png"
  82. theme.layout_tilebottom = themes_path.."reno98/layouts/tilebottomw.png"
  83. theme.layout_tileleft = themes_path.."reno98/layouts/tileleftw.png"
  84. theme.layout_tile = themes_path.."reno98/layouts/tilew.png"
  85. theme.layout_tiletop = themes_path.."reno98/layouts/tiletopw.png"
  86. theme.layout_spiral = themes_path.."reno98/layouts/spiralw.png"
  87. theme.layout_dwindle = themes_path.."reno98/layouts/dwindlew.png"
  88. theme.layout_cornernw = themes_path.."reno98/layouts/cornernww.png"
  89. theme.layout_cornerne = themes_path.."reno98/layouts/cornernew.png"
  90. theme.layout_cornersw = themes_path.."reno98/layouts/cornersww.png"
  91. theme.layout_cornerse = themes_path.."reno98/layouts/cornersew.png"
  92. -- Generate Awesome icon:
  93. theme.awesome_icon = theme_assets.awesome_icon(
  94. theme.menu_height, theme.bg_focus, theme.fg_focus
  95. )
  96. theme.bgimage_outset = function(context, cr, width, height,...)
  97. local light = gears.color(theme.bg_highlight_light)
  98. local shadow = gears.color(theme.bg_highlight_shadow)
  99. local outline = gears.color(theme.bg_highlight_outline)
  100. -- Background
  101. -- Light
  102. cr:set_source(light)
  103. cr.line_width=2
  104. cr:move_to(0,0)
  105. cr:line_to(width,0)
  106. cr:move_to(0,0)
  107. cr:line_to(0,height)
  108. cr:stroke()
  109. -- Outline
  110. cr:set_source(outline)
  111. cr:move_to(width-1,height-1)
  112. cr:line_to(width-1,1)
  113. cr:move_to(width-2,height-1)
  114. cr:line_to(1,height-1)
  115. cr:stroke()
  116. -- Shadow
  117. cr:set_source(shadow)
  118. cr:move_to(width,height)
  119. cr:line_to(width,0)
  120. cr:move_to(width-1,height)
  121. cr:line_to(0,height)
  122. cr:stroke()
  123. end
  124. theme.bgimage_inset = function(context,cr,width,height)
  125. local light = gears.color(theme.bg_highlight_light)
  126. local shadow = gears.color(theme.bg_highlight_shadow)
  127. local outline = gears.color(theme.bg_highlight_outline)
  128. -- Light
  129. cr:set_source(light)
  130. cr.line_width=2
  131. cr:move_to(width,height)
  132. cr:line_to(width,0)
  133. cr:move_to(width,height)
  134. cr:line_to(0,height)
  135. cr:stroke()
  136. -- Shadow
  137. cr:set_source(shadow)
  138. cr.line_width=2
  139. cr:move_to(0,0)
  140. cr:line_to(0,height)
  141. cr:move_to(0,0)
  142. cr:line_to(width,0)
  143. cr:stroke()
  144. end
  145. theme.bgimage_highlight = function(context,cr,width,height)
  146. local light = gears.color(theme.bg_highlight_light)
  147. local shadow = gears.color(theme.bg_highlight_shadow)
  148. local outline = gears.color(theme.bg_highlight_outline)
  149. -- Light
  150. cr:set_source(light)
  151. cr.line_width=2
  152. cr:move_to(1,1)
  153. cr:line_to(1,height-2)
  154. cr:move_to(1,1)
  155. cr:line_to(width-2,1)
  156. cr:stroke()
  157. -- Outline
  158. cr:set_source(outline)
  159. cr.line_width=2
  160. cr:rectangle(0,0,width-1,height-1)
  161. cr:stroke()
  162. -- Light (bottom)
  163. cr:set_source(light)
  164. cr:move_to(width,height)
  165. cr:line_to(width,0)
  166. cr:move_to(width,height)
  167. cr:line_to(0,height)
  168. cr:stroke()
  169. end
  170. -- A complex piece of "code" to simulate borders.
  171. theme.titlebar_bgimage_top = function(context, cr, width, height,...)
  172. local light = gears.color(theme.bg_highlight_light)
  173. local shadow = gears.color(theme.bg_highlight_shadow)
  174. local outline = gears.color(theme.bg_highlight_outline)
  175. cr.line_width = 2
  176. cr:set_source(gears.color(theme.bg_normal))
  177. cr:rectangle(2,2,width-5,height-3)
  178. cr:stroke()
  179. -- Light
  180. cr:set_source(light)
  181. cr.line_width=2
  182. cr:move_to(0,0)
  183. cr:line_to(width,0)
  184. cr:move_to(0,0)
  185. cr:line_to(0,height)
  186. cr:stroke()
  187. -- Outline
  188. cr:set_source(outline)
  189. cr:move_to(width-1,height)
  190. cr:line_to(width-1,1)
  191. cr:stroke()
  192. -- Shadow
  193. cr:set_source(shadow)
  194. cr:move_to(width,height)
  195. cr:line_to(width,0)
  196. cr:stroke()
  197. end
  198. theme.titlebar_bgimage_bottom = function(context, cr, width, height, ...)
  199. local light = gears.color(theme.bg_highlight_light)
  200. local shadow = gears.color(theme.bg_highlight_shadow)
  201. local outline = gears.color(theme.bg_highlight_outline)
  202. -- Background
  203. -- Light
  204. cr:set_source(light)
  205. cr.line_width=2
  206. cr:move_to(0,0)
  207. cr:line_to(0,height)
  208. cr:stroke()
  209. -- Outline
  210. cr:set_source(outline)
  211. cr:move_to(width-1,height-1)
  212. cr:line_to(width-1,0)
  213. cr:move_to(width-2,height-1)
  214. cr:line_to(1,height-1)
  215. cr:stroke()
  216. -- Shadow
  217. cr:set_source(shadow)
  218. cr:move_to(width,height)
  219. cr:line_to(width,0)
  220. cr:move_to(width-1,height)
  221. cr:line_to(0,height)
  222. cr:stroke()
  223. end
  224. theme.titlebar_bgimage_left = function(context, cr, width, height,...)
  225. local light = gears.color(theme.bg_highlight_light)
  226. -- Light
  227. cr:set_source(light)
  228. cr.line_width=2
  229. cr:move_to(0,0)
  230. cr:line_to(0,height)
  231. cr:stroke()
  232. end
  233. theme.titlebar_bgimage_right = function(context, cr, width, height,...)
  234. local shadow = gears.color(theme.bg_highlight_shadow)
  235. local outline = gears.color(theme.bg_highlight_outline)
  236. cr.line_width=2
  237. -- Outline
  238. cr:set_source(outline)
  239. cr:move_to(width-1,height)
  240. cr:line_to(width-1,0)
  241. cr:stroke()
  242. -- Shadow
  243. cr:set_source(shadow)
  244. cr:move_to(width,height)
  245. cr:line_to(width,0)
  246. cr:stroke()
  247. end
  248. ---theme.bgimage_outset
  249. -- Define the icon theme for application icons. If not set then the icons
  250. -- from /usr/share/icons and /usr/share/icons/hicolor will be used.
  251. theme.icon_theme = "Chicago95"
  252. -- Default icon for clients
  253. -- This one has to be baked as a surface to avoid memory leaks
  254. theme.icon_default = gears.surface(themes_path.."reno98/icons/unknown-app.png")
  255. theme.widgets = {
  256. default = {
  257. container = {
  258. bgimage = theme.bgimage_highlight,
  259. shape = function(cr,width,height)
  260. return require("gears").shape.rounded_rect(cr,width,height,0)
  261. end
  262. },
  263. button = {
  264. bgimage = theme.bgimage_outset,
  265. shape = function(cr,width,height)
  266. return require("gears").shape.rounded_rect(cr,width,height,0)
  267. end,
  268. onpress = function(widget)
  269. widget:set_bg(theme.bg_focus)
  270. widget:set_bgimage(theme.bgimage_inset)
  271. end,
  272. onrelease = function(widget)
  273. widget:set_bg(theme.bg_normal)
  274. widget:set_bgimage(theme.bgimage_outset)
  275. end
  276. },
  277. popup = {
  278. bgimage = theme.bgimage_outset,
  279. shape = function(cr,width,height)
  280. return gears.shape.rounded_rect(cr,width,height,0)
  281. end,
  282. },
  283. titlebar = {
  284. bgimage = theme.bgimage_outset,
  285. --margins = 5,
  286. left = 4,
  287. right = 5,
  288. top = 4,
  289. bottom = 3,
  290. spacing = 1
  291. },
  292. wibar = {
  293. height = 26,
  294. width = 60,
  295. margins = 3,
  296. shape = function(cr,width,height)
  297. return gears.shape.rounded_rect(cr,width,height,0)
  298. end,
  299. bgimage = theme.bgimage_outset,
  300. stretch = true
  301. }
  302. },
  303. clock = {
  304. container = {
  305. bgimage = function() end,
  306. margins = 0
  307. }
  308. },
  309. root_menu = {
  310. base = {
  311. spacing = 2
  312. }
  313. },
  314. client_menu = {
  315. base = {
  316. spacing = 2
  317. }
  318. },
  319. taglist = {
  320. base = {
  321. spacing = 2
  322. },
  323. button = {
  324. bgimage_focus = theme.bgimage_inset,
  325. bgimage_normal = theme.bgimage_outset,
  326. margins = 2
  327. },
  328. container = {
  329. margins = 3
  330. }
  331. },
  332. subpanel = {
  333. container = {
  334. bgimage = theme.bgimage_inset,
  335. bg = theme.bgimage_normal,
  336. margins = 2
  337. }
  338. },
  339. dismal = {
  340. container = {
  341. bg = theme.bg_focus
  342. },
  343. button = {
  344. height = 34
  345. }
  346. },
  347. tasklist = {
  348. button = {
  349. width = 160,
  350. height = 50,
  351. bgimage_focus = theme.bgimage_inset,
  352. bgimage_normal = theme.bgimage_outset,
  353. bgimage_urgent = theme.bgimage_outset,
  354. bgimage_minimize = theme.bgimage_outset
  355. }
  356. },
  357. menu = {
  358. base = {
  359. -- Enables the ability to just drag the mouse on an entry to open it
  360. menu_slide = true,
  361. spacing = 2
  362. },
  363. button = {
  364. forced_height = 20,
  365. forced_width = 160
  366. },
  367. },
  368. systray = {
  369. container = {
  370. bgimage = function() end,
  371. margins = 0
  372. }
  373. },
  374. client_buttons = {
  375. button = {
  376. forced_width = 20,
  377. forced_height = 20
  378. },
  379. base = {
  380. spacing = 2
  381. }
  382. },
  383. titlebar = {
  384. titlebar_top = {
  385. bgimage_normal = theme.titlebar_bgimage_top,
  386. bgimage_focus = theme.titlebar_bgimage_top,
  387. bg_focus = theme.titlebar_bg_focus,
  388. bg_normal = theme.titlebar_bg_normal,
  389. fg_focus = "#FAFAFA",
  390. fg_normal = theme.fg_normal,
  391. size = 22,
  392. },
  393. titlebar_left = {
  394. bgimage_normal = theme.titlebar_bgimage_left,
  395. bgimage_focus = theme.titlebar_bgimage_left,
  396. size = 4,
  397. bg_focus = theme.bg_normal
  398. },
  399. titlebar_right = {
  400. bgimage_normal = theme.titlebar_bgimage_right,
  401. bgimage_focus = theme.titlebar_bgimage_right,
  402. size = 4,
  403. bg_focus = theme.bg_normal
  404. },
  405. titlebar_bottom = {
  406. bgimage_normal = theme.titlebar_bgimage_bottom,
  407. bgimage_focus = theme.titlebar_bgimage_bottom,
  408. size = 4,
  409. bg_focus = theme.bg_normal
  410. }
  411. }
  412. }
  413. return theme
  414. -- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80