@ -154,9 +154,6 @@ theme.titlebar_maximized_button_focus_inactive = themes_path.."unity/titlebar/m
theme.titlebar_maximized_button_normal_active = themes_path .. " unity/titlebar/maximized_normal_active.png "
theme.titlebar_maximized_button_focus_active = themes_path .. " unity/titlebar/maximized_focus_active.png "
theme.wallpaper = themes_path .. " unity/background.png "
theme.wallpapers_icon = themes_path .. " unity/icons/wallpapers.png "
-- You can use your own layout icons like this:
theme.layout_fairh = themes_path .. " unity/layouts/fairhw.png "
theme.layout_fairv = themes_path .. " unity/layouts/fairvw.png "
@ -217,13 +214,40 @@ theme["mpc-next-symbolic"] = themes_path.."unity/icons/mpc-next-symbolic.png"
theme [ " action-poweroff-symbolic " ] = themes_path .. " unity/icons/action-poweroff-symbolic.png "
theme [ " action-lock-screen-symbolic " ] = themes_path .. " unity/icons/action-lock-screen-symbolic.png "
theme [ " action-suspend-symbolic " ] = themes_path .. " unity/icons/action-suspend-symbolic.png "
theme.wallpaper = themes_path .. " unity/background.png "
theme.wallpapers_icon = themes_path .. " unity/icons/wallpapers.png "
-- Default icon for clients
-- This one has to be baked as a surface to avoid memory leaks
theme.icon_default = themes_path .. " unity/icons/unknown-app.png "
for k , v in pairs ( {
" battery-caution-charging-symbolic " ,
" battery-empty-charging-symbolic " ,
" battery-full-charging-symbolic " ,
" battery-good-charging-symbolic " ,
" battery-low-charging-symbolic " ,
" battery-full-charged-symbolic " ,
" battery-missing-symbolic " ,
" ac-adapter-symbolic " ,
" backlight-symbolic " ,
" notifications-area-symbolic " ,
" mpc-previous-symbolic " ,
" mpc-play-symbolic " ,
" mpc-pause-symbolic " ,
" mpc-next-symbolic " ,
" action-poweroff-symbolic " ,
" action-lock-screen-symbolic " ,
" action-suspend-symbolic " ,
" wallpapers_icon " ,
" icon_default " } ) do
if theme [ v ] and gears.filesystem . file_readable ( theme [ v ] ) then
theme [ v ] = gears.color . recolor_image ( theme [ v ] , theme.fg_normal )
end
end
-- Notification popups settings
theme.notification_width = 240
theme.notification_height = 60
-- Default icon for clients
-- This one has to be baked as a surface to avoid memory leaks
theme.icon_default = gears.surface ( themes_path .. " unity/icons/unknown-app.png " )
theme.widgets = {
-- {{{ Widget base
@ -247,8 +271,16 @@ theme.widgets = {
shape = function ( cr , width , height )
return gears.shape . rounded_rect ( cr , width , height , 4 )
end ,
root_shape = function ( cr , width , height )
return gears.shape . rounded_rect ( cr , width , height , 6 )
end ,
} ,
titlebar = {
root_shape = function ( cr , width , height )
return gears.shape . partially_rounded_rect ( cr , width , height ,
true , true , false , false , 7 ) end ,
root_bg_focus = theme.titlebar_bg_focus ,
root_bg_normal = theme.titlebar_bg_normal ,
top = 2 ,
bottom = 2 ,
left = 3 ,
@ -298,7 +330,7 @@ theme.widgets = {
-- {{{ Popup activating icons
generic_iconified_widget = {
button = {
margins = 2 ,
margins = 1 ,
bg_normal = " #00000000 " ,
onpress = function ( widget )
widget : set_bg ( theme.bg_normal )
@ -323,7 +355,7 @@ theme.widgets = {
bg_normal = " #00000000 " ,
} ,
button = {
margins = 2 ,
margins = 1 ,
bg_normal = " #00000000 " ,
onpress = function ( ) end ,
onrelease = function ( ) end ,
@ -413,7 +445,8 @@ theme.widgets = {
tasklist = {
button = {
width = 160 ,
height = 50 ,
height = 44 ,
margins = 5 ,
shape_focus = theme.button_shape ,
shape_normal = theme.button_shape ,
shape_urgent = theme.button_shape ,
@ -490,8 +523,23 @@ theme.widgets = {
} ,
titlebar = {
titlebar_top = {
bg_focus = theme.titlebar_bg_focus ,
bg_normal = theme.titlebar_bg_normal ,
onfocus = function ( titlebar )
local root = titlebar : get_children_by_id ( " titlebar_root " ) [ 1 ]
root : set_bg ( theme.titlebar_bg_focus )
root : set_shape ( function ( cr , width , height )
return gears.shape . partially_rounded_rect ( cr , width , height ,
true , true , false , false , 7 ) end )
end ,
onunfocus = function ( titlebar )
local root = titlebar : get_children_by_id ( " titlebar_root " ) [ 1 ]
root : set_bg ( theme.titlebar_bg_normal )
root : set_shape ( function ( cr , width , height )
return gears.shape . partially_rounded_rect ( cr , width , height ,
true , true , false , false , 7 ) end )
end ,
bg_focus = " #00000000 " ,
bg_normal = " #00000000 " ,
fg_focus = " #FAFAFA " ,
fg_normal = theme.fg_normal ,
size = 22 ,
@ -517,7 +565,7 @@ theme.widgets = {
wibar_top = {
bg_normal = theme.bar_bg_normal ,
fg_normal = theme.fg_normal ,
size = 22
size = 22 ,
} ,
wibar_left = {
bg_normal = " #0D0D0966 " ,
@ -527,6 +575,70 @@ theme.widgets = {
}
}
local wibox = require ( " wibox " )
theme.templates = {
templates = {
titlebar = function ( style )
return function ( layout , options )
local margins = style.titlebar . margins
if ( style.titlebar . left or
style.titlebar . right or
style.titlebar . bottom or
style.titlebar . top ) then
margins = nil
end
return {
{
gears.table . join ( {
layout ,
margins = margins ,
layout = wibox.container . margin ,
left = style.titlebar . left ,
right = style.titlebar . right ,
bottom = style.titlebar . bottom ,
top = style.titlebar . top
} , options or { } ) ,
bgimage = style.titlebar . root_bgimage_normal ,
bg = style.titlebar . root_bg_normal ,
fg = style.titlebar . root_fg_normal ,
shape = style.titlebar . root_shape ,
shape_border_color = style.titlebar . root_shape_border_color ,
shape_border_width = style.titlebar . root_shape_border_width ,
widget = wibox.container . background ,
id = " titlebar_root "
} ,
layout = wibox.container . margin ,
left = style.titlebar . root_margin_left ,
right = style.titlebar . root_margin_right ,
top = style.titlebar . root_margin_top ,
bottom = style.titlebar . root_margin_bottom
}
end
end ,
popup = function ( style )
return function ( widget , options )
return gears.table . join ( {
widget = {
{
widget ,
margins = style.popup . margins ,
layout = wibox.container . margin
} ,
bg = style.popup . bg_normal ,
shape = style.popup . root_shape ,
widget = wibox.container . background
} ,
bg = " #00000000 " ,
shape = style.popup . shape ,
visible = false ,
ontop = true
} , options or { } )
end
end
}
}
return theme
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80