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.

783 lines
26 KiB

2 years ago
2 years ago
1 year ago
12 months ago
12 months ago
12 months ago
2 years ago
2 years ago
2 years ago
2 years ago
12 months ago
12 months ago
2 years ago
12 months 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(10)
  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["notifications-area-flagged-symbolic"] = themes_path.."unity/icons/notifications-area-flagged-symbolic.png"
  193. theme["mpc-previous-symbolic"] = themes_path.."unity/icons/mpc-previous-symbolic.png"
  194. theme["mpc-play-symbolic"] = themes_path.."unity/icons/mpc-play-symbolic.png"
  195. theme["mpc-pause-symbolic"] = themes_path.."unity/icons/mpc-pause-symbolic.png"
  196. theme["mpc-next-symbolic"] = themes_path.."unity/icons/mpc-next-symbolic.png"
  197. theme["action-poweroff-symbolic"] = themes_path.."unity/icons/action-poweroff-symbolic.png"
  198. theme["action-lock-screen-symbolic"] = themes_path.."unity/icons/action-lock-screen-symbolic.png"
  199. theme["action-suspend-symbolic"] = themes_path.."unity/icons/action-suspend-symbolic.png"
  200. theme["volume-high-symbolic"] = themes_path.."unity/icons/volume-high-symbolic.png"
  201. theme["volume-medium-symbolic"] = themes_path.."unity/icons/volume-medium-symbolic.png"
  202. theme["volume-low-symbolic"] = themes_path.."unity/icons/volume-low-symbolic.png"
  203. theme["volume-muted-symbolic"] = themes_path.."unity/icons/volume-muted-symbolic.png"
  204. theme["applications-tab-symbolic"] = themes_path.."unity/icons/applications-tab-symbolic.png"
  205. theme.wallpaper = themes_path.."unity/background.png"
  206. theme.wallpapers_icon = themes_path.."unity/icons/wallpapers.png"
  207. -- Default icon for clients
  208. -- This one has to be baked as a surface to avoid memory leaks
  209. theme.icon_default = themes_path.."unity/icons/unknown-app.png"
  210. for _,v in pairs({
  211. "applications-tab-symbolic",
  212. "battery-caution-symbolic",
  213. "battery-empty-symbolic",
  214. "battery-full-symbolic",
  215. "battery-good-symbolic",
  216. "battery-low-symbolic",
  217. "battery-caution-charging-symbolic",
  218. "battery-empty-charging-symbolic",
  219. "battery-full-charging-symbolic",
  220. "battery-good-charging-symbolic",
  221. "battery-low-charging-symbolic",
  222. "battery-full-charged-symbolic",
  223. "battery-missing-symbolic",
  224. "ac-adapter-symbolic",
  225. "backlight-symbolic",
  226. "notifications-area-symbolic",
  227. "notifications-area-flagged-symbolic",
  228. "mpc-previous-symbolic",
  229. "mpc-play-symbolic",
  230. "mpc-pause-symbolic",
  231. "mpc-next-symbolic",
  232. "action-poweroff-symbolic",
  233. "action-lock-screen-symbolic",
  234. "action-suspend-symbolic",
  235. "wallpapers_icon",
  236. "icon_default",
  237. "volume-high-symbolic",
  238. "volume-medium-symbolic",
  239. "volume-low-symbolic",
  240. "volume-muted-symbolic"}) do
  241. if theme[v] and gears.filesystem.file_readable(theme[v]) then
  242. theme[v] = gears.color.recolor_image(theme[v],theme.fg_normal)
  243. end
  244. end
  245. theme_assets.recolor_layout(theme,theme.fg_normal)
  246. -- Notification popups settings
  247. theme.notification_width = 240
  248. theme.notification_height = 60
  249. theme.widgets = {
  250. -- {{{ Widget base
  251. default = {
  252. container = {
  253. shape = function(cr,width,height)
  254. return require("gears").shape.rounded_rect(cr,width,height,2)
  255. end,
  256. bgimage_highlight = theme.bgimage_inset
  257. },
  258. button = {
  259. shape = theme.button_shape,
  260. onpress = function(widget)
  261. widget:set_bg(theme.bg_focus)
  262. end,
  263. onrelease = function(widget)
  264. widget:set_bg(theme.bg_normal)
  265. end
  266. },
  267. popup = {
  268. shape = function(cr,width,height)
  269. return gears.shape.rounded_rect(cr,width,height,4)
  270. end,
  271. root_shape = function(cr,width,height)
  272. return gears.shape.rounded_rect(cr,width,height,6)
  273. end,
  274. },
  275. titlebar = {
  276. hidden_size = 2,
  277. root_shape = function(cr,width,height)
  278. return gears.shape.partially_rounded_rect(cr,width,height,
  279. true,true,false,false,6) end,
  280. root_bg_focus = theme.titlebar_bg_focus,
  281. root_bg_normal = theme.titlebar_bg_normal,
  282. top = 2,
  283. bottom = 2,
  284. left = 3,
  285. right = 3
  286. },
  287. wibar = {
  288. shape = function(cr,width,height)
  289. return gears.shape.rounded_rect(cr,width,height,0)
  290. end,
  291. height = wibar_height,
  292. width = wibar_width+6,
  293. margins = 3,
  294. stretch = true
  295. },
  296. slider = {
  297. shape = function(cr,width,height)
  298. return gears.shape.rounded_rect(cr,width,height,0)
  299. end,
  300. height = 20,
  301. width = 140,
  302. bg_focus = theme.bg_normal,
  303. bg_normal = theme.bg_focus,
  304. handle_width = 8,
  305. handle_border_color = theme.bg_normal,
  306. handle_border_width = 2,
  307. bar_height = 6,
  308. bar_border_color = theme.bg_focus,
  309. bar_border_width = 2
  310. },
  311. checkbox = {
  312. width = 15,
  313. height = 15,
  314. shape = gears.shape.circle,
  315. border_width = 1,
  316. border_color = theme.bg_normal,
  317. paddings = 2
  318. },
  319. icon = {
  320. width = 25,
  321. height = 25
  322. }
  323. },
  324. -- }}}
  325. -- {{{ Menus
  326. generic_menu = {
  327. base = {
  328. spacing = 2,
  329. menu_slide = true
  330. },
  331. button = {
  332. bg_normal = theme.bg_highlight,
  333. onpress = function(widget)
  334. widget:set_bg(theme.bg_focus)
  335. end,
  336. onrelease = function(widget)
  337. widget:set_bg(theme.bg_highlight)
  338. end,
  339. forced_height = 20,
  340. forced_width = 160
  341. },
  342. },
  343. -- }}}
  344. -- {{{ Popup activating icons
  345. generic_iconified_widget = {
  346. button = {
  347. margins = 1,
  348. bg_normal = "#00000000",
  349. onpress = function(widget)
  350. widget:set_bg(theme.bg_normal)
  351. end,
  352. onrelease = function(widget)
  353. widget:set_bg("#00000000")
  354. end
  355. }
  356. },
  357. -- }}}
  358. -- {{{ Bars/Panels/Menu popups
  359. generic_composite_widget = {
  360. base = {
  361. spacing = 2
  362. }
  363. },
  364. -- }}}
  365. -- {{{ Status panel widgets
  366. generic_status_widget = {
  367. container = {
  368. margins = 2,
  369. bg_normal = "#00000000",
  370. },
  371. button = {
  372. margins = 1,
  373. bg_normal = "#00000000",
  374. onpress = function() end,
  375. onrelease = function() end,
  376. }
  377. },
  378. -- }}}
  379. -- {{{ Various button lists
  380. generic_button_list = {
  381. button = {
  382. bg_normal = theme.bg_highlight,
  383. onpress = function(widget)
  384. widget:set_bg(theme.bg_focus)
  385. end,
  386. onrelease = function(widget)
  387. widget:set_bg(theme.bg_highlight)
  388. end,
  389. forced_width = 20,
  390. forced_height = 20
  391. },
  392. base = {
  393. spacing = 2
  394. }
  395. },
  396. -- }}}
  397. -- {{{ All widgets that fit into a single line
  398. generic_oneline_widget = {
  399. container = {
  400. bgimage_normal = theme.bgimage_inset
  401. },
  402. button = {
  403. margins = 2,
  404. onpress = function(widget)
  405. widget:set_bg(theme.bg_normal)
  406. end,
  407. onrelease = function(widget)
  408. widget:set_bg("#00000000")
  409. end,
  410. bg_normal = "#00000000"
  411. }
  412. },
  413. -- }}}
  414. -- {{{ All kinds of widget popups
  415. generic_popup = {
  416. button = {
  417. width = 180,
  418. height = 40
  419. },
  420. article = {
  421. icon_size = 30
  422. },
  423. icon = {
  424. height = 60,
  425. width = 100
  426. }
  427. },
  428. -- }}}
  429. soundclown = {
  430. --[[ --Uncomment to leetify that MPC
  431. container = {
  432. bg_normal = "#0c0c0c",
  433. fg_normal = "#00FF00"
  434. },
  435. ]]
  436. base = {
  437. width = 140
  438. },
  439. },
  440. subpanel = {
  441. container = {
  442. bgimage_normal = theme.bgimage_inset,
  443. bg_normal = theme.bar_bg_inverted_normal,
  444. margins = 0,
  445. shape = function(cr,width,height)
  446. return gears.shape.rounded_rect(cr,width,height,8)
  447. end
  448. }
  449. },
  450. taglist = {
  451. base = {
  452. spacing = 2,
  453. layout = require("wibox").layout.flex.horizontal
  454. },
  455. button = {
  456. bgimage_focus = theme.bgimage_inset,
  457. bgimage_normal = theme.bgimage_outset,
  458. },
  459. container = {
  460. margins = 3
  461. }
  462. },
  463. tasklist = {
  464. icon = {
  465. margins = 2
  466. },
  467. button = {
  468. width = 160,
  469. height = wibar_width-4,
  470. margins = 4,
  471. shape_focus = theme.button_shape,
  472. shape_normal = theme.button_shape,
  473. shape_urgent = theme.button_shape,
  474. shape_minimize = theme.button_shape,
  475. shape_border_width_normal = dpi(1),
  476. shape_border_width_focus = dpi(1),
  477. shape_border_width_urgent = dpi(1),
  478. shape_border_width_minimize = dpi(1),
  479. bg_normal = theme.horizontal_button_bg_normal,
  480. bg_focus = theme.horizontal_button_bg_focus,
  481. bg_urgent = theme.bg_urgent,
  482. bg_minimize = theme.bg_minimize,
  483. shape_border_color_normal = theme.horizontal_button_border_bg,
  484. shape_border_color_focus = theme.horizontal_button_border_bg,
  485. shape_border_color_minimize = theme.horizontal_button_border_bg,
  486. shape_border_color_urgent = theme.horizontal_button_border_bg,
  487. vertical = {
  488. margins = 2,
  489. shape_border_width_normal = dpi(1),
  490. shape_border_width_focus = dpi(1),
  491. shape_border_width_urgent = dpi(1),
  492. shape_border_width_minimize = dpi(1),
  493. bg_normal = theme.button_bg_normal,
  494. bg_focus = theme.button_bg_focus,
  495. bg_urgent = theme.bg_urgent,
  496. bg_minimize = theme.bg_minimize,
  497. shape_border_color_normal = theme.bar_border_color,
  498. shape_border_color_focus = theme.bar_border_color,
  499. shape_border_color_urgent = theme.bar_border_color,
  500. shape_border_color_minimize = theme.bar_border_color
  501. }
  502. }
  503. },
  504. launcher = {
  505. icon = {
  506. width = wibar_width,
  507. height = wibar_width,
  508. margins = 2
  509. },
  510. button = {
  511. forced_height = wibar_width,
  512. forced_width = wibar_width,
  513. margins = 2,
  514. bg_normal = theme.horizontal_button_bg_normal,
  515. bg_focus = theme.horizontal_button_bg_focus,
  516. shape_border_width = dpi(1),
  517. shape_border_color = theme.horizontal_button_border_bg,
  518. vertical = {
  519. margins = 1,
  520. bg_normal = theme.button_bg_normal,
  521. bg_focus = theme.button_bg_focus,
  522. shape_border_width = dpi(1),
  523. shape_border_color = theme.bar_border_color,
  524. onpress = function(widget)
  525. widget:set_bg(theme.button_bg_focus)
  526. end,
  527. onrelease = function(widget)
  528. widget:set_bg(theme.button_bg_normal)
  529. end
  530. },
  531. onpress = function(widget)
  532. widget:set_bg(theme.horizontal_button_bg_focus)
  533. end,
  534. onrelease = function(widget)
  535. widget:set_bg(theme.horizontal_button_bg_normal)
  536. end
  537. }
  538. },
  539. lockscreen = {
  540. popup = {
  541. margins = 0
  542. },
  543. icon = {
  544. width = 150,
  545. height = 150
  546. }
  547. },
  548. lockbar = {
  549. base = {
  550. height = 22
  551. }
  552. },
  553. lockpanel = {
  554. base = {
  555. icon_height = 60,
  556. icon_width = 60,
  557. panel_height = 300,
  558. panel_width = 200,
  559. panel_bgimage = theme.bgimage_outset
  560. },
  561. container = {
  562. shape = function(cr,width,height)
  563. return gears.shape.rounded_rect(cr,width,height,8)
  564. end,
  565. shape_border_color = theme.bg_highlight,
  566. shape_border_width = dpi(2)
  567. }
  568. },
  569. systray = {
  570. container = {
  571. margins = 2,
  572. shape = function(cr,width,height)
  573. return gears.shape.rounded_rect(cr,width,height,4)
  574. end,
  575. shape_border_color = theme.bg_normal,
  576. shape_border_width = dpi(2)
  577. }
  578. },
  579. lock_clock = {
  580. textbox = {
  581. font = "Ubuntu Mono 20"
  582. }
  583. },
  584. supermenu = {
  585. popup = {
  586. shape = function(cr,width,height)
  587. return gears.shape.rounded_rect(cr,width,height,0)
  588. end,
  589. root_shape = function(cr,width,height)
  590. return gears.shape.rounded_rect(cr,width,height,0)
  591. end,
  592. margins = 0,
  593. transparent = true
  594. },
  595. icon = {
  596. height = 48,
  597. width = 48
  598. }
  599. },
  600. applications_tab = {
  601. icon = {
  602. height = 48,
  603. width = 48
  604. }
  605. },
  606. titlebar = {
  607. titlebar_top = {
  608. onfocus = function(titlebar)
  609. local root = titlebar:get_children_by_id("titlebar_root")[1]
  610. root:set_bg(theme.titlebar_bg_focus)
  611. root:set_shape(function(cr,width,height)
  612. return gears.shape.partially_rounded_rect(
  613. cr,width,height,
  614. true,true,false,false,6) end)
  615. end,
  616. onunfocus = function(titlebar)
  617. local root = titlebar:get_children_by_id("titlebar_root")[1]
  618. root:set_bg(theme.titlebar_bg_normal)
  619. root:set_shape(function(cr,width,height)
  620. return gears.shape.partially_rounded_rect(
  621. cr,width,height,
  622. true,true,false,false,6) end)
  623. end,
  624. bg_focus = "#00000000",
  625. bg_normal = "#00000000",
  626. fg_focus = "#FAFAFA",
  627. fg_normal = theme.fg_normal,
  628. size = 22,
  629. spacing = 1
  630. },
  631. titlebar_left = {
  632. size = 2,
  633. bg_focus = "#3C3B37",
  634. bg_normal = "#3C3B37",
  635. },
  636. titlebar_right = {
  637. size = 2,
  638. bg_focus = "#3C3B37",
  639. bg_normal = "#3C3B37",
  640. },
  641. titlebar_bottom = {
  642. size = 2,
  643. bg_focus = "#3C3B37",
  644. bg_normal = "#3C3B37",
  645. }
  646. },
  647. wibar = {
  648. wibar_top = {
  649. bg_normal = theme.bar_bg_normal,
  650. fg_normal = theme.fg_normal,
  651. height = 28,
  652. },
  653. wibar_left = {
  654. bg_normal = "#0D0D0966",
  655. border_width = dpi(1),
  656. border_color = "#26262666"
  657. },
  658. wibar_bottom = {
  659. bg_normal = theme.bar_bg_normal,
  660. fg_normal = theme.fg_normal,
  661. height = 28,
  662. margins = 0
  663. },
  664. wibar_right = {
  665. bg_normal = "#0D0D0966",
  666. border_width = dpi(1),
  667. border_color = "#26262666"
  668. }
  669. }
  670. }
  671. local wibox = require("wibox")
  672. theme.templates = {
  673. templates = {
  674. titlebar = function(style)
  675. return function(layout,options)
  676. local margins = style.titlebar.margins
  677. if (style.titlebar.left or
  678. style.titlebar.right or
  679. style.titlebar.bottom or
  680. style.titlebar.top) then
  681. margins = nil
  682. end
  683. return {
  684. {
  685. gears.table.join({
  686. layout,
  687. margins = margins,
  688. layout = wibox.container.margin,
  689. left = style.titlebar.left,
  690. right = style.titlebar.right,
  691. bottom = style.titlebar.bottom,
  692. top = style.titlebar.top
  693. },options or {}),
  694. bgimage = style.titlebar.root_bgimage_normal,
  695. bg = style.titlebar.root_bg_normal,
  696. fg = style.titlebar.root_fg_normal,
  697. shape = style.titlebar.root_shape,
  698. shape_border_color = style.titlebar.root_shape_border_color,
  699. shape_border_width = style.titlebar.root_shape_border_width,
  700. widget = wibox.container.background,
  701. id = "titlebar_root"
  702. },
  703. layout = wibox.container.margin,
  704. left = style.titlebar.root_margin_left,
  705. right = style.titlebar.root_margin_right,
  706. top = style.titlebar.root_margin_top,
  707. bottom = style.titlebar.root_margin_bottom
  708. }
  709. end
  710. end,
  711. popup = function(style)
  712. return function(widget,options)
  713. return gears.table.join({
  714. widget = {
  715. {
  716. widget,
  717. margins = style.popup.margins,
  718. layout = wibox.container.margin
  719. },
  720. bg = style.popup.bg_normal,
  721. shape = style.popup.root_shape,
  722. widget = wibox.container.background
  723. },
  724. bg = "#00000000",
  725. shape = style.popup.shape,
  726. visible = false,
  727. ontop = true
  728. },options or {})
  729. end
  730. end,
  731. }
  732. }
  733. return theme
  734. -- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80