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.

583 lines
18 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
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
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. --[[
  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 = "Terminus 8"
  16. theme.bg_normal = "#c0c0c0"
  17. theme.bg_focus = "#808080"
  18. theme.bg_urgent = "#FFEDCC"
  19. theme.bg_minimize = "#efefef"
  20. theme.bg_highlight = "#dadada"
  21. theme.bg_highlight_shadow = "#000000FF"
  22. theme.bg_highlight_light = "#FFFFFFFF"
  23. theme.bg_highlight_outline = "#808080FF"
  24. theme.bg_systray = theme.bg_normal
  25. theme.fg_normal = "#000000"
  26. theme.fg_focus = "#000000"
  27. theme.fg_urgent = "#000000"
  28. theme.fg_minimize = "#000000"
  29. theme.useless_gap = dpi(0)
  30. -- technically speaking these are irrelevant since they're not exactly smart
  31. -- borders
  32. theme.border_width = dpi(0)
  33. theme.border_normal = "#c0c0c0"
  34. theme.border_focus = "#c0c0c0"
  35. theme.border_marked = "#c0c0c0"
  36. theme.window_rounding = 0
  37. theme.titlebar_bg_focus = {
  38. type = "linear",
  39. from = { 0, 0 },
  40. to = { 640, 0 },
  41. stops = { {0, "#040582"}, {1, "#0F7FCD"} }
  42. }
  43. theme.titlebar_bg_normal = {
  44. type = "linear",
  45. from = { 0, 0 },
  46. to = { 640, 0 },
  47. stops = { {0, "#828282"}, {1, "#AFAFAF"} }
  48. }
  49. local taglist_square_size = dpi(4)
  50. theme.taglist_squares_sel = theme_assets.taglist_squares_sel(
  51. taglist_square_size, theme.fg_normal
  52. )
  53. theme.taglist_squares_unsel = theme_assets.taglist_squares_unsel(
  54. taglist_square_size, theme.fg_normal
  55. )
  56. theme.menu_height = dpi(15)
  57. theme.menu_width = dpi(100)
  58. theme.systray_icon_spacing = 2
  59. -- Define the image to load
  60. theme.titlebar_ontop_button_normal_inactive = themes_path.."reno98/titlebar/ontop_normal_inactive.png"
  61. theme.titlebar_ontop_button_focus_inactive = themes_path.."reno98/titlebar/ontop_focus_inactive.png"
  62. theme.titlebar_ontop_button_normal_active = themes_path.."reno98/titlebar/ontop_normal_active.png"
  63. theme.titlebar_ontop_button_focus_active = themes_path.."reno98/titlebar/ontop_focus_active.png"
  64. theme.titlebar_sticky_button_normal_inactive = themes_path.."reno98/titlebar/sticky_normal_inactive.png"
  65. theme.titlebar_sticky_button_focus_inactive = themes_path.."reno98/titlebar/sticky_focus_inactive.png"
  66. theme.titlebar_sticky_button_normal_active = themes_path.."reno98/titlebar/sticky_normal_active.png"
  67. theme.titlebar_sticky_button_focus_active = themes_path.."reno98/titlebar/sticky_focus_active.png"
  68. theme.titlebar_floating_button_normal_inactive = themes_path.."reno98/titlebar/floating_normal_inactive.png"
  69. theme.titlebar_floating_button_focus_inactive = themes_path.."reno98/titlebar/floating_focus_inactive.png"
  70. theme.titlebar_floating_button_normal_active = themes_path.."reno98/titlebar/floating_normal_active.png"
  71. theme.titlebar_floating_button_focus_active = themes_path.."reno98/titlebar/floating_focus_active.png"
  72. theme = theme_assets.recolor_titlebar(theme,theme.fg_normal,"normal")
  73. theme = theme_assets.recolor_titlebar(theme,theme.fg_focus,"focus")
  74. theme.titlebar_close_button_normal = themes_path.."reno98/titlebar/close_normal.png"
  75. theme.titlebar_close_button_focus = themes_path.."reno98/titlebar/close_focus.png"
  76. theme.titlebar_minimize_button_normal = themes_path.."reno98/titlebar/minimize_normal.png"
  77. theme.titlebar_minimize_button_focus = themes_path.."reno98/titlebar/minimize_focus.png"
  78. theme.titlebar_maximized_button_normal_inactive = themes_path.."reno98/titlebar/maximized_normal_inactive.png"
  79. theme.titlebar_maximized_button_focus_inactive = themes_path.."reno98/titlebar/maximized_focus_inactive.png"
  80. theme.titlebar_maximized_button_normal_active = themes_path.."reno98/titlebar/maximized_normal_active.png"
  81. theme.titlebar_maximized_button_focus_active = themes_path.."reno98/titlebar/maximized_focus_active.png"
  82. theme.wallpaper = themes_path.."reno98/background.png"
  83. theme.wallpapers_icon = themes_path.."reno98/icons/wallpapers.png"
  84. -- You can use your own layout icons like this:
  85. theme.layout_fairh = themes_path.."reno98/layouts/fairhw.png"
  86. theme.layout_fairv = themes_path.."reno98/layouts/fairvw.png"
  87. theme.layout_floating = themes_path.."reno98/layouts/floatingw.png"
  88. theme.layout_magnifier = themes_path.."reno98/layouts/magnifierw.png"
  89. theme.layout_max = themes_path.."reno98/layouts/maxw.png"
  90. theme.layout_fullscreen = themes_path.."reno98/layouts/fullscreenw.png"
  91. theme.layout_tilebottom = themes_path.."reno98/layouts/tilebottomw.png"
  92. theme.layout_tileleft = themes_path.."reno98/layouts/tileleftw.png"
  93. theme.layout_tile = themes_path.."reno98/layouts/tilew.png"
  94. theme.layout_tiletop = themes_path.."reno98/layouts/tiletopw.png"
  95. theme.layout_spiral = themes_path.."reno98/layouts/spiralw.png"
  96. theme.layout_dwindle = themes_path.."reno98/layouts/dwindlew.png"
  97. theme.layout_cornernw = themes_path.."reno98/layouts/cornernww.png"
  98. theme.layout_cornerne = themes_path.."reno98/layouts/cornernew.png"
  99. theme.layout_cornersw = themes_path.."reno98/layouts/cornersww.png"
  100. theme.layout_cornerse = themes_path.."reno98/layouts/cornersew.png"
  101. -- Generate Awesome icon:
  102. theme.awesome_icon = theme_assets.awesome_icon(
  103. theme.menu_height, theme.bg_focus, theme.fg_focus
  104. )
  105. theme.hotkeys_border_width = 3
  106. theme.hotkeys_border_color = theme.bg_focus
  107. theme.hotkeys_modifiers_fg = theme.fg_normal
  108. theme.hotkeys_label_fg = theme.fg_normal
  109. theme.bgimage_outset = function(context, cr, width, height,...)
  110. local light = gears.color(theme.bg_highlight_light)
  111. local shadow = gears.color(theme.bg_highlight_shadow)
  112. local outline = gears.color(theme.bg_highlight_outline)
  113. -- Background
  114. -- Light
  115. cr:set_source(light)
  116. cr.line_width=2
  117. cr:move_to(0,0)
  118. cr:line_to(width,0)
  119. cr:move_to(0,0)
  120. cr:line_to(0,height)
  121. cr:stroke()
  122. -- Outline
  123. cr:set_source(outline)
  124. cr:move_to(width-1,height-1)
  125. cr:line_to(width-1,1)
  126. cr:move_to(width-2,height-1)
  127. cr:line_to(1,height-1)
  128. cr:stroke()
  129. -- Shadow
  130. cr:set_source(shadow)
  131. cr:move_to(width,height)
  132. cr:line_to(width,0)
  133. cr:move_to(width-1,height)
  134. cr:line_to(0,height)
  135. cr:stroke()
  136. end
  137. theme.bgimage_inset = function(context,cr,width,height)
  138. local light = gears.color(theme.bg_highlight_light)
  139. local shadow = gears.color(theme.bg_highlight_shadow)
  140. local outline = gears.color(theme.bg_highlight_outline)
  141. -- Light
  142. cr:set_source(light)
  143. cr.line_width=2
  144. cr:move_to(width,height)
  145. cr:line_to(width,0)
  146. cr:move_to(width,height)
  147. cr:line_to(0,height)
  148. cr:stroke()
  149. -- Shadow
  150. cr:set_source(shadow)
  151. cr.line_width=2
  152. cr:move_to(0,0)
  153. cr:line_to(0,height)
  154. cr:move_to(0,0)
  155. cr:line_to(width,0)
  156. cr:stroke()
  157. end
  158. theme.bgimage_highlight = function(context,cr,width,height)
  159. local light = gears.color(theme.bg_highlight_light)
  160. local shadow = gears.color(theme.bg_highlight_shadow)
  161. local outline = gears.color(theme.bg_highlight_outline)
  162. -- Light
  163. cr:set_source(light)
  164. cr.line_width=2
  165. cr:move_to(1,1)
  166. cr:line_to(1,height-2)
  167. cr:move_to(1,1)
  168. cr:line_to(width-2,1)
  169. cr:stroke()
  170. -- Outline
  171. cr:set_source(outline)
  172. cr.line_width=2
  173. cr:rectangle(0,0,width-1,height-1)
  174. cr:stroke()
  175. -- Light (bottom)
  176. cr:set_source(light)
  177. cr:move_to(width,height)
  178. cr:line_to(width,0)
  179. cr:move_to(width,height)
  180. cr:line_to(0,height)
  181. cr:stroke()
  182. end
  183. -- A complex piece of "code" to simulate borders.
  184. theme.titlebar_bgimage_top = function(context, cr, width, height,...)
  185. local light = gears.color(theme.bg_highlight_light)
  186. local shadow = gears.color(theme.bg_highlight_shadow)
  187. local outline = gears.color(theme.bg_highlight_outline)
  188. cr.line_width = 2
  189. cr:set_source(gears.color(theme.bg_normal))
  190. cr:rectangle(2,2,width-5,height-3)
  191. cr:stroke()
  192. -- Light
  193. cr:set_source(light)
  194. cr.line_width=2
  195. cr:move_to(0,0)
  196. cr:line_to(width,0)
  197. cr:move_to(0,0)
  198. cr:line_to(0,height)
  199. cr:stroke()
  200. -- Outline
  201. cr:set_source(outline)
  202. cr:move_to(width-1,height)
  203. cr:line_to(width-1,1)
  204. cr:stroke()
  205. -- Shadow
  206. cr:set_source(shadow)
  207. cr:move_to(width,height)
  208. cr:line_to(width,0)
  209. cr:stroke()
  210. end
  211. theme.titlebar_bgimage_bottom = function(context, cr, width, height, ...)
  212. local light = gears.color(theme.bg_highlight_light)
  213. local shadow = gears.color(theme.bg_highlight_shadow)
  214. local outline = gears.color(theme.bg_highlight_outline)
  215. -- Background
  216. -- Light
  217. cr:set_source(light)
  218. cr.line_width=2
  219. cr:move_to(0,0)
  220. cr:line_to(0,height)
  221. cr:stroke()
  222. -- Outline
  223. cr:set_source(outline)
  224. cr:move_to(width-1,height-1)
  225. cr:line_to(width-1,0)
  226. cr:move_to(width-2,height-1)
  227. cr:line_to(1,height-1)
  228. cr:stroke()
  229. -- Shadow
  230. cr:set_source(shadow)
  231. cr:move_to(width,height)
  232. cr:line_to(width,0)
  233. cr:move_to(width-1,height)
  234. cr:line_to(0,height)
  235. cr:stroke()
  236. end
  237. theme.titlebar_bgimage_left = function(context, cr, width, height,...)
  238. local light = gears.color(theme.bg_highlight_light)
  239. -- Light
  240. cr:set_source(light)
  241. cr.line_width=2
  242. cr:move_to(0,0)
  243. cr:line_to(0,height)
  244. cr:stroke()
  245. end
  246. theme.titlebar_bgimage_right = function(context, cr, width, height,...)
  247. local shadow = gears.color(theme.bg_highlight_shadow)
  248. local outline = gears.color(theme.bg_highlight_outline)
  249. cr.line_width=2
  250. -- Outline
  251. cr:set_source(outline)
  252. cr:move_to(width-1,height)
  253. cr:line_to(width-1,0)
  254. cr:stroke()
  255. -- Shadow
  256. cr:set_source(shadow)
  257. cr:move_to(width,height)
  258. cr:line_to(width,0)
  259. cr:stroke()
  260. end
  261. ---theme.bgimage_outset
  262. -- Define the icon theme for application icons. If not set then the icons
  263. -- from /usr/share/icons and /usr/share/icons/hicolor will be used.
  264. theme.icon_theme = "Chicago95"
  265. -- Icons
  266. local icons = {
  267. "battery-caution-charging-symbolic",
  268. "battery-empty-charging-symbolic",
  269. "battery-full-charging-symbolic",
  270. "battery-good-charging-symbolic",
  271. "battery-low-charging-symbolic"
  272. }
  273. for k,v in pairs(icons) do
  274. theme[v] = themes_path.."reno98/icons/"..v..".png"
  275. theme[v:gsub("-charging","")] = themes_path.."reno98/icons/"..v:gsub("-charging","")..".png"
  276. end
  277. theme["battery-full-charged-symbolic"] = themes_path.."reno98/icons/battery-full-charged-symbolic.png"
  278. theme["battery-missing-symbolic"] = themes_path.."reno98/icons/battery-missing-symbolic.png"
  279. theme["ac-adapter-symbolic"] = themes_path.."reno98/icons/ac-adapter-symbolic.png"
  280. theme["backlight-symbolic"] = themes_path.."reno98/icons/backlight-symbolic.png"
  281. theme["notifications-area-symbolic"] = themes_path.."reno98/icons/notifications-area-symbolic.png"
  282. theme["mpc-previous-symbolic"] = themes_path.."reno98/icons/mpc-previous-symbolic.png"
  283. theme["mpc-play-symbolic"] = themes_path.."reno98/icons/mpc-play-symbolic.png"
  284. theme["mpc-pause-symbolic"] = themes_path.."reno98/icons/mpc-pause-symbolic.png"
  285. theme["mpc-next-symbolic"] = themes_path.."reno98/icons/mpc-next-symbolic.png"
  286. theme["action-poweroff-symbolic"] = themes_path.."reno98/icons/action-poweroff-symbolic.png"
  287. theme["action-lock-screen-symbolic"] = themes_path.."reno98/icons/action-lock-screen-symbolic.png"
  288. theme["action-suspend-symbolic"] = themes_path.."reno98/icons/action-suspend-symbolic.png"
  289. -- Notification popups settings
  290. theme.notification_width = 240
  291. theme.notification_height = 60
  292. -- Default icon for clients
  293. -- This one has to be baked as a surface to avoid memory leaks
  294. theme.icon_default = gears.surface(themes_path.."reno98/icons/unknown-app.png")
  295. theme.widgets = {
  296. -- {{{ Widget base
  297. default = {
  298. container = {
  299. bgimage_normal = theme.bgimage_highlight,
  300. shape = function(cr,width,height)
  301. return require("gears").shape.rounded_rect(cr,width,height,0)
  302. end,
  303. bgimage_highlight = theme.bgimage_inset
  304. },
  305. button = {
  306. bgimage_normal = theme.bgimage_outset,
  307. shape = function(cr,width,height)
  308. return require("gears").shape.rounded_rect(cr,width,height,0)
  309. end,
  310. onpress = function(widget)
  311. widget:set_bg(theme.bg_focus)
  312. widget:set_bgimage(theme.bgimage_inset)
  313. end,
  314. onrelease = function(widget)
  315. widget:set_bg(theme.bg_normal)
  316. widget:set_bgimage(theme.bgimage_outset)
  317. end
  318. },
  319. popup = {
  320. bgimage_normal = theme.bgimage_outset,
  321. shape = function(cr,width,height)
  322. return gears.shape.rounded_rect(cr,width,height,0)
  323. end,
  324. },
  325. titlebar = {
  326. hidden_size = 2,
  327. bgimage_normal = theme.bgimage_outset,
  328. --margins = 5,
  329. left = 4,
  330. right = 5,
  331. top = 4,
  332. bottom = 3,
  333. spacing = 1
  334. },
  335. wibar = {
  336. height = 26,
  337. width = 60,
  338. margins = 3,
  339. shape = function(cr,width,height)
  340. return gears.shape.rounded_rect(cr,width,height,0)
  341. end,
  342. bgimage_normal = theme.bgimage_outset,
  343. stretch = true
  344. },
  345. slider = {
  346. shape = function(cr,width,height)
  347. return gears.shape.rounded_rect(cr,width,height,0)
  348. end,
  349. height = 20,
  350. width = 140,
  351. handle_width = 8,
  352. handle_border_color = theme.bg_focus,
  353. handle_border_width = 2,
  354. bar_height = 6
  355. }
  356. },
  357. -- }}}
  358. -- {{{ Menus
  359. generic_menu = {
  360. base = {
  361. spacing = 2,
  362. menu_slide = true
  363. },
  364. button = {
  365. forced_height = 20,
  366. forced_width = 160
  367. },
  368. },
  369. --}}}
  370. -- {{{ Bars/Panels/Menu popups
  371. generic_composite_widget = {
  372. base = {
  373. spacing = 2
  374. }
  375. },
  376. -- }}}
  377. -- {{{ Status panel widgets
  378. generic_status_widget = {
  379. container = {
  380. bgimage_normal = function() end,
  381. margins = 0
  382. },
  383. button = {
  384. margins = 0,
  385. onpress = function() end,
  386. onrelease = function() end,
  387. bgimage_normal = function() end
  388. }
  389. },
  390. -- }}}
  391. -- {{{ Various button lists
  392. generic_button_list = {
  393. button = {
  394. forced_width = 20,
  395. forced_height = 20
  396. },
  397. base = {
  398. spacing = 2
  399. }
  400. },
  401. -- }}}
  402. -- {{{ All widgets that fit into a single line
  403. generic_oneline_widget = {
  404. container = {
  405. bgimage_normal = theme.bgimage_inset
  406. }
  407. },
  408. -- }}}
  409. -- {{{ All kinds of widget popups
  410. generic_popup = {
  411. button = {
  412. width = 180,
  413. height = 40
  414. },
  415. article = {
  416. icon_size = 30
  417. },
  418. },
  419. -- }}}
  420. popuptitle = {
  421. container = {
  422. bg_normal = {
  423. type = "linear",
  424. from = { 0, 0 },
  425. to = { 90, 0 },
  426. stops = { {0, "#040582"}, {1, "#0F7FCD"} }
  427. },
  428. -- awesomewm: yo pass me that pango markup
  429. -- pango: you better not make unintuitive cryptic shit
  430. -- awesomewm: *attach foreground setting to drawable container*
  431. fg_normal = "#FAFAFA"
  432. }
  433. },
  434. soundclown = {
  435. --[[ --Uncomment to leetify that MPC
  436. container = {
  437. bg_normal = "#0c0c0c",
  438. fg_normal = "#00FF00"
  439. },
  440. ]]
  441. base = {
  442. width = 140
  443. },
  444. },
  445. subpanel = {
  446. container = {
  447. bgimage_normal = theme.bgimage_inset,
  448. bg_normal = theme.bg_normal,
  449. margins = 2
  450. }
  451. },
  452. taglist = {
  453. base = {
  454. spacing = 2,
  455. layout = require("wibox").layout.flex.horizontal
  456. },
  457. button = {
  458. bgimage_focus = theme.bgimage_inset,
  459. bgimage_normal = theme.bgimage_outset,
  460. },
  461. container = {
  462. margins = 3
  463. }
  464. },
  465. tasklist = {
  466. button = {
  467. width = 160,
  468. height = 50,
  469. bgimage_focus = theme.bgimage_inset,
  470. bgimage_normal = theme.bgimage_outset,
  471. bgimage_urgent = theme.bgimage_outset,
  472. bgimage_minimize = theme.bgimage_outset
  473. }
  474. },
  475. lockscreen = {
  476. popup = {
  477. margins = 0
  478. }
  479. },
  480. lockbar = {
  481. base = {
  482. height = 22
  483. }
  484. },
  485. lockpanel = {
  486. base = {
  487. icon_height = 60,
  488. icon_width = 60,
  489. panel_height = 300,
  490. panel_width = 200,
  491. panel_bgimage = theme.bgimage_outset
  492. }
  493. },
  494. lock_clock = {
  495. textbox = {
  496. font = "Terminus 20"
  497. }
  498. },
  499. titlebar = {
  500. titlebar_top = {
  501. bgimage_normal = theme.titlebar_bgimage_top,
  502. bgimage_focus = theme.titlebar_bgimage_top,
  503. bg_focus = theme.titlebar_bg_focus,
  504. bg_normal = theme.titlebar_bg_normal,
  505. fg_focus = "#FAFAFA",
  506. fg_normal = theme.fg_normal,
  507. size = 22,
  508. },
  509. titlebar_left = {
  510. bgimage_normal = theme.titlebar_bgimage_left,
  511. bgimage_focus = theme.titlebar_bgimage_left,
  512. size = 4,
  513. bg_focus = theme.bg_normal
  514. },
  515. titlebar_right = {
  516. bgimage_normal = theme.titlebar_bgimage_right,
  517. bgimage_focus = theme.titlebar_bgimage_right,
  518. size = 4,
  519. bg_focus = theme.bg_normal
  520. },
  521. titlebar_bottom = {
  522. bgimage_normal = theme.titlebar_bgimage_bottom,
  523. bgimage_focus = theme.titlebar_bgimage_bottom,
  524. size = 4,
  525. bg_focus = theme.bg_normal
  526. }
  527. }
  528. }
  529. return theme
  530. -- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80