awesome/themes/redmond98/theme.lua

265 lines
11 KiB
Lua

local theme_assets = require("beautiful.theme_assets")
local xresources = require("beautiful.xresources")
local dpi = xresources.apply_dpi
local gears = require("gears")
local wibox = require("wibox")
local gfs = require("gears.filesystem")
local themes_path = os.getenv("HOME").."/.config/awesome/themes/"
local theme_name = "redmond98"
local theme = {}
theme.font = "Ubuntu Regular 9"
theme.unitybar_width = dpi(55)
theme.tasklist_button_shape_border_width = dpi(1)
theme.tasklist_button_shape_border_color = "#262626AA"
theme.launcher_button_shape_border_width = dpi(1)
theme.launcher_button_shape_border_color = "#262626AA"
theme.launcher_button_size = 44
theme.tasklist_button_size = 44
theme.macbar_height = 45
theme.menu_button_inner_margin = 2
theme.bg_normal = "#c2c3c3"
theme.bg_focus = "#e2e3e3"
theme.bg_urgent = "#e2e3e3"
theme.bg_minimize = "#d2d3d3"
theme.bg_systray = theme.bg_normal
theme.fg_normal = "#121212"
theme.fg_focus = "#121212"
theme.fg_urgent = "#121212"
theme.fg_minimize = "#121212"
theme.useless_gap = dpi(10)
theme.border_width = dpi(1)
theme.border_normal = theme.bg_normal
theme.border_focus = theme.bg_focus
theme.border_marked = theme.bg_marked
-- There are other variable sets
-- overriding the default one when
-- defined, the sets are:
-- taglist_[bg|fg]_[focus|urgent|occupied|empty|volatile]
-- tasklist_[bg|fg]_[focus|urgent]
-- titlebar_[bg|fg]_[normal|focus]
-- tooltip_[font|opacity|fg_color|bg_color|border_width|border_color]
-- mouse_finder_[color|timeout|animate_timeout|radius|factor]
-- prompt_[fg|bg|fg_cursor|bg_cursor|font]
-- hotkeys_[bg|fg|border_width|border_color|shape|opacity|modifiers_fg|label_bg|label_fg|group_margin|font|description_font]
-- Example:
--theme.taglist_bg_focus = "#ff0000"
theme.hotkeys_border_color = "#262626"
theme.hotkeys_opacity = 0.2
theme.bgimage = function(context, cr, width, height)
local surface = gears.surface(
themes_path..theme_name.."/assets/redmond98borders.svg"
)
local bg_width,bg_height = gears.surface.get_size(surface)
cr:scale(width / bg_width, height / bg_height)
cr:set_source_surface(surface)
cr:paint()
end
theme.button_widget = function(style)
return {
{
id = "widget_container",
widget = wibox.container.margin,
margins = style.button_inner_margin,
},
bgimage = theme.bgimage,
id = "widget_background",
widget = wibox.container.background,
shape = style.button_shape,
shape_border_width = style.button_shape_border_width,
shape_border_color = style.button_shape_border_color,
fg = style.button_fg_normal
}
end
theme.icon_widget = function(style)
return {
{
id = "widget_container",
widget = wibox.container.margin,
margins = style.icon_inner_margin,
},
bgimage = theme.bgimage,
id = "widget_background",
widget = wibox.container.background,
shape = style.icon_shape,
shape_border_width = style.icon_shape_border_width,
shape_border_color = style.icon_shape_border_color,
fg = style.icon_fg_normal
}
end
theme.container_widget = function(style)
return {
{
id = "widget_container",
widget = wibox.container.margin,
margins = style.container_inner_margin,
},
bgimage = theme.bgimage,
id = "widget_background",
widget = wibox.container.background,
shape = style.container_shape,
shape_border_width = style.container_shape_border_width,
shape_border_color = style.container_shape_border_color,
fg = style.container_fg_normal
}
end
theme.inputbox_widget = function(style,prompt)
return {
{
{
id = "widget_prompt",
markup = prompt or "",
widget = wibox.widget.textbox,
fg = style.inputbox_fg_normal
},
id = "widget_container",
widget = wibox.container.margin,
margins = style.inputbox_inner_margin,
},
bgimage = theme.bgimage,
id = "widget_background",
widget = wibox.container.background,
shape = style.inputbox_shape,
shape_border_width = style.inputbox_shape_border_width,
shape_border_color = style.inputbox_shape_border_color
}
end
theme.titlebar_bg_focus = {
type = "linear",
from = { 0, 15 },
to = { 0, 0 },
stops = { { 0, "#3C3C3C"} , { 1 , "#424242"} }
}
theme.titlebar_bg_normal = {
type = "linear",
from = { 0, 15 },
to = { 0, 0 },
stops = { { 0, "#161617"} , { 1 , "#222223"} }
}
theme.topbar_bg = theme.titlebar_bg_normal
-- Generate taglist squares:
local taglist_square_size = dpi(4)
theme.taglist_squares_sel = theme_assets.taglist_squares_sel(
taglist_square_size, theme.fg_normal
)
theme.taglist_squares_unsel = theme_assets.taglist_squares_unsel(
taglist_square_size, theme.fg_normal
)
-- Variables set for theming notifications:
-- notification_font
-- not1ification_[bg|fg]
-- notification_[width|height|margin]
-- notification_[border_color|border_width|shape|opacity]
theme.notification_width = dpi(250)
theme.notification_height = dpi(80)
-- Variables set for theming the menu:
-- menu_[bg|fg]_[normal|focus]
-- menu_[border_color|border_width]
theme.menu_submenu_icon = themes_path..theme_name.."/submenu.png"
theme.menu_height = dpi(18)
theme.menu_width = dpi(140)
-- You can add as many variables as
-- you wish and access them by using
-- beautiful.variable in your rc.lua
--theme.bg_widget = "#cc0000"
-- Define the image to load
theme.titlebar_close_button_normal = themes_path..theme_name.."/titlebar/close_normal.png"
theme.titlebar_close_button_focus = themes_path..theme_name.."/titlebar/close_focus.png"
theme.titlebar_minimize_button_normal = themes_path..theme_name.."/titlebar/minimize_normal.png"
theme.titlebar_minimize_button_focus = themes_path..theme_name.."/titlebar/minimize_focus.png"
theme.titlebar_ontop_button_normal_inactive = themes_path..theme_name.."/titlebar/ontop_normal_inactive.png"
theme.titlebar_ontop_button_focus_inactive = themes_path..theme_name.."/titlebar/ontop_focus_inactive.png"
theme.titlebar_ontop_button_normal_active = themes_path..theme_name.."/titlebar/ontop_normal_active.png"
theme.titlebar_ontop_button_focus_active = themes_path..theme_name.."/titlebar/ontop_focus_active.png"
theme.titlebar_sticky_button_normal_inactive = themes_path..theme_name.."/titlebar/sticky_normal_inactive.png"
theme.titlebar_sticky_button_focus_inactive = themes_path..theme_name.."/titlebar/sticky_focus_inactive.png"
theme.titlebar_sticky_button_normal_active = themes_path..theme_name.."/titlebar/sticky_normal_active.png"
theme.titlebar_sticky_button_focus_active = themes_path..theme_name.."/titlebar/sticky_focus_active.png"
theme.titlebar_floating_button_normal_inactive = themes_path..theme_name.."/titlebar/floating_normal_inactive.png"
theme.titlebar_floating_button_focus_inactive = themes_path..theme_name.."/titlebar/floating_focus_inactive.png"
theme.titlebar_floating_button_normal_active = themes_path..theme_name.."/titlebar/floating_normal_active.png"
theme.titlebar_floating_button_focus_active = themes_path..theme_name.."/titlebar/floating_focus_active.png"
theme.titlebar_maximized_button_normal_inactive = themes_path..theme_name.."/titlebar/maximized_normal_inactive.png"
theme.titlebar_maximized_button_focus_inactive = themes_path..theme_name.."/titlebar/maximized_focus_inactive.png"
theme.titlebar_maximized_button_normal_active = themes_path..theme_name.."/titlebar/maximized_normal_active.png"
theme.titlebar_maximized_button_focus_active = themes_path..theme_name.."/titlebar/maximized_focus_active.png"
theme.wallpaper = themes_path..theme_name.."/background.png"
-- You can use your own layout icons like this:
theme.layout_fairh = themes_path..theme_name.."/layouts/fairhw.png"
theme.layout_fairv = themes_path..theme_name.."/layouts/fairvw.png"
theme.layout_floating = themes_path..theme_name.."/layouts/floatingw.png"
theme.layout_magnifier = themes_path..theme_name.."/layouts/magnifierw.png"
theme.layout_max = themes_path..theme_name.."/layouts/maxw.png"
theme.layout_fullscreen = themes_path..theme_name.."/layouts/fullscreenw.png"
theme.layout_tilebottom = themes_path..theme_name.."/layouts/tilebottomw.png"
theme.layout_tileleft = themes_path..theme_name.."/layouts/tileleftw.png"
theme.layout_tile = themes_path..theme_name.."/layouts/tilew.png"
theme.layout_tiletop = themes_path..theme_name.."/layouts/tiletopw.png"
theme.layout_spiral = themes_path..theme_name.."/layouts/spiralw.png"
theme.layout_dwindle = themes_path..theme_name.."/layouts/dwindlew.png"
theme.layout_cornernw = themes_path..theme_name.."/layouts/cornernww.png"
theme.layout_cornerne = themes_path..theme_name.."/layouts/cornernew.png"
theme.layout_cornersw = themes_path..theme_name.."/layouts/cornersww.png"
theme.layout_cornerse = themes_path..theme_name.."/layouts/cornersew.png"
-- Generate Awesome icon:
theme.awesome_icon = theme_assets.awesome_icon(
theme.menu_height, theme.bg_focus, theme.fg_focus
)
-- Define the icon theme for application icons. If not set then the icons
-- from /usr/share/icons and /usr/share/icons/hicolor will be used.
theme.icon_theme = "Adwaita"
-- Recolor icons
theme_assets.recolor_titlebar(theme,theme.fg_normal,"normal")
theme_assets.recolor_titlebar(theme,theme.fg_focus,"focus")
theme_assets.recolor_layout(theme,theme.fg_normal)
-- Powermenu icons
theme.powercontrol_icon_shutdown = themes_path..theme_name.."/icons/shutdown.svg"
theme.powercontrol_icon_suspend = themes_path..theme_name.."/icons/suspend.svg"
theme.powercontrol_icon_lock = themes_path..theme_name.."/icons/lock.svg"
-- Volume icons
theme.volume_icon_high = themes_path..theme_name.."/icons/volume-high.svg"
theme.volume_icon_medium = themes_path..theme_name.."/icons/volume-medium.svg"
theme.volume_icon_low = themes_path..theme_name.."/icons/volume-low.svg"
theme.volume_icon_muted = themes_path..theme_name.."/icons/volume-muted.svg"
-- Battery icons
theme.battery_caution_charging_symbolic = themes_path..theme_name.."/icons/battery-caution-charging-symbolic.svg"
theme.battery_caution_symbolic = themes_path..theme_name.."/icons/battery-caution-symbolic.svg"
theme.battery_empty_charging_symbolic = themes_path..theme_name.."/icons/battery-empty-charging-symbolic.svg"
theme.battery_empty_symbolic = themes_path..theme_name.."/icons/battery-empty-symbolic.svg"
theme.battery_full_charged_symbolic = themes_path..theme_name.."/icons/battery-full-charged-symbolic.svg"
theme.battery_full_charging_symbolic = themes_path..theme_name.."/icons/battery-full-charging-symbolic.svg"
theme.battery_full_symbolic = themes_path..theme_name.."/icons/battery-full-symbolic.svg"
theme.battery_good_charging_symbolic = themes_path..theme_name.."/icons/battery-good-charging-symbolic.svg"
theme.battery_good_symbolic = themes_path..theme_name.."/icons/battery-good-symbolic.svg"
theme.battery_low_charging_symbolic = themes_path..theme_name.."/icons/battery-low-charging-symbolic.svg"
theme.battery_low_symbolic = themes_path..theme_name.."/icons/battery-low-symbolic.svg"
theme.battery_missing_symbolic = themes_path..theme_name.."/icons/battery-missing-symbolic.svg"
return theme
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80