Made the carbon theme prettier
This commit is contained in:
parent
0fb0af5b92
commit
e44aedffc2
|
@ -28,6 +28,7 @@ local dpi = xresources.apply_dpi
|
||||||
local theme = {}
|
local theme = {}
|
||||||
-- {{{ Color definitions
|
-- {{{ Color definitions
|
||||||
-- These variables define a fallback state for all widgets to use.
|
-- These variables define a fallback state for all widgets to use.
|
||||||
|
theme.font = "sans 8"
|
||||||
theme.name = "carbon"
|
theme.name = "carbon"
|
||||||
|
|
||||||
theme.bg_normal = "#19191D"
|
theme.bg_normal = "#19191D"
|
||||||
|
@ -44,7 +45,7 @@ theme.fg_minimize = "#e1dec7"
|
||||||
theme.useless_gap = dpi(10)
|
theme.useless_gap = dpi(10)
|
||||||
theme.border_width = dpi(1)
|
theme.border_width = dpi(1)
|
||||||
theme.border_normal = theme.bg_normal
|
theme.border_normal = theme.bg_normal
|
||||||
theme.border_focus = theme.bg_normal
|
theme.border_focus = theme.bg_focus
|
||||||
theme.border_marked = theme.bg_marked
|
theme.border_marked = theme.bg_marked
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
|
@ -107,11 +108,33 @@ These variables control the spacing of widgets in various layouts.
|
||||||
-- the bar itself. Ideally, all of the variables like these will be documented
|
-- the bar itself. Ideally, all of the variables like these will be documented
|
||||||
-- in the widgets documentation.
|
-- in the widgets documentation.
|
||||||
-- All of the following variables do not belong to any primitive:
|
-- All of the following variables do not belong to any primitive:
|
||||||
theme.unitybar_bg = theme.bg_normal.."FF"
|
theme.unitybar_bg = theme.bg_normal.."AA"
|
||||||
theme.unitybar_border_color = theme.bg_normal
|
theme.unitybar_border_color = theme.bg_normal
|
||||||
theme.unitybar_width = dpi(50)
|
theme.unitybar_width = dpi(50)
|
||||||
theme.unitybar_inner_margin = 3
|
theme.unitybar_inner_margin = 3
|
||||||
|
--Titlebars
|
||||||
|
theme.titlebar_bg_normal = {
|
||||||
|
type = "linear",
|
||||||
|
from = {0,0},
|
||||||
|
to = {0,15},
|
||||||
|
stops = {
|
||||||
|
{0,theme.bg_normal},
|
||||||
|
{1,"#14141A"},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
theme.titlebar_bg_focus = {
|
||||||
|
type = "linear",
|
||||||
|
from = {0,0},
|
||||||
|
to = {0,15},
|
||||||
|
stops = {
|
||||||
|
{0,theme.bg_focus},
|
||||||
|
{1,"#333333"}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Top bar
|
||||||
|
theme.topbar_bg = theme.titlebar_bg_normal
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
-- {{{ Widgets
|
-- {{{ Widgets
|
||||||
|
@ -137,8 +160,8 @@ An additional note should be made about the fact that these variables
|
||||||
affect every instance of the widget, i.e. if you have a battery
|
affect every instance of the widget, i.e. if you have a battery
|
||||||
widget in a wibar and another battery widget on the lock screen,
|
widget in a wibar and another battery widget on the lock screen,
|
||||||
both will be affected by the definiton of
|
both will be affected by the definiton of
|
||||||
`theme.batter_container_bg_normal`. To affect a particular widget's
|
`theme.batter_container_bg_normal`. To change a particular widget's
|
||||||
style properties, use the `style` table in its arguments table.
|
style properties, use the `style` table in its arguments table. (It should also be noted that `style` table has higher priority then theme variables)
|
||||||
i.e. in .../awesome/core/layout.lua
|
i.e. in .../awesome/core/layout.lua
|
||||||
```
|
```
|
||||||
require("widget.drawer")({ --This creates an instance of a widget
|
require("widget.drawer")({ --This creates an instance of a widget
|
||||||
|
@ -156,84 +179,92 @@ theme.menu_height = dpi(18)
|
||||||
theme.menu_width = dpi(140)
|
theme.menu_width = dpi(140)
|
||||||
--`button` is any clickable/hoverable element of the menu
|
--`button` is any clickable/hoverable element of the menu
|
||||||
theme.menu_button_height = dpi(18)
|
theme.menu_button_height = dpi(18)
|
||||||
theme.menu_button_rounding = 4
|
theme.menu_button_rounding = 5
|
||||||
theme.menu_button_inner_margin = 2
|
theme.menu_button_inner_margin = 2
|
||||||
--`container` is the background of the menu
|
--`container` is the background of the menu
|
||||||
theme.menu_container_spacing = 4
|
theme.menu_container_spacing = 4
|
||||||
theme.menu_container_rounding = 4
|
theme.menu_container_rounding = 5
|
||||||
--`icon` is any of the small power icons in the menu
|
--`icon` is any of the small power icons in the menu
|
||||||
--because `menu` applies generally to all of the menus,
|
--because `menu` applies generally to all of the menus,
|
||||||
--including the popup menus that appear when you click on an icon
|
--including the popup menus that appear when you click on an icon
|
||||||
--of the window, these particular icons have their own namespace.
|
--of the window, these particular icons have their own namespace.
|
||||||
--(to be completely honest i'm not exactly proud of how this works)
|
--(to be completely honest i'm not exactly proud of how this works)
|
||||||
theme.powercontrol_icon_rounding = 4
|
theme.powercontrol_icon_rounding = 5
|
||||||
|
|
||||||
|
|
||||||
--[[ Another thing that should be noted is that it's possible to
|
|
||||||
override primitve templates on a per-widget basis. For example, it's
|
|
||||||
possible to add some custom static elements to the buttons in
|
|
||||||
launcher widget and tasklist widget. Although to do this safely, you
|
|
||||||
might want to consider reading the original templates in
|
|
||||||
.../awesome/libs/awmtk.lua ]]
|
|
||||||
|
|
||||||
-- Calculate height/width of the button
|
-- Calculate height/width of the button
|
||||||
local button_size = theme.unitybar_width - theme.unitybar_inner_margin*2
|
local button_size = theme.unitybar_width - theme.unitybar_inner_margin*2
|
||||||
|
|
||||||
-- Launcher
|
-- All of the basic elements (container, button, icon, etc.) have a template. A
|
||||||
theme.launcher_button_rounding = 4
|
-- template defines the generic geometry properties of the given element. It's
|
||||||
-- Modifying the button template
|
-- possible to override these templates (even on a per-widget basis, as shown
|
||||||
-- All templates are functions that receive a processed style
|
-- here).
|
||||||
-- so that it would be possible to overwrite template variables.
|
|
||||||
|
|
||||||
-- There are two "special id's" that define the root of the template
|
-- Disclaimer: This particular feature was mostly developed as an afterthought,
|
||||||
-- (the furthest outer element) and the container point
|
-- and it might change in the future to provide a more flexible approach to
|
||||||
-- (the innermost element). widget_background is used by some
|
-- handling events. Use at your own risk and only if you know what you're doing
|
||||||
-- widgets to set the background value on event. widget_container is
|
-- or at the very least have some understanding of AwesomeWM's wibox library.
|
||||||
-- used as an anchor point which is populated by the contents of the
|
|
||||||
-- widget after processing.
|
|
||||||
|
|
||||||
-- Example: this templates overrides all menus in such a way
|
-- Example: this templates overrides the template of the container for all menus
|
||||||
-- that all of them will contain a gradient bar on top.
|
-- in such a way that all of them will contain a gradient bar and a border
|
||||||
|
-- (awful.popup isn't capable of gradient borders, but using two backgroudnds
|
||||||
|
-- it's possible to make it work)
|
||||||
theme.menu_container_widget = function(style)
|
theme.menu_container_widget = function(style)
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
-- weirdly enough i can't just set forced_height
|
|
||||||
-- for the container itself.
|
|
||||||
{
|
{
|
||||||
widget = wibox.widget.textbox,
|
{
|
||||||
forced_height = 8
|
{
|
||||||
|
-- (weirdly enough i can't just set forced_height
|
||||||
|
-- for the container itself.)
|
||||||
|
{
|
||||||
|
widget = wibox.widget.textbox,
|
||||||
|
forced_height = 8
|
||||||
|
},
|
||||||
|
widget = wibox.container.background,
|
||||||
|
bg = {
|
||||||
|
type = "linear",
|
||||||
|
from = {0,0},
|
||||||
|
to = {0,8},
|
||||||
|
stops = {
|
||||||
|
{0, theme.bg_focus},
|
||||||
|
{1, theme.bg_normal},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
-- widget_container id indicates the widget which
|
||||||
|
-- will be populated with the contents of the
|
||||||
|
-- element (i.e. menu buttons, in this case)
|
||||||
|
id = "widget_container",
|
||||||
|
widget = wibox.container.margin,
|
||||||
|
margins = style.container_inner_margin
|
||||||
|
},
|
||||||
|
layout = wibox.layout.fixed.vertical
|
||||||
|
},
|
||||||
|
bg = style.container_bg_normal,
|
||||||
|
widget = wibox.container.background,
|
||||||
},
|
},
|
||||||
widget = wibox.container.background,
|
layout = wibox.layout.fixed.vertical,
|
||||||
bg = {
|
|
||||||
type = "linear",
|
|
||||||
from = {0,0},
|
|
||||||
to = {0,8},
|
|
||||||
stops = {
|
|
||||||
{0, theme.bg_focus},
|
|
||||||
{1, theme.bg_normal},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
widget = wibox.container.margin,
|
||||||
id = "widget_container",
|
margins = style.container_shape_border_width,
|
||||||
widget = wibox.container.margin,
|
|
||||||
margins = style.container_inner_margin,
|
|
||||||
},
|
|
||||||
layout = wibox.layout.fixed.vertical,
|
|
||||||
},
|
},
|
||||||
bg = style.container_bg_normal,
|
bg = style.container_shape_border_color,
|
||||||
id = "widget_background",
|
|
||||||
widget = wibox.container.background,
|
widget = wibox.container.background,
|
||||||
shape = style.container_shape,
|
shape = style.container_shape,
|
||||||
shape_border_width = style.container_shape_border_width,
|
fg = style.container_fg_normal,
|
||||||
shape_border_color = style.container_shape_border_color,
|
-- This id should indicate the part of the widget which should
|
||||||
fg = style.container_fg_normal
|
-- change depending on certain events. Although this is useful for
|
||||||
|
-- buttons, it's completely useless for containers. This behaviour might
|
||||||
|
-- change in the future in favor of using callbacks instead of ids.
|
||||||
|
id = "widget_background"
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Note that even after modifying the template, all of the variables
|
-- Note that even after modifying the template, all of the variables
|
||||||
-- are still usable
|
-- are still usable (if you copied the template from the AWMTK library or made
|
||||||
|
-- your template compatible, of course)
|
||||||
theme.menu_container_shape_border_width = dpi(1)
|
theme.menu_container_shape_border_width = dpi(1)
|
||||||
theme.menu_container_shape_border_color = {
|
theme.menu_container_shape_border_color = {
|
||||||
type = "linear",
|
type = "linear",
|
||||||
|
@ -246,6 +277,45 @@ theme.menu_container_shape_border_color = {
|
||||||
}
|
}
|
||||||
-- Tasklist
|
-- Tasklist
|
||||||
theme.tasklist_button_rounding = 4
|
theme.tasklist_button_rounding = 4
|
||||||
|
-- These are defined as usual rather than using the awmtk style
|
||||||
|
theme.tasklist_bg_normal = {
|
||||||
|
type = "linear",
|
||||||
|
from = {0,0},
|
||||||
|
to = {0,button_size},
|
||||||
|
stops = {
|
||||||
|
{0,"#18181F"},
|
||||||
|
{0.4,"#262626"},
|
||||||
|
{1,"#18181F"}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
theme.tasklist_bg_focus = {
|
||||||
|
type = "linear",
|
||||||
|
from = {0,0},
|
||||||
|
to = {0,button_size},
|
||||||
|
stops = {
|
||||||
|
{0,"#363636"},
|
||||||
|
{0.4,"#424242"},
|
||||||
|
{1,"#363636"}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
theme.tasklist_button_shape_border_color = {
|
||||||
|
type = "linear",
|
||||||
|
from = {0,0},
|
||||||
|
to = {0,button_size},
|
||||||
|
stops = {
|
||||||
|
{0,"#212124"},
|
||||||
|
{0.4,"#2E2E2E"},
|
||||||
|
{1,"#212124"}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
theme.tasklist_button_shape_border_width = dpi(1)
|
||||||
|
|
||||||
|
-- Launcher
|
||||||
|
theme.launcher_button_rounding = 4
|
||||||
|
theme.launcher_button_bg_normal = theme.tasklist_bg_normal
|
||||||
|
theme.launcher_button_bg_focus = theme.tasklist_bg_focus
|
||||||
|
theme.launcher_button_bg_shape_border_color = theme.tasklist_button_bg_shape_border_color
|
||||||
|
theme.launcher_button_bg_shape_border_width = dpi(1)
|
||||||
|
|
||||||
-- Hotkeys
|
-- Hotkeys
|
||||||
theme.hotkeys_border_color = "#262626"
|
theme.hotkeys_border_color = "#262626"
|
||||||
|
@ -259,6 +329,18 @@ theme.taglist_squares_sel = theme_assets.taglist_squares_sel(
|
||||||
theme.taglist_squares_unsel = theme_assets.taglist_squares_unsel(
|
theme.taglist_squares_unsel = theme_assets.taglist_squares_unsel(
|
||||||
taglist_square_size, theme.fg_normal
|
taglist_square_size, theme.fg_normal
|
||||||
)
|
)
|
||||||
|
|
||||||
|
-- Wallpaper switcher
|
||||||
|
theme.wallpapers_button_rounding = 5
|
||||||
|
theme.wallpapers_container_rounding = 5
|
||||||
|
|
||||||
|
-- Notifications widget
|
||||||
|
theme.mailbox_button_rounding = 5
|
||||||
|
theme.mailbox_container_rounding = 5
|
||||||
|
|
||||||
|
-- Volume slider
|
||||||
|
theme.volume_container_rounding = 5
|
||||||
|
|
||||||
-- Notifications
|
-- Notifications
|
||||||
-- (these are untouched as of now and don't fall under AWMTK configuration model. this might change in the future)
|
-- (these are untouched as of now and don't fall under AWMTK configuration model. this might change in the future)
|
||||||
theme.notification_width = dpi(250)
|
theme.notification_width = dpi(250)
|
||||||
|
|
Loading…
Reference in New Issue