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.

644 lines
21 KiB

  1. -- Reno98 - a retro replica of a very recognizable theme
  2. --[[
  3. Reno98 - A theme for Reno desktop
  4. Written in 2022 by Yessiest (yessiest@memeware.net)
  5. 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.
  6. 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/>.
  7. --]]
  8. local theme_assets = require("beautiful.theme_assets")
  9. local xresources = require("beautiful.xresources")
  10. local dpi = xresources.apply_dpi
  11. local gears = require("gears")
  12. local gfs = require("gears.filesystem")
  13. local themes_path = root_path.."/themes/"
  14. local theme = {}
  15. theme.font = "Ubuntu 8"
  16. theme.bg_normal = "#19191D"
  17. theme.bg_focus = "#3E3E3E"
  18. theme.bg_urgent = "#2E2E2E"
  19. theme.bg_minimize = "#2E2E2E"
  20. theme.bg_highlight = "#45433D"
  21. theme.bg_systray = theme.bg_normal
  22. theme.fg_normal = "#e1dec7"
  23. theme.fg_focus = "#e1dec7"
  24. theme.fg_urgent = "#e1dec7"
  25. theme.fg_minimize = "#e1dec7"
  26. theme.window_rounding = 5
  27. theme.useless_gap = dpi(0)
  28. -- technically speaking these are irrelevant since they're not exactly smart
  29. -- borders
  30. theme.border_width = dpi(0)
  31. theme.border_normal = "#c0c0c0"
  32. theme.border_focus = "#c0c0c0"
  33. theme.border_marked = "#c0c0c0"
  34. local bsize = 50
  35. theme.button_bg_focus = {
  36. type = "radial",
  37. from = {bsize/2,-0.5*bsize,bsize/10},
  38. to = {bsize/2,-0.5*bsize,bsize*2},
  39. stops = {
  40. { 0 , "#FFFFFFBB"},
  41. { 0.45, "#DF744E99"},
  42. { 0.55, "#DF744E99"},
  43. { 1, "#FFFFFF44"}
  44. }
  45. }
  46. theme.button_bg_normal = {
  47. type = "radial",
  48. from = {bsize/2,-0.5*bsize,bsize/10},
  49. to = {bsize/2,-0.2*bsize,bsize*1.5},
  50. stops = {
  51. { 0 , "#FFFFFFFF"},
  52. { 0.5, "#33333333"},
  53. { 1, "#FFFFFF22"}
  54. }
  55. }
  56. theme.button_shape = function(cr,width,height)
  57. return require("gears").shape.rounded_rect(cr,width,height,2)
  58. end
  59. theme.bar_bg_focus = {
  60. type = "linear",
  61. from = { 0, 20 },
  62. to = { 0, 0 },
  63. stops = { { 0, "#3C3B37"} , { 1 , "#59574E"} }
  64. }
  65. theme.bar_bg_normal = {
  66. type = "linear",
  67. from = { 0, 20 },
  68. to = { 0, 0 },
  69. stops = { { 0, "#3C3B37"} , { 1 , "#41403D"} }
  70. }
  71. theme.bar_bg_inverted_normal = {
  72. type = "linear",
  73. from = { 0, 20 },
  74. to = { 0, 0 },
  75. stops = { { 0 , "#41403D"}, { 1, "#3C3B37"} }
  76. }
  77. theme.bar_bg_inverted_focus = {
  78. type = "linear",
  79. from = { 0, 20 },
  80. to = { 0, 0 },
  81. stops = { { 0 , "#59574E"}, { 1, "#3C3B37"} }
  82. }
  83. theme.bar_border_color = {
  84. type = "radial",
  85. from = {bsize/2,bsize/(-3),bsize/8},
  86. to = {bsize/2,bsize/(-5),bsize*1},
  87. stops = {
  88. { 0 , "#FFFFFF66"},
  89. { 1, "#43434366"},
  90. }
  91. }
  92. theme.titlebar_bg_focus = theme.bar_bg_focus
  93. theme.titlebar_bg_normal = theme.bar_bg_normal
  94. local taglist_square_size = dpi(4)
  95. theme.taglist_squares_sel = theme_assets.taglist_squares_sel(
  96. taglist_square_size, theme.fg_normal
  97. )
  98. theme.taglist_squares_unsel = theme_assets.taglist_squares_unsel(
  99. taglist_square_size, theme.fg_normal
  100. )
  101. theme.menu_height = dpi(15)
  102. theme.menu_width = dpi(100)
  103. theme.systray_icon_spacing = 2
  104. -- Define the image to load
  105. theme.titlebar_ontop_button_normal_inactive = themes_path.."unity/titlebar/ontop_normal_inactive.png"
  106. theme.titlebar_ontop_button_focus_inactive = themes_path.."unity/titlebar/ontop_focus_inactive.png"
  107. theme.titlebar_ontop_button_normal_active = themes_path.."unity/titlebar/ontop_normal_active.png"
  108. theme.titlebar_ontop_button_focus_active = themes_path.."unity/titlebar/ontop_focus_active.png"
  109. theme.titlebar_sticky_button_normal_inactive = themes_path.."unity/titlebar/sticky_normal_inactive.png"
  110. theme.titlebar_sticky_button_focus_inactive = themes_path.."unity/titlebar/sticky_focus_inactive.png"
  111. theme.titlebar_sticky_button_normal_active = themes_path.."unity/titlebar/sticky_normal_active.png"
  112. theme.titlebar_sticky_button_focus_active = themes_path.."unity/titlebar/sticky_focus_active.png"
  113. theme.titlebar_floating_button_normal_inactive = themes_path.."unity/titlebar/floating_normal_inactive.png"
  114. theme.titlebar_floating_button_focus_inactive = themes_path.."unity/titlebar/floating_focus_inactive.png"
  115. theme.titlebar_floating_button_normal_active = themes_path.."unity/titlebar/floating_normal_active.png"
  116. theme.titlebar_floating_button_focus_active = themes_path.."unity/titlebar/floating_focus_active.png"
  117. theme = theme_assets.recolor_titlebar(theme,theme.fg_normal,"normal")
  118. theme = theme_assets.recolor_titlebar(theme,theme.fg_focus,"focus")
  119. theme.titlebar_close_button_normal = themes_path.."unity/titlebar/close_normal.png"
  120. theme.titlebar_close_button_focus = themes_path.."unity/titlebar/close_focus.png"
  121. theme.titlebar_minimize_button_normal = themes_path.."unity/titlebar/minimize_normal.png"
  122. theme.titlebar_minimize_button_focus = themes_path.."unity/titlebar/minimize_focus.png"
  123. theme.titlebar_maximized_button_normal_inactive = themes_path.."unity/titlebar/maximized_normal_inactive.png"
  124. theme.titlebar_maximized_button_focus_inactive = themes_path.."unity/titlebar/maximized_focus_inactive.png"
  125. theme.titlebar_maximized_button_normal_active = themes_path.."unity/titlebar/maximized_normal_active.png"
  126. theme.titlebar_maximized_button_focus_active = themes_path.."unity/titlebar/maximized_focus_active.png"
  127. -- You can use your own layout icons like this:
  128. theme.layout_fairh = themes_path.."unity/layouts/fairhw.png"
  129. theme.layout_fairv = themes_path.."unity/layouts/fairvw.png"
  130. theme.layout_floating = themes_path.."unity/layouts/floatingw.png"
  131. theme.layout_magnifier = themes_path.."unity/layouts/magnifierw.png"
  132. theme.layout_max = themes_path.."unity/layouts/maxw.png"
  133. theme.layout_fullscreen = themes_path.."unity/layouts/fullscreenw.png"
  134. theme.layout_tilebottom = themes_path.."unity/layouts/tilebottomw.png"
  135. theme.layout_tileleft = themes_path.."unity/layouts/tileleftw.png"
  136. theme.layout_tile = themes_path.."unity/layouts/tilew.png"
  137. theme.layout_tiletop = themes_path.."unity/layouts/tiletopw.png"
  138. theme.layout_spiral = themes_path.."unity/layouts/spiralw.png"
  139. theme.layout_dwindle = themes_path.."unity/layouts/dwindlew.png"
  140. theme.layout_cornernw = themes_path.."unity/layouts/cornernww.png"
  141. theme.layout_cornerne = themes_path.."unity/layouts/cornernew.png"
  142. theme.layout_cornersw = themes_path.."unity/layouts/cornersww.png"
  143. theme.layout_cornerse = themes_path.."unity/layouts/cornersew.png"
  144. -- Generate Awesome icon:
  145. theme.awesome_icon = theme_assets.awesome_icon(
  146. theme.menu_height, theme.bg_focus, theme.fg_focus
  147. )
  148. theme.hotkeys_border_width = 3
  149. theme.hotkeys_border_color = theme.bg_focus
  150. theme.hotkeys_modifiers_fg = theme.fg_normal
  151. theme.hotkeys_label_fg = theme.fg_normal
  152. ---theme.bgimage_outset
  153. -- Define the icon theme for application icons. If not set then the icons
  154. -- from /usr/share/icons and /usr/share/icons/hicolor will be used.
  155. theme.icon_theme = "Chicago95"
  156. -- Icons
  157. local icons = {
  158. "battery-caution-charging-symbolic",
  159. "battery-empty-charging-symbolic",
  160. "battery-full-charging-symbolic",
  161. "battery-good-charging-symbolic",
  162. "battery-low-charging-symbolic"
  163. }
  164. for k,v in pairs(icons) do
  165. theme[v] = themes_path.."unity/icons/"..v..".png"
  166. theme[v:gsub("-charging","")] = themes_path.."unity/icons/"..v:gsub("-charging","")..".png"
  167. end
  168. theme["battery-full-charged-symbolic"] = themes_path.."unity/icons/battery-full-charged-symbolic.png"
  169. theme["battery-missing-symbolic"] = themes_path.."unity/icons/battery-missing-symbolic.png"
  170. theme["ac-adapter-symbolic"] = themes_path.."unity/icons/ac-adapter-symbolic.png"
  171. theme["backlight-symbolic"] = themes_path.."unity/icons/backlight-symbolic.png"
  172. theme["notifications-area-symbolic"] = themes_path.."unity/icons/notifications-area-symbolic.png"
  173. theme["mpc-previous-symbolic"] = themes_path.."unity/icons/mpc-previous-symbolic.png"
  174. theme["mpc-play-symbolic"] = themes_path.."unity/icons/mpc-play-symbolic.png"
  175. theme["mpc-pause-symbolic"] = themes_path.."unity/icons/mpc-pause-symbolic.png"
  176. theme["mpc-next-symbolic"] = themes_path.."unity/icons/mpc-next-symbolic.png"
  177. theme["action-poweroff-symbolic"] = themes_path.."unity/icons/action-poweroff-symbolic.png"
  178. theme["action-lock-screen-symbolic"] = themes_path.."unity/icons/action-lock-screen-symbolic.png"
  179. theme["action-suspend-symbolic"] = themes_path.."unity/icons/action-suspend-symbolic.png"
  180. theme.wallpaper = themes_path.."unity/background.png"
  181. theme.wallpapers_icon = themes_path.."unity/icons/wallpapers.png"
  182. -- Default icon for clients
  183. -- This one has to be baked as a surface to avoid memory leaks
  184. theme.icon_default = themes_path.."unity/icons/unknown-app.png"
  185. for k,v in pairs({
  186. "battery-caution-charging-symbolic",
  187. "battery-empty-charging-symbolic",
  188. "battery-full-charging-symbolic",
  189. "battery-good-charging-symbolic",
  190. "battery-low-charging-symbolic",
  191. "battery-full-charged-symbolic",
  192. "battery-missing-symbolic",
  193. "ac-adapter-symbolic",
  194. "backlight-symbolic",
  195. "notifications-area-symbolic",
  196. "mpc-previous-symbolic",
  197. "mpc-play-symbolic",
  198. "mpc-pause-symbolic",
  199. "mpc-next-symbolic",
  200. "action-poweroff-symbolic",
  201. "action-lock-screen-symbolic",
  202. "action-suspend-symbolic",
  203. "wallpapers_icon",
  204. "icon_default"}) do
  205. if theme[v] and gears.filesystem.file_readable(theme[v]) then
  206. theme[v] = gears.color.recolor_image(theme[v],theme.fg_normal)
  207. end
  208. end
  209. -- Notification popups settings
  210. theme.notification_width = 240
  211. theme.notification_height = 60
  212. theme.widgets = {
  213. -- {{{ Widget base
  214. default = {
  215. container = {
  216. shape = function(cr,width,height)
  217. return require("gears").shape.rounded_rect(cr,width,height,2)
  218. end,
  219. bgimage_highlight = theme.bgimage_inset
  220. },
  221. button = {
  222. shape = theme.button_shape,
  223. onpress = function(widget)
  224. widget:set_bg(theme.bg_focus)
  225. end,
  226. onrelease = function(widget)
  227. widget:set_bg(theme.bg_normal)
  228. end
  229. },
  230. popup = {
  231. shape = function(cr,width,height)
  232. return gears.shape.rounded_rect(cr,width,height,4)
  233. end,
  234. root_shape = function(cr,width,height)
  235. return gears.shape.rounded_rect(cr,width,height,6)
  236. end,
  237. },
  238. titlebar = {
  239. root_shape = function(cr,width,height)
  240. return gears.shape.partially_rounded_rect(cr,width,height,
  241. true,true,false,false,6) end,
  242. root_bg_focus = theme.titlebar_bg_focus,
  243. root_bg_normal = theme.titlebar_bg_normal,
  244. top = 2,
  245. bottom = 2,
  246. left = 3,
  247. right = 3
  248. },
  249. wibar = {
  250. shape = function(cr,width,height)
  251. return gears.shape.rounded_rect(cr,width,height,0)
  252. end,
  253. height = 26,
  254. width = 60,
  255. margins = 3,
  256. stretch = true
  257. },
  258. slider = {
  259. shape = function(cr,width,height)
  260. return gears.shape.rounded_rect(cr,width,height,0)
  261. end,
  262. height = 20,
  263. width = 140,
  264. handle_width = 8,
  265. handle_border_color = theme.bg_focus,
  266. handle_border_width = 2,
  267. bar_height = 6
  268. }
  269. },
  270. -- }}}
  271. -- {{{ Menus
  272. generic_menu = {
  273. base = {
  274. spacing = 2,
  275. menu_slide = true
  276. },
  277. button = {
  278. bg_normal = theme.bg_highlight,
  279. onpress = function(widget)
  280. widget:set_bg(theme.bg_focus)
  281. end,
  282. onrelease = function(widget)
  283. widget:set_bg(theme.bg_highlight)
  284. end,
  285. forced_height = 20,
  286. forced_width = 160
  287. },
  288. },
  289. -- }}}
  290. -- {{{ Popup activating icons
  291. generic_iconified_widget = {
  292. button = {
  293. margins = 1,
  294. bg_normal = "#00000000",
  295. onpress = function(widget)
  296. widget:set_bg(theme.bg_normal)
  297. end,
  298. onrelease = function(widget)
  299. widget:set_bg("#00000000")
  300. end
  301. }
  302. },
  303. -- }}}
  304. -- {{{ Bars/Panels/Menu popups
  305. generic_composite_widget = {
  306. base = {
  307. spacing = 2
  308. }
  309. },
  310. -- }}}
  311. -- {{{ Status panel widgets
  312. generic_status_widget = {
  313. container = {
  314. margins = 2,
  315. bg_normal = "#00000000",
  316. },
  317. button = {
  318. margins = 1,
  319. bg_normal = "#00000000",
  320. onpress = function() end,
  321. onrelease = function() end,
  322. }
  323. },
  324. -- }}}
  325. -- {{{ Various button lists
  326. generic_button_list = {
  327. button = {
  328. bg_normal = theme.bg_highlight,
  329. onpress = function(widget)
  330. widget:set_bg(theme.bg_focus)
  331. end,
  332. onrelease = function(widget)
  333. widget:set_bg(theme.bg_highlight)
  334. end,
  335. forced_width = 20,
  336. forced_height = 20
  337. },
  338. base = {
  339. spacing = 2
  340. }
  341. },
  342. -- }}}
  343. -- {{{ All widgets that fit into a single line
  344. generic_oneline_widget = {
  345. container = {
  346. bgimage_normal = theme.bgimage_inset
  347. },
  348. button = {
  349. margins = 2,
  350. onpress = function(widget)
  351. widget:set_bg(theme.bg_normal)
  352. end,
  353. onrelease = function(widget)
  354. widget:set_bg("#00000000")
  355. end,
  356. bg_normal = "#00000000"
  357. }
  358. },
  359. -- }}}
  360. -- {{{ All kinds of widget popups
  361. generic_popup = {
  362. button = {
  363. width = 180,
  364. height = 40
  365. },
  366. article = {
  367. icon_size = 30
  368. },
  369. },
  370. -- }}}
  371. soundclown = {
  372. --[[ --Uncomment to leetify that MPC
  373. container = {
  374. bg_normal = "#0c0c0c",
  375. fg_normal = "#00FF00"
  376. },
  377. ]]
  378. base = {
  379. width = 140
  380. },
  381. },
  382. subpanel = {
  383. container = {
  384. bgimage_normal = theme.bgimage_inset,
  385. bg_normal = theme.bar_bg_inverted_normal,
  386. margins = 0,
  387. shape = function(cr,width,height)
  388. return gears.shape.rounded_rect(cr,width,height,8)
  389. end
  390. }
  391. },
  392. taglist = {
  393. base = {
  394. spacing = 2,
  395. layout = require("wibox").layout.flex.horizontal
  396. },
  397. button = {
  398. bgimage_focus = theme.bgimage_inset,
  399. bgimage_normal = theme.bgimage_outset,
  400. },
  401. container = {
  402. margins = 3
  403. }
  404. },
  405. tasklist = {
  406. button = {
  407. width = 160,
  408. height = 44,
  409. margins = 5,
  410. shape_focus = theme.button_shape,
  411. shape_normal = theme.button_shape,
  412. shape_urgent = theme.button_shape,
  413. shape_minimize = theme.button_shape,
  414. bg_normal = theme.button_bg_normal,
  415. bg_focus = theme.button_bg_focus,
  416. bg_urgent = theme.bg_urgent,
  417. bg_minimize = theme.bg_minimize,
  418. shape_border_color_normal = theme.bar_border_color,
  419. shape_border_color_focus = theme.bar_border_color,
  420. shape_border_color_urgent = theme.bar_border_color,
  421. shape_border_color_minimize = theme.bar_border_color,
  422. shape_border_width_normal = dpi(1),
  423. shape_border_width_focus = dpi(1),
  424. shape_border_width_urgent = dpi(1),
  425. shape_border_width_minimize = dpi(1),
  426. }
  427. },
  428. launcher = {
  429. button = {
  430. margins = 5,
  431. bg_normal = theme.button_bg_normal,
  432. bg_focus = theme.button_bg_focus,
  433. shape_border_width = dpi(1),
  434. shape_border_color = theme.bar_border_color,
  435. onpress = function(widget)
  436. widget:set_bg(theme.button_bg_focus)
  437. end,
  438. onrelease = function(widget)
  439. widget:set_bg(theme.button_bg_normal)
  440. end
  441. }
  442. },
  443. lockscreen = {
  444. popup = {
  445. margins = 0
  446. }
  447. },
  448. lockbar = {
  449. base = {
  450. height = 22
  451. }
  452. },
  453. lockpanel = {
  454. base = {
  455. icon_height = 60,
  456. icon_width = 60,
  457. panel_height = 300,
  458. panel_width = 200,
  459. panel_bgimage = theme.bgimage_outset
  460. },
  461. container = {
  462. shape = function(cr,width,height)
  463. return gears.shape.rounded_rect(cr,width,height,8)
  464. end,
  465. shape_border_color = theme.bg_highlight,
  466. shape_border_width = dpi(2)
  467. }
  468. },
  469. systray = {
  470. container = {
  471. margins = 2,
  472. shape = function(cr,width,height)
  473. return gears.shape.rounded_rect(cr,width,height,4)
  474. end,
  475. shape_border_color = theme.bg_normal,
  476. shape_border_width = dpi(2)
  477. }
  478. },
  479. lock_clock = {
  480. textbox = {
  481. font = "Ubuntu Mono 20"
  482. }
  483. },
  484. titlebar = {
  485. titlebar_top = {
  486. onfocus = function(titlebar)
  487. local root = titlebar:get_children_by_id("titlebar_root")[1]
  488. root:set_bg(theme.titlebar_bg_focus)
  489. root:set_shape(function(cr,width,height)
  490. return gears.shape.partially_rounded_rect(cr,width,height,
  491. true,true,false,false,6) end)
  492. end,
  493. onunfocus = function(titlebar)
  494. local root = titlebar:get_children_by_id("titlebar_root")[1]
  495. root:set_bg(theme.titlebar_bg_normal)
  496. root:set_shape(function(cr,width,height)
  497. return gears.shape.partially_rounded_rect(cr,width,height,
  498. true,true,false,false,6) end)
  499. end,
  500. bg_focus = "#00000000",
  501. bg_normal = "#00000000",
  502. fg_focus = "#FAFAFA",
  503. fg_normal = theme.fg_normal,
  504. size = 22,
  505. spacing = 1
  506. },
  507. titlebar_left = {
  508. size = 2,
  509. bg_focus = "#3C3B37",
  510. bg_normal = "#3C3B37",
  511. },
  512. titlebar_right = {
  513. size = 2,
  514. bg_focus = "#3C3B37",
  515. bg_normal = "#3C3B37",
  516. },
  517. titlebar_bottom = {
  518. size = 2,
  519. bg_focus = "#3C3B37",
  520. bg_normal = "#3C3B37",
  521. }
  522. },
  523. wibar = {
  524. wibar_top = {
  525. bg_normal = theme.bar_bg_normal,
  526. fg_normal = theme.fg_normal,
  527. size = 22,
  528. },
  529. wibar_left = {
  530. bg_normal = "#0D0D0966",
  531. border_width = dpi(1),
  532. border_color = "#26262666"
  533. }
  534. }
  535. }
  536. local wibox = require("wibox")
  537. theme.templates = {
  538. templates = {
  539. titlebar = function(style)
  540. return function(layout,options)
  541. local margins = style.titlebar.margins
  542. if (style.titlebar.left or
  543. style.titlebar.right or
  544. style.titlebar.bottom or
  545. style.titlebar.top) then
  546. margins = nil
  547. end
  548. return {
  549. {
  550. gears.table.join({
  551. layout,
  552. margins = margins,
  553. layout = wibox.container.margin,
  554. left = style.titlebar.left,
  555. right = style.titlebar.right,
  556. bottom = style.titlebar.bottom,
  557. top = style.titlebar.top
  558. },options or {}),
  559. bgimage = style.titlebar.root_bgimage_normal,
  560. bg = style.titlebar.root_bg_normal,
  561. fg = style.titlebar.root_fg_normal,
  562. shape = style.titlebar.root_shape,
  563. shape_border_color = style.titlebar.root_shape_border_color,
  564. shape_border_width = style.titlebar.root_shape_border_width,
  565. widget = wibox.container.background,
  566. id = "titlebar_root"
  567. },
  568. layout = wibox.container.margin,
  569. left = style.titlebar.root_margin_left,
  570. right = style.titlebar.root_margin_right,
  571. top = style.titlebar.root_margin_top,
  572. bottom = style.titlebar.root_margin_bottom
  573. }
  574. end
  575. end,
  576. popup = function(style)
  577. return function(widget,options)
  578. return gears.table.join({
  579. widget = {
  580. {
  581. widget,
  582. margins = style.popup.margins,
  583. layout = wibox.container.margin
  584. },
  585. bg = style.popup.bg_normal,
  586. shape = style.popup.root_shape,
  587. widget = wibox.container.background
  588. },
  589. bg = "#00000000",
  590. shape = style.popup.shape,
  591. visible = false,
  592. ontop = true
  593. },options or {})
  594. end
  595. end
  596. }
  597. }
  598. return theme
  599. -- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80