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.

757 lines
25 KiB

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