Advertisement
Guest User

theme.lua

a guest
Aug 12th, 2021
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 5.99 KB | None | 0 0
  1. ---------------------------
  2. -- Default awesome theme --
  3. ---------------------------
  4.  
  5. local theme_assets = require("beautiful.theme_assets")
  6. local xresources = require("beautiful.xresources")
  7. local dpi = xresources.apply_dpi
  8.  
  9. local gfs = require("gears.filesystem")
  10. local theme_path = string.format("%s/.config/awesome/themes/%s/theme.lua", os.getenv("HOME"), "material")
  11. beautiful.init(theme_path)
  12.  
  13. local theme = {}
  14.  
  15. theme.font          = "sans 8"
  16.  
  17. theme.bg_normal     = "#222222"
  18. theme.bg_focus      = "#535d6c"
  19. theme.bg_urgent     = "#ff0000"
  20. theme.bg_minimize   = "#444444"
  21. theme.bg_systray    = theme.bg_normal
  22.  
  23. theme.fg_normal     = "#aaaaaa"
  24. theme.fg_focus      = "#ffffff"
  25. theme.fg_urgent     = "#ffffff"
  26. theme.fg_minimize   = "#ffffff"
  27.  
  28. theme.useless_gap   = dpi(0)
  29. theme.border_width  = dpi(1)
  30. theme.border_normal = "#000000"
  31. theme.border_focus  = "#535d6c"
  32. theme.border_marked = "#91231c"
  33.  
  34. -- There are other variable sets
  35. -- overriding the default one when
  36. -- defined, the sets are:
  37. -- taglist_[bg|fg]_[focus|urgent|occupied|empty|volatile]
  38. -- tasklist_[bg|fg]_[focus|urgent]
  39. -- titlebar_[bg|fg]_[normal|focus]
  40. -- tooltip_[font|opacity|fg_color|bg_color|border_width|border_color]
  41. -- mouse_finder_[color|timeout|animate_timeout|radius|factor]
  42. -- prompt_[fg|bg|fg_cursor|bg_cursor|font]
  43. -- hotkeys_[bg|fg|border_width|border_color|shape|opacity|modifiers_fg|label_bg|label_fg|group_margin|font|description_font]
  44. -- Example:
  45. --theme.taglist_bg_focus = "#ff0000"
  46.  
  47. -- Generate taglist squares:
  48. local taglist_square_size = dpi(4)
  49. theme.taglist_squares_sel = theme_assets.taglist_squares_sel(
  50.     taglist_square_size, theme.fg_normal
  51. )
  52. theme.taglist_squares_unsel = theme_assets.taglist_squares_unsel(
  53.     taglist_square_size, theme.fg_normal
  54. )
  55.  
  56. -- Variables set for theming notifications:
  57. -- notification_font
  58. -- notification_[bg|fg]
  59. -- notification_[width|height|margin]
  60. -- notification_[border_color|border_width|shape|opacity]
  61.  
  62. -- Variables set for theming the menu:
  63. -- menu_[bg|fg]_[normal|focus]
  64. -- menu_[border_color|border_width]
  65. theme.menu_submenu_icon = themes_path.."material/submenu.png"
  66. theme.menu_height = dpi(15)
  67. theme.menu_width  = dpi(100)
  68.  
  69. -- You can add as many variables as
  70. -- you wish and access them by using
  71. -- beautiful.variable in your rc.lua
  72. --theme.bg_widget = "#cc0000"
  73.  
  74. -- Define the image to load
  75. theme.titlebar_close_button_normal = themes_path.."material/titlebar/close_normal.png"
  76. theme.titlebar_close_button_focus  = themes_path.."material/titlebar/close_focus.png"
  77.  
  78. theme.titlebar_minimize_button_normal = themes_path.."material/titlebar/minimize_normal.png"
  79. theme.titlebar_minimize_button_focus  = themes_path.."material/titlebar/minimize_focus.png"
  80.  
  81. theme.titlebar_ontop_button_normal_inactive = themes_path.."material/titlebar/ontop_normal_inactive.png"
  82. theme.titlebar_ontop_button_focus_inactive  = themes_path.."material/titlebar/ontop_focus_inactive.png"
  83. theme.titlebar_ontop_button_normal_active = themes_path.."material/titlebar/ontop_normal_active.png"
  84. theme.titlebar_ontop_button_focus_active  = themes_path.."material/titlebar/ontop_focus_active.png"
  85.  
  86. theme.titlebar_sticky_button_normal_inactive = themes_path.."material/titlebar/sticky_normal_inactive.png"
  87. theme.titlebar_sticky_button_focus_inactive  = themes_path.."material/titlebar/sticky_focus_inactive.png"
  88. theme.titlebar_sticky_button_normal_active = themes_path.."material/titlebar/sticky_normal_active.png"
  89. theme.titlebar_sticky_button_focus_active  = themes_path.."material/titlebar/sticky_focus_active.png"
  90.  
  91. theme.titlebar_floating_button_normal_inactive = themes_path.."material/titlebar/floating_normal_inactive.png"
  92. theme.titlebar_floating_button_focus_inactive  = themes_path.."material/titlebar/floating_focus_inactive.png"
  93. theme.titlebar_floating_button_normal_active = themes_path.."material/titlebar/floating_normal_active.png"
  94. theme.titlebar_floating_button_focus_active  = themes_path.."material/titlebar/floating_focus_active.png"
  95.  
  96. theme.titlebar_maximized_button_normal_inactive = themes_path.."material/titlebar/maximized_normal_inactive.png"
  97. theme.titlebar_maximized_button_focus_inactive  = themes_path.."material/titlebar/maximized_focus_inactive.png"
  98. theme.titlebar_maximized_button_normal_active = themes_path.."material/titlebar/maximized_normal_active.png"
  99. theme.titlebar_maximized_button_focus_active  = themes_path.."material/titlebar/maximized_focus_active.png"
  100.  
  101. theme.wallpaper = themes_path.."material/lovely_night.jpg"
  102.  
  103. -- You can use your own layout icons like this:
  104. theme.layout_fairh = themes_path.."material/layouts/fairhw.png"
  105. theme.layout_fairv = themes_path.."material/layouts/fairvw.png"
  106. theme.layout_floating  = themes_path.."material/layouts/floatingw.png"
  107. theme.layout_magnifier = themes_path.."material/layouts/magnifierw.png"
  108. theme.layout_max = themes_path.."material/layouts/maxw.png"
  109. theme.layout_fullscreen = themes_path.."material/layouts/fullscreenw.png"
  110. theme.layout_tilebottom = themes_path.."material/layouts/tilebottomw.png"
  111. theme.layout_tileleft   = themes_path.."material/layouts/tileleftw.png"
  112. theme.layout_tile = themes_path.."material/layouts/tilew.png"
  113. theme.layout_tiletop = themes_path.."material/layouts/tiletopw.png"
  114. theme.layout_spiral  = themes_path.."material/layouts/spiralw.png"
  115. theme.layout_dwindle = themes_path.."material/layouts/dwindlew.png"
  116. theme.layout_cornernw = themes_path.."material/layouts/cornernww.png"
  117. theme.layout_cornerne = themes_path.."material/layouts/cornernew.png"
  118. theme.layout_cornersw = themes_path.."material/layouts/cornersww.png"
  119. theme.layout_cornerse = themes_path.."material/layouts/cornersew.png"
  120.  
  121. -- Generate Awesome icon:
  122. theme.awesome_icon = theme_assets.awesome_icon(
  123.     theme.menu_height, theme.bg_focus, theme.fg_focus
  124. )
  125.  
  126. -- Define the icon theme for application icons. If not set then the icons
  127. -- from /usr/share/icons and /usr/share/icons/hicolor will be used.
  128. theme.icon_theme = nil
  129.  
  130. return theme
  131.  
  132. -- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
  133.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement