Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -----------------------------------
- -- GTK colors awesome theme v084 --
- -----------------------------------
- local theme_assets = require("beautiful.theme_assets")
- local xresources = require("beautiful.xresources")
- local gears = require("gears")
- local awful = require("awful")
- local dpi = xresources.apply_dpi
- local gtk = require("beautiful.gtk")
- local themes_path = config_dir .. "themes/gtk3"
- local theme_gtk = gtk.get_theme_variables()
- local theme = {}
- local function shadecolor(col1, col2, adj)
- r1 = tonumber(string.sub(col1,2,3),16)
- g1 = tonumber(string.sub(col1,4,5),16)
- b1 = tonumber(string.sub(col1,6,7),16)
- r2 = tonumber(string.sub(col2,2,3),16)
- g2 = tonumber(string.sub(col2,4,5),16)
- b2 = tonumber(string.sub(col2,6,7),16)
- shade_r = math.ceil((r1+r2)/adj) if shade_r > 255 then shade_r = 255 end
- shade_g = math.ceil((g1+g2)/adj) if shade_g > 255 then shade_g = 255 end
- shade_b = math.ceil((b1+b2)/adj) if shade_b > 255 then shade_b = 255 end
- return "#" .. tostring(string.format("%x",shade_r))..tostring(string.format("%x",shade_g))..tostring(string.format("%x",shade_b))
- end
- theme.base_size = math.ceil(theme_gtk.font_size)
- theme.gap_single_client = true
- -- font
- theme.font_name = theme_gtk.font_family
- theme.font = theme_gtk.font_family .. " " .. theme.base_size
- theme.notification_font = theme_gtk.font_family .. " " .. theme.base_size+4
- -- geometry
- theme.systray_icon_spacing = dpi(5)
- --theme.notification_shape = function(cr, width, height) gears.shape.rounded_rect(cr, width, height, 6) end
- theme.border_width = 0 --dpi(theme_gtk.button_border_width)
- theme.radius = dpi(theme_gtk.button_border_radius * 2 + 1)
- theme.notification_shape = function(cr, width, height) gears.shape.partially_rounded_rect(cr, width, height, true, true, false, true, theme.radius-1 ) end
- theme.menu_height = dpi(theme.base_size+14)
- theme.menu_width = dpi(theme.base_size*16)
- theme.useless_gap = dpi(theme.menu_height+8)
- -- Light/Dark test
- if tonumber(string.sub(theme_gtk.base_color, 2, 7),16) < 10000000 then -- dark theme
- theme.fg_normal = shadecolor(theme_gtk.fg_color,theme_gtk.wm_border_focused_color,2.9)
- theme.fg_focus = shadecolor(theme_gtk.fg_color,theme_gtk.wm_border_focused_color,2.1)
- theme.titlebar_fg_focus = shadecolor(theme_gtk.button_fg_color,theme_gtk.wm_border_focused_color,2.1)
- theme.menu_fg_focus = shadecolor(theme_gtk.bg_color,theme_gtk.wm_border_focused_color,4)
- theme.border_focus = shadecolor(theme_gtk.wm_border_focused_color,"#888888",2)
- theme.taglist_fg_focus = shadecolor(theme_gtk.header_button_fg_color,theme_gtk.wm_border_focused_color,3)
- theme.tasklist_fg_focus = shadecolor(theme_gtk.header_button_fg_color,theme_gtk.wm_border_focused_color,3)
- theme.tasklist_shape_border_color_focus = shadecolor(theme_gtk.header_button_border_color,theme_gtk.wm_border_focused_color,3)
- theme.layout_fairh = themes_path.."/layouts/fairhw.png"
- theme.layout_fairv = themes_path.."/layouts/fairvw.png"
- theme.layout_floating = themes_path.."/layouts/floatingw.png"
- theme.layout_magnifier = themes_path.."/layouts/magnifierw.png"
- theme.layout_max = themes_path.."/layouts/maxw.png"
- theme.layout_fullscreen = themes_path.."/layouts/fullscreenw.png"
- theme.layout_tilebottom = themes_path.."/layouts/tilebottomw.png"
- theme.layout_tileleft = themes_path.."/layouts/tileleftw.png"
- theme.layout_tile = themes_path.."/layouts/tilew.png"
- theme.layout_tiletop = themes_path.."/layouts/tiletopw.png"
- theme.layout_spiral = themes_path.."/layouts/spiralw.png"
- theme.layout_dwindle = themes_path.."/layouts/dwindlew.png"
- theme.layout_cornernw = themes_path.."/layouts/cornernww.png"
- theme.layout_cornerne = themes_path.."/layouts/cornernew.png"
- theme.layout_cornersw = themes_path.."/layouts/cornersww.png"
- theme.layout_cornerse = themes_path.."/layouts/cornersew.png"
- theme.titlebar_ontop_button_normal_inactive = themes_path.."/titlebar/ontop_normal_inactive.png"
- theme.titlebar_ontop_button_focus_inactive = themes_path.."/titlebar/ontop_focus_inactive.png"
- theme.titlebar_ontop_button_normal_active = themes_path.."/titlebar/ontop_normal_active.png"
- theme.titlebar_ontop_button_focus_active = themes_path.."/titlebar/ontop_focus_active.png"
- theme.titlebar_floating_button_normal_inactive = themes_path.."/titlebar/floating_normal_inactive.png"
- theme.titlebar_floating_button_focus_inactive = themes_path.."/titlebar/floating_focus_inactive.png"
- theme.titlebar_floating_button_normal_active = themes_path.."/titlebar/floating_normal_active.png"
- theme.titlebar_floating_button_focus_active = themes_path.."/titlebar/floating_focus_active.png"
- theme.titlebar_sticky_button_normal_inactive = themes_path.."/titlebar/sticky_normal_inactive.png"
- theme.titlebar_sticky_button_focus_inactive = themes_path.."/titlebar/sticky_focus_inactive.png"
- theme.titlebar_sticky_button_normal_active = themes_path.."/titlebar/sticky_normal_active.png"
- theme.titlebar_sticky_button_focus_active = themes_path.."/titlebar/sticky_focus_active.png"
- theme.titlebar_maximized_button_normal_inactive = themes_path.."/titlebar/maximized_normal_inactive.png"
- theme.titlebar_maximized_button_normal_inactive_hover = themes_path.."/titlebar/maximized_normal_inactive.png"
- theme.titlebar_maximized_button_normal_inactive_press = themes_path.."/titlebar/maximized_normal_inactive.png"
- theme.titlebar_maximized_button_focus_inactive = themes_path.."/titlebar/maximized_focus_inactive.png"
- theme.titlebar_maximized_button_focus_inactive_hover = themes_path.."/titlebar/maximized_focus_inactive.png"
- theme.titlebar_maximized_button_focus_inactive_press = themes_path.."/titlebar/maximized_focus_inactive.png"
- theme.titlebar_maximized_button_normal_active = themes_path.."/titlebar/maximized_normal_active.png"
- theme.titlebar_maximized_button_normal_active_hover = themes_path.."/titlebar/maximized_normal_active.png"
- theme.titlebar_maximized_button_normal_active_press = themes_path.."/titlebar/maximized_normal_active.png"
- theme.titlebar_maximized_button_focus_active = themes_path.."/titlebar/maximized_focus_active.png"
- theme.titlebar_maximized_button_focus_active_hover = themes_path.."/titlebar/maximized_focus_active.png"
- theme.titlebar_maximized_button_focus_active_press = themes_path.."/titlebar/maximized_focus_active.png"
- theme.titlebar_minimize_button_normal_inactive = themes_path.."/titlebar/minimize_normal.png"
- theme.titlebar_minimize_button_focus_inactive = themes_path.."/titlebar/minimize_focus.png"
- theme.titlebar_minimize_button_normal_active = themes_path.."/titlebar/minimize_normal.png"
- theme.titlebar_minimize_button_focus_active = themes_path.."/titlebar/minimize_focus.png"
- theme.titlebar_minimize_button_normal_hover = themes_path.."/titlebar/minimize_normal.png"
- theme.titlebar_minimize_button_focus_hover = themes_path.."/titlebar/minimize_focus.png"
- theme.titlebar_minimize_button_normal_press = themes_path.."/titlebar/minimize_focus.png"
- theme.titlebar_minimize_button_focus_press = themes_path.."/titlebar/minimize_focus.png"
- theme.titlebar_close_button_normal_inactive = themes_path.."/titlebar/close_normal.png"
- theme.titlebar_close_button_focus_inactive = themes_path.."/titlebar/close_normal.png"
- theme.titlebar_close_button_normal_active = themes_path.."/titlebar/close_normal.png"
- theme.titlebar_close_button_focus_active = themes_path.."/titlebar/close_normal.png"
- theme.titlebar_close_button_normal_hover = themes_path.."/titlebar/close_focus.png"
- theme.titlebar_close_button_focus_hover = themes_path.."/titlebar/close_focus.png"
- theme.titlebar_close_button_normal_press = themes_path.."/titlebar/close_focus.png"
- theme.titlebar_close_button_focus_press = themes_path.."/titlebar/close_focus.png"
- theme.net_en_off = config_dir .. "/net_icons/dark/network-unavailable-symbolic.png"
- theme.net_en_on = config_dir .. "/net_icons/dark/network-wired-symbolic.png"
- theme.net_wl = config_dir .. "/net_icons/dark/network-wireless-signal-excellent-symbolic.png"
- theme.net_wl_off = config_dir .. "/net_icons/dark/network-wireless-signal-none-symbolic.png"
- theme.net_wl_none = config_dir .. "/net_icons/dark/network-wireless-signal-none-symbolic.png"
- theme.net_wl_low = config_dir .. "/net_icons/dark/network-wireless-signal-weak-symbolic.png"
- theme.net_wl_ok = config_dir .. "/net_icons/dark/network-wireless-signal-ok-symbolic.png"
- theme.net_wl_good = config_dir .. "/net_icons/dark/network-wireless-signal-good-symbolic.png"
- theme.net_wl_full = config_dir .. "/net_icons/dark/network-wireless-signal-excellent-symbolic.png"
- theme.awesome_icon = theme_assets.awesome_icon(
- theme.menu_height, theme_gtk.header_button_bg_color, theme.border_focus
- )
- theme.awesome_icon_hover = theme_assets.awesome_icon(
- theme.menu_height, theme.bg_focus, theme.border_focus
- )
- theme.apps_icon = themes_path .. "/icons/drawer-dark.png"
- else -- light theme
- theme.fg_focus = shadecolor(theme_gtk.button_fg_color,theme_gtk.wm_border_focused_color,1)
- theme.titlebar_fg_focus = shadecolor(theme_gtk.header_button_fg_color,theme_gtk.wm_border_focused_color,2)
- theme.menu_fg_focus = shadecolor(theme_gtk.header_button_fg_color,theme_gtk.wm_border_focused_color,1)
- theme.border_focus = shadecolor(theme_gtk.wm_border_focused_color,"#111111",2)
- theme.taglist_fg_focus = shadecolor(theme_gtk.header_button_fg_color,theme_gtk.wm_border_focused_color,2)
- theme.fg_normal = shadecolor(theme_gtk.fg_color,theme_gtk.wm_border_focused_color,2)
- theme.tasklist_fg_focus = shadecolor(theme_gtk.header_button_fg_color,theme_gtk.wm_border_focused_color,2)
- theme.tasklist_shape_border_color_focus = shadecolor(theme_gtk.header_button_border_color,theme_gtk.wm_border_focused_color,2)
- theme.layout_fairh = themes_path.."/layouts/fairh.png"
- theme.layout_fairv = themes_path.."/layouts/fairv.png"
- theme.layout_floating = themes_path.."/layouts/floating.png"
- theme.layout_magnifier = themes_path.."/layouts/magnifier.png"
- theme.layout_max = themes_path.."/layouts/max.png"
- theme.layout_fullscreen = themes_path.."/layouts/fullscreen.png"
- theme.layout_tilebottom = themes_path.."/layouts/tilebottom.png"
- theme.layout_tileleft = themes_path.."/layouts/tileleft.png"
- theme.layout_tile = themes_path.."/layouts/tile.png"
- theme.layout_tiletop = themes_path.."/layouts/tiletop.png"
- theme.layout_spiral = themes_path.."/layouts/spiral.png"
- theme.layout_dwindle = themes_path.."/layouts/dwindle.png"
- theme.layout_cornernw = themes_path.."/layouts/cornernw.png"
- theme.layout_cornerne = themes_path.."/layouts/cornerne.png"
- theme.layout_cornersw = themes_path.."/layouts/cornersw.png"
- theme.layout_cornerse = themes_path.."/layouts/cornerse.png"
- theme.titlebar_ontop_button_normal_inactive = themes_path.."/titlebar/ontop_focus_inactive.png"
- theme.titlebar_ontop_button_focus_inactive = themes_path.."/titlebar/ontop_normal_inactive.png"
- theme.titlebar_ontop_button_normal_active = themes_path.."/titlebar/ontop_focus_active.png"
- theme.titlebar_ontop_button_focus_active = themes_path.."/titlebar/ontop_normal_active.png"
- theme.titlebar_floating_button_normal_inactive = themes_path.."/titlebar/floating_focus_inactive.png"
- theme.titlebar_floating_button_focus_inactive = themes_path.."/titlebar/floating_normal_inactive.png"
- theme.titlebar_floating_button_normal_active = themes_path.."/titlebar/floating_focus_active.png"
- theme.titlebar_floating_button_focus_active = themes_path.."/titlebar/floating_normal_active.png"
- theme.titlebar_sticky_button_normal_inactive = themes_path.."/titlebar/sticky_focus_inactive.png"
- theme.titlebar_sticky_button_focus_inactive = themes_path.."/titlebar/sticky_normal_inactive.png"
- theme.titlebar_sticky_button_normal_active = themes_path.."/titlebar/sticky_focus_active.png"
- theme.titlebar_sticky_button_focus_active = themes_path.."/titlebar/sticky_normal_active.png"
- theme.titlebar_maximized_button_normal_inactive = themes_path.."/titlebar/maximized_focus_inactive.png"
- theme.titlebar_maximized_button_normal_inactive_hover = themes_path.."/titlebar/maximized_focus_inactive.png"
- theme.titlebar_maximized_button_normal_inactive_press = themes_path.."/titlebar/maximized_focus_inactive.png"
- theme.titlebar_maximized_button_focus_inactive = themes_path.."/titlebar/maximized_normal_inactive.png"
- theme.titlebar_maximized_button_focus_inactive_hover = themes_path.."/titlebar/maximized_normal_inactive.png"
- theme.titlebar_maximized_button_focus_inactive_press = themes_path.."/titlebar/maximized_normal_inactive.png"
- theme.titlebar_maximized_button_normal_active = themes_path.."/titlebar/maximized_focus_active.png"
- theme.titlebar_maximized_button_normal_active_hover = themes_path.."/titlebar/maximized_focus_active.png"
- theme.titlebar_maximized_button_normal_active_press = themes_path.."/titlebar/maximized_focus_active.png"
- theme.titlebar_maximized_button_focus_active = themes_path.."/titlebar/maximized_normal_active.png"
- theme.titlebar_maximized_button_focus_active_hover = themes_path.."/titlebar/maximized_normal_active.png"
- theme.titlebar_maximized_button_focus_active_press = themes_path.."/titlebar/maximized_normal_active.png"
- theme.titlebar_minimize_button_normal_inactive = themes_path.."/titlebar/minimize_focus.png"
- theme.titlebar_minimize_button_focus_inactive = themes_path.."/titlebar/minimize_normal.png"
- theme.titlebar_minimize_button_normal_active = themes_path.."/titlebar/minimize_focus.png"
- theme.titlebar_minimize_button_focus_active = themes_path.."/titlebar/minimize_normal.png"
- theme.titlebar_minimize_button_normal_hover = themes_path.."/titlebar/minimize_focus.png"
- theme.titlebar_minimize_button_focus_hover = themes_path.."/titlebar/minimize_normal.png"
- theme.titlebar_minimize_button_normal_press = themes_path.."/titlebar/minimize_focus.png"
- theme.titlebar_minimize_button_focus_press = themes_path.."/titlebar/minimize_normal.png"
- theme.titlebar_close_button_normal_inactive = themes_path.."/titlebar/close_focus.png"
- theme.titlebar_close_button_focus_inactive = themes_path.."/titlebar/close_focus.png"
- theme.titlebar_close_button_normal_active = themes_path.."/titlebar/close_focus.png"
- theme.titlebar_close_button_focus_active = themes_path.."/titlebar/close_focus.png"
- theme.titlebar_close_button_normal_hover = themes_path.."/titlebar/close_normal.png"
- theme.titlebar_close_button_focus_hover = themes_path.."/titlebar/close_normal.png"
- theme.titlebar_close_button_normal_press = themes_path.."/titlebar/close_normal.png"
- theme.titlebar_close_button_focus_press = themes_path.."/titlebar/close_normal.png"
- theme.net_en_off = config_dir .. "/net_icons/light/network-unavailable-symbolic.png"
- theme.net_en_on = config_dir .. "/net_icons/light/network-wired-symbolic.png"
- theme.net_wl = config_dir .. "/net_icons/light/network-wireless-signal-excellent-symbolic.png"
- theme.net_wl_off = config_dir .. "/net_icons/light/network-wireless-signal-none-symbolic.png"
- theme.net_wl_none = config_dir .. "/net_icons/light/network-wireless-signal-none-symbolic.png"
- theme.net_wl_low = config_dir .. "/net_icons/light/network-wireless-signal-weak-symbolic.png"
- theme.net_wl_ok = config_dir .. "/net_icons/light/network-wireless-signal-ok-symbolic.png"
- theme.net_wl_good = config_dir .. "/net_icons/light/network-wireless-signal-good-symbolic.png"
- theme.net_wl_full = config_dir .. "/net_icons/light/network-wireless-signal-excellent-symbolic.png"
- theme.awesome_icon = theme_assets.awesome_icon(
- theme.menu_height, theme.border_focus, theme.menu_fg_focus--theme_gtk.header_button_fg_color
- )
- theme.awesome_icon_hover = theme_assets.awesome_icon(
- theme.menu_height, theme.border_focus, theme.bg_focus
- )
- theme.apps_icon = themes_path .. "/icons/drawer-light.png"
- end
- -- "menu_mod"
- theme.menu_shape = function(cr, width, height) gears.shape.rounded_rect(cr, width, height, theme.radius-1) end
- theme.menu_border_width = 2
- theme.menu_border_color = theme.border_focus
- theme.bg_normal = theme_gtk.base_color
- theme.bg_focus = theme_gtk.button_bg_color
- theme.bg_urgent = theme_gtk.warning_bg_color
- theme.bg_minimize = theme_gtk.base_color
- theme.bg_systray = theme.bg_normal
- theme.fg_urgent = theme_gtk.warning_fg_color
- theme.fg_minimize = theme.fg_color
- theme.titlebar_bg_focus = string.sub(theme_gtk.header_button_bg_color,1,7)
- theme.border_normal = theme_gtk.wm_border_unfocused_color
- theme.border_marked = theme_gtk.osd_border_color
- theme.taglist_bg_focus = theme.bg_normal --theme_gtk.header_button_bg_color
- theme.taglist_bg_urgent = theme.taglist_bg_focus -- common urgent bg
- theme.tooltip_bg = theme_gtk.tooltip_bg_color
- theme.tooltip_fg = theme_gtk.tooltip_fg_color
- theme.tasklist_bg_focus = theme_gtk.header_button_bg_color
- theme.tasklist_shape_border_color = theme_gtk.header_button_bg_color
- theme.notification_bg = theme_gtk.osd_bg_color
- theme.notification_fg = theme_gtk.osd_fg_color
- theme.notification_border_color = theme_gtk.osd_border_color
- theme.menu_bg_focus = theme.border_focus
- -- Generate taglist squares:
- --local taglist_square_size = dpi(25)
- --theme.taglist_squares_sel = theme_assets.taglist_squares_sel(
- -- taglist_square_size, theme.border_normal
- --)
- --theme.taglist_squares_unsel = theme_assets.taglist_squares_unsel(
- -- taglist_square_size, theme.fg_normal
- --)
- -- Define the image to load
- theme.menu_submenu_icon = themes_path.."/submenu.png"
- --theme.wallpaper = themes_path.."/background.jpg"
- theme.wallpaper = function(screen)
- local wallpaper = config_dir .. "/wallpapers/" .. tostring(screen.index)
- gears.wallpaper.maximized(wallpaper, screen, false)
- end
- -- defaults for notifications
- theme.notification_icon_size = 100
- --theme.notification_[bg|fg] =
- theme.notification_border_width = 1
- theme.notification_border_color = theme.border_focus
- --theme.notification_opacity =
- --theme.notification_margin =
- --theme.notification_[width|height] =
- --theme.notification_max_width = 250
- theme.notification_max_height = 250
- -- for moc
- theme.icon_theme = "Moblin"
- return theme
- -- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement