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.

599 lines
19 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
1 year 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
12 months 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
12 months 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(10)
  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_assets.recolor_layout(theme,theme.fg_normal)
  110. theme.bgimage_outset = function(context, cr, width, height,...)
  111. local light = gears.color(theme.bg_highlight_light)
  112. local shadow = gears.color(theme.bg_highlight_shadow)
  113. local outline = gears.color(theme.bg_highlight_outline)
  114. -- Background
  115. -- Light
  116. cr:set_source(light)
  117. cr.line_width=2
  118. cr:move_to(0,0)
  119. cr:line_to(width,0)
  120. cr:move_to(0,0)
  121. cr:line_to(0,height)
  122. cr:stroke()
  123. -- Outline
  124. cr:set_source(outline)
  125. cr:move_to(width-1,height-1)
  126. cr:line_to(width-1,1)
  127. cr:move_to(width-2,height-1)
  128. cr:line_to(1,height-1)
  129. cr:stroke()
  130. -- Shadow
  131. cr:set_source(shadow)
  132. cr:move_to(width,height)
  133. cr:line_to(width,0)
  134. cr:move_to(width-1,height)
  135. cr:line_to(0,height)
  136. cr:stroke()
  137. end
  138. theme.bgimage_inset = function(context,cr,width,height)
  139. local light = gears.color(theme.bg_highlight_light)
  140. local shadow = gears.color(theme.bg_highlight_shadow)
  141. local outline = gears.color(theme.bg_highlight_outline)
  142. -- Light
  143. cr:set_source(light)
  144. cr.line_width=2
  145. cr:move_to(width,height)
  146. cr:line_to(width,0)
  147. cr:move_to(width,height)
  148. cr:line_to(0,height)
  149. cr:stroke()
  150. -- Shadow
  151. cr:set_source(shadow)
  152. cr.line_width=2
  153. cr:move_to(0,0)
  154. cr:line_to(0,height)
  155. cr:move_to(0,0)
  156. cr:line_to(width,0)
  157. cr:stroke()
  158. end
  159. theme.bgimage_highlight = function(context,cr,width,height)
  160. local light = gears.color(theme.bg_highlight_light)
  161. local shadow = gears.color(theme.bg_highlight_shadow)
  162. local outline = gears.color(theme.bg_highlight_outline)
  163. -- Light
  164. cr:set_source(light)
  165. cr.line_width=2
  166. cr:move_to(1,1)
  167. cr:line_to(1,height-2)
  168. cr:move_to(1,1)
  169. cr:line_to(width-2,1)
  170. cr:stroke()
  171. -- Outline
  172. cr:set_source(outline)
  173. cr.line_width=2
  174. cr:rectangle(0,0,width-1,height-1)
  175. cr:stroke()
  176. -- Light (bottom)
  177. cr:set_source(light)
  178. cr:move_to(width,height)
  179. cr:line_to(width,0)
  180. cr:move_to(width,height)
  181. cr:line_to(0,height)
  182. cr:stroke()
  183. end
  184. -- A complex piece of "code" to simulate borders.
  185. theme.titlebar_bgimage_top = function(context, cr, width, height,...)
  186. local light = gears.color(theme.bg_highlight_light)
  187. local shadow = gears.color(theme.bg_highlight_shadow)
  188. local outline = gears.color(theme.bg_highlight_outline)
  189. cr.line_width = 2
  190. cr:set_source(gears.color(theme.bg_normal))
  191. cr:rectangle(2,2,width-5,height-3)
  192. cr:stroke()
  193. -- Light
  194. cr:set_source(light)
  195. cr.line_width=2
  196. cr:move_to(0,0)
  197. cr:line_to(width,0)
  198. cr:move_to(0,0)
  199. cr:line_to(0,height)
  200. cr:stroke()
  201. -- Outline
  202. cr:set_source(outline)
  203. cr:move_to(width-1,height)
  204. cr:line_to(width-1,1)
  205. cr:stroke()
  206. -- Shadow
  207. cr:set_source(shadow)
  208. cr:move_to(width,height)
  209. cr:line_to(width,0)
  210. cr:stroke()
  211. end
  212. theme.titlebar_bgimage_bottom = function(context, cr, width, height, ...)
  213. local light = gears.color(theme.bg_highlight_light)
  214. local shadow = gears.color(theme.bg_highlight_shadow)
  215. local outline = gears.color(theme.bg_highlight_outline)
  216. -- Background
  217. -- Light
  218. cr:set_source(light)
  219. cr.line_width=2
  220. cr:move_to(0,0)
  221. cr:line_to(0,height)
  222. cr:stroke()
  223. -- Outline
  224. cr:set_source(outline)
  225. cr:move_to(width-1,height-1)
  226. cr:line_to(width-1,0)
  227. cr:move_to(width-2,height-1)
  228. cr:line_to(1,height-1)
  229. cr:stroke()
  230. -- Shadow
  231. cr:set_source(shadow)
  232. cr:move_to(width,height)
  233. cr:line_to(width,0)
  234. cr:move_to(width-1,height)
  235. cr:line_to(0,height)
  236. cr:stroke()
  237. end
  238. theme.titlebar_bgimage_left = function(context, cr, width, height,...)
  239. local light = gears.color(theme.bg_highlight_light)
  240. -- Light
  241. cr:set_source(light)
  242. cr.line_width=2
  243. cr:move_to(0,0)
  244. cr:line_to(0,height)
  245. cr:stroke()
  246. end
  247. theme.titlebar_bgimage_right = function(context, cr, width, height,...)
  248. local shadow = gears.color(theme.bg_highlight_shadow)
  249. local outline = gears.color(theme.bg_highlight_outline)
  250. cr.line_width=2
  251. -- Outline
  252. cr:set_source(outline)
  253. cr:move_to(width-1,height)
  254. cr:line_to(width-1,0)
  255. cr:stroke()
  256. -- Shadow
  257. cr:set_source(shadow)
  258. cr:move_to(width,height)
  259. cr:line_to(width,0)
  260. cr:stroke()
  261. end
  262. ---theme.bgimage_outset
  263. -- Define the icon theme for application icons. If not set then the icons
  264. -- from /usr/share/icons and /usr/share/icons/hicolor will be used.
  265. theme.icon_theme = "Chicago95"
  266. -- Icons
  267. local icons = {
  268. "battery-caution-charging-symbolic",
  269. "battery-empty-charging-symbolic",
  270. "battery-full-charging-symbolic",
  271. "battery-good-charging-symbolic",
  272. "battery-low-charging-symbolic"
  273. }
  274. for k,v in pairs(icons) do
  275. theme[v] = themes_path.."reno98/icons/"..v..".png"
  276. theme[v:gsub("-charging","")] = themes_path.."reno98/icons/"..v:gsub("-charging","")..".png"
  277. end
  278. theme["battery-full-charged-symbolic"] = themes_path.."reno98/icons/battery-full-charged-symbolic.png"
  279. theme["battery-missing-symbolic"] = themes_path.."reno98/icons/battery-missing-symbolic.png"
  280. theme["ac-adapter-symbolic"] = themes_path.."reno98/icons/ac-adapter-symbolic.png"
  281. theme["backlight-symbolic"] = themes_path.."reno98/icons/backlight-symbolic.png"
  282. theme["notifications-area-symbolic"] = themes_path.."reno98/icons/notifications-area-symbolic.png"
  283. theme["notifications-area-flagged-symbolic"] = themes_path.."reno98/icons/notifications-area-flagged-symbolic.png"
  284. theme["mpc-previous-symbolic"] = themes_path.."reno98/icons/mpc-previous-symbolic.png"
  285. theme["mpc-play-symbolic"] = themes_path.."reno98/icons/mpc-play-symbolic.png"
  286. theme["mpc-pause-symbolic"] = themes_path.."reno98/icons/mpc-pause-symbolic.png"
  287. theme["mpc-next-symbolic"] = themes_path.."reno98/icons/mpc-next-symbolic.png"
  288. theme["action-poweroff-symbolic"] = themes_path.."reno98/icons/action-poweroff-symbolic.png"
  289. theme["action-lock-screen-symbolic"] = themes_path.."reno98/icons/action-lock-screen-symbolic.png"
  290. theme["action-suspend-symbolic"] = themes_path.."reno98/icons/action-suspend-symbolic.png"
  291. theme["volume-high-symbolic"] = themes_path.."reno98/icons/volume-high-symbolic.png"
  292. theme["volume-medium-symbolic"] = themes_path.."reno98/icons/volume-medium-symbolic.png"
  293. theme["volume-low-symbolic"] = themes_path.."reno98/icons/volume-low-symbolic.png"
  294. theme["volume-muted-symbolic"] = themes_path.."reno98/icons/volume-muted-symbolic.png"
  295. -- Notification popups settings
  296. theme.notification_width = 240
  297. theme.notification_height = 60
  298. -- Default icon for clients
  299. -- This one has to be baked as a surface to avoid memory leaks
  300. theme.icon_default = gears.surface(themes_path.."reno98/icons/unknown-app.png")
  301. theme.widgets = {
  302. -- {{{ Widget base
  303. default = {
  304. container = {
  305. bgimage_normal = theme.bgimage_highlight,
  306. shape = function(cr,width,height)
  307. return require("gears").shape.rounded_rect(cr,width,height,0)
  308. end,
  309. bgimage_highlight = theme.bgimage_inset
  310. },
  311. button = {
  312. bgimage_normal = theme.bgimage_outset,
  313. shape = function(cr,width,height)
  314. return require("gears").shape.rounded_rect(cr,width,height,0)
  315. end,
  316. onpress = function(widget)
  317. widget:set_bg(theme.bg_focus)
  318. widget:set_bgimage(theme.bgimage_inset)
  319. end,
  320. onrelease = function(widget)
  321. widget:set_bg(theme.bg_normal)
  322. widget:set_bgimage(theme.bgimage_outset)
  323. end
  324. },
  325. popup = {
  326. bgimage_normal = theme.bgimage_outset,
  327. shape = function(cr,width,height)
  328. return gears.shape.rounded_rect(cr,width,height,0)
  329. end,
  330. },
  331. titlebar = {
  332. hidden_size = 2,
  333. bgimage_normal = theme.bgimage_outset,
  334. --margins = 5,
  335. left = 4,
  336. right = 5,
  337. top = 4,
  338. bottom = 3,
  339. spacing = 1
  340. },
  341. wibar = {
  342. height = 26,
  343. width = 60,
  344. margins = 3,
  345. shape = function(cr,width,height)
  346. return gears.shape.rounded_rect(cr,width,height,0)
  347. end,
  348. bgimage_normal = theme.bgimage_outset,
  349. stretch = true
  350. },
  351. checkbox = {
  352. width = 15,
  353. height = 15,
  354. shape = gears.shape.circle,
  355. border_width = 2,
  356. border_color = theme.bg_normal,
  357. bg = theme.bg_highlight,
  358. check_color = "#000000",
  359. paddings = 2
  360. },
  361. slider = {
  362. shape = function(cr,width,height)
  363. return gears.shape.rounded_rect(cr,width,height,0)
  364. end,
  365. height = 20,
  366. width = 140,
  367. handle_width = 8,
  368. handle_border_color = theme.bg_focus,
  369. handle_border_width = 2,
  370. bar_height = 6
  371. }
  372. },
  373. -- }}}
  374. -- {{{ Menus
  375. generic_menu = {
  376. base = {
  377. spacing = 2,
  378. menu_slide = true
  379. },
  380. button = {
  381. forced_height = 20,
  382. forced_width = 160
  383. },
  384. },
  385. --}}}
  386. -- {{{ Bars/Panels/Menu popups
  387. generic_composite_widget = {
  388. base = {
  389. spacing = 2
  390. }
  391. },
  392. -- }}}
  393. -- {{{ Status panel widgets
  394. generic_status_widget = {
  395. container = {
  396. bgimage_normal = function() end,
  397. margins = 0
  398. },
  399. button = {
  400. margins = 0,
  401. onpress = function() end,
  402. onrelease = function() end,
  403. bgimage_normal = function() end
  404. }
  405. },
  406. -- }}}
  407. -- {{{ Various button lists
  408. generic_button_list = {
  409. button = {
  410. forced_width = 20,
  411. forced_height = 20
  412. },
  413. base = {
  414. spacing = 2
  415. }
  416. },
  417. -- }}}
  418. -- {{{ All widgets that fit into a single line
  419. generic_oneline_widget = {
  420. container = {
  421. bgimage_normal = theme.bgimage_inset
  422. }
  423. },
  424. -- }}}
  425. -- {{{ All kinds of widget popups
  426. generic_popup = {
  427. button = {
  428. width = 180,
  429. height = 40
  430. },
  431. article = {
  432. icon_size = 30
  433. },
  434. },
  435. -- }}}
  436. popuptitle = {
  437. container = {
  438. bg_normal = {
  439. type = "linear",
  440. from = { 0, 0 },
  441. to = { 90, 0 },
  442. stops = { {0, "#040582"}, {1, "#0F7FCD"} }
  443. },
  444. -- awesomewm: yo pass me that pango markup
  445. -- pango: you better not make unintuitive cryptic shit
  446. -- awesomewm: *attaches foreground text color setting to container*
  447. fg_normal = "#FAFAFA"
  448. }
  449. },
  450. soundclown = {
  451. --[[ --Uncomment to leetify that MPC
  452. container = {
  453. bg_normal = "#0c0c0c",
  454. fg_normal = "#00FF00"
  455. },
  456. ]]
  457. base = {
  458. width = 140
  459. },
  460. },
  461. subpanel = {
  462. container = {
  463. bgimage_normal = theme.bgimage_inset,
  464. bg_normal = theme.bg_normal,
  465. margins = 2
  466. }
  467. },
  468. taglist = {
  469. base = {
  470. spacing = 2,
  471. layout = require("wibox").layout.flex.horizontal
  472. },
  473. button = {
  474. bgimage_focus = theme.bgimage_inset,
  475. bgimage_normal = theme.bgimage_outset,
  476. },
  477. container = {
  478. margins = 3
  479. }
  480. },
  481. tasklist = {
  482. button = {
  483. width = 160,
  484. height = 50,
  485. bgimage_focus = theme.bgimage_inset,
  486. bgimage_normal = theme.bgimage_outset,
  487. bgimage_urgent = theme.bgimage_outset,
  488. bgimage_minimize = theme.bgimage_outset
  489. }
  490. },
  491. lockscreen = {
  492. popup = {
  493. margins = 0
  494. }
  495. },
  496. lockbar = {
  497. base = {
  498. height = 22
  499. }
  500. },
  501. lockpanel = {
  502. base = {
  503. icon_height = 60,
  504. icon_width = 60,
  505. panel_height = 300,
  506. panel_width = 200,
  507. panel_bgimage = theme.bgimage_outset
  508. }
  509. },
  510. lock_clock = {
  511. textbox = {
  512. font = "Terminus 20"
  513. }
  514. },
  515. titlebar = {
  516. titlebar_top = {
  517. bgimage_normal = theme.titlebar_bgimage_top,
  518. bgimage_focus = theme.titlebar_bgimage_top,
  519. bg_focus = theme.titlebar_bg_focus,
  520. bg_normal = theme.titlebar_bg_normal,
  521. fg_focus = "#FAFAFA",
  522. fg_normal = theme.fg_normal,
  523. size = 22,
  524. },
  525. titlebar_left = {
  526. bgimage_normal = theme.titlebar_bgimage_left,
  527. bgimage_focus = theme.titlebar_bgimage_left,
  528. size = 4,
  529. bg_focus = theme.bg_normal
  530. },
  531. titlebar_right = {
  532. bgimage_normal = theme.titlebar_bgimage_right,
  533. bgimage_focus = theme.titlebar_bgimage_right,
  534. size = 4,
  535. bg_focus = theme.bg_normal
  536. },
  537. titlebar_bottom = {
  538. bgimage_normal = theme.titlebar_bgimage_bottom,
  539. bgimage_focus = theme.titlebar_bgimage_bottom,
  540. size = 4,
  541. bg_focus = theme.bg_normal
  542. }
  543. }
  544. }
  545. return theme
  546. -- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80