Add 4 new theme variables.
It allows to configure the border of the focus/resize widget arrows.
This commit is contained in:
parent
72c733b537
commit
bd4f3de7f1
18
README.md
18
README.md
|
@ -98,10 +98,7 @@ namespace
|
||||||
## Focus
|
## Focus
|
||||||
|
|
||||||
| Variable | Description |
|
| Variable | Description |
|
||||||
| :---------------------------: | ------------------------------------------------------ |
|
| :---------------------------------: | ------------------------------------------------------ |
|
||||||
| collision_bg_focus | The background of the focus change arrow |
|
|
||||||
| collision_fg_focus | The foregroung filling color of the arrow |
|
|
||||||
| collision_bg_center | The focussed client circle background |
|
|
||||||
| collision_resize_width | The size of the resize handles |
|
| collision_resize_width | The size of the resize handles |
|
||||||
| collision_resize_shape | The gears.shape used for the resize handle |
|
| collision_resize_shape | The gears.shape used for the resize handle |
|
||||||
| collision_resize_border_width | The resize handles border width |
|
| collision_resize_border_width | The resize handles border width |
|
||||||
|
@ -109,13 +106,18 @@ namespace
|
||||||
| collision_resize_padding | The resize handles padding between the boder and arrow |
|
| collision_resize_padding | The resize handles padding between the boder and arrow |
|
||||||
| collision_resize_bg | The resize handles background color |
|
| collision_resize_bg | The resize handles background color |
|
||||||
| collision_resize_fg | The resize handles arrow color |
|
| collision_resize_fg | The resize handles arrow color |
|
||||||
| collision_focus_shape | |
|
| collision_resize_arrow_border_color | The arrow border color |
|
||||||
|
| collision_resize_arrow_border_width | The arrow border width |
|
||||||
|
| collision_focus_shape | The outer shape of the "arrow" widgets |
|
||||||
| collision_focus_border_width | |
|
| collision_focus_border_width | |
|
||||||
| collision_focus_border_color | |
|
| collision_focus_border_color | |
|
||||||
| collision_focus_padding | |
|
| collision_focus_padding | |
|
||||||
| collision_focus_bg | |
|
| collision_focus_bg | The background of the focus change arrow |
|
||||||
| collision_focus_fg | |
|
| collision_focus_fg | The foregroung filling color of the arrow |
|
||||||
| collision_focus_bg_center | |
|
| collision_focus_bg_center | The focussed client circle background |
|
||||||
|
| collision_focus_shape_center | The focused client widget shape (default: circle) |
|
||||||
|
| collision_focus_arrow_border_color | The color of the arrow border |
|
||||||
|
| collision_focus_arrow_border_width | The width of the arrow border |
|
||||||
| collision_screen_shape | |
|
| collision_screen_shape | |
|
||||||
| collision_screen_border_width | |
|
| collision_screen_border_width | |
|
||||||
| collision_screen_border_color | |
|
| collision_screen_border_color | |
|
||||||
|
|
12
focus.lua
12
focus.lua
|
@ -34,6 +34,8 @@ local function init()
|
||||||
local bg_focus = beautiful.collision_focus_bg_center or beautiful.bg_urgent or "#ff0000"
|
local bg_focus = beautiful.collision_focus_bg_center or beautiful.bg_urgent or "#ff0000"
|
||||||
local sw = beautiful.collision_shape_width or 75
|
local sw = beautiful.collision_shape_width or 75
|
||||||
local sh = beautiful.collision_shape_height or 75
|
local sh = beautiful.collision_shape_height or 75
|
||||||
|
local arrow_bc = beautiful.collision_focus_arrow_border_color
|
||||||
|
local arrow_bw = beautiful.collision_focus_arrow_border_width or 0
|
||||||
local cshape = beautiful.collision_focus_shape_center or shape.circle
|
local cshape = beautiful.collision_focus_shape_center or shape.circle
|
||||||
|
|
||||||
for k,v in ipairs({"up","right","down","left","center"}) do
|
for k,v in ipairs({"up","right","down","left","center"}) do
|
||||||
|
@ -45,8 +47,8 @@ local function init()
|
||||||
|
|
||||||
local r_shape = v == "center" and cshape or s
|
local r_shape = v == "center" and cshape or s
|
||||||
local r_bg = v == "center" and bg_focus or bg
|
local r_bg = v == "center" and bg_focus or bg
|
||||||
local x = sw/2 - padding
|
local x = (sw - arrow_bw*2)/2 - padding
|
||||||
local y = sh/2 - padding
|
local y = (sh - arrow_bw*2)/2 - padding
|
||||||
|
|
||||||
wiboxes[v]:setup {
|
wiboxes[v]:setup {
|
||||||
v ~= "center" and {
|
v ~= "center" and {
|
||||||
|
@ -54,10 +56,12 @@ local function init()
|
||||||
{
|
{
|
||||||
widget = wibox.widget.imagebox
|
widget = wibox.widget.imagebox
|
||||||
},
|
},
|
||||||
|
bg = fg,
|
||||||
|
border_color = arrow_bc,
|
||||||
|
border_width = arrow_bw,
|
||||||
|
widget = wibox.container.background,
|
||||||
shape = shape.transform(col_utils.arrow_path2)
|
shape = shape.transform(col_utils.arrow_path2)
|
||||||
: rotate_at(x, y, (k-1)*(2*math.pi)/4),
|
: rotate_at(x, y, (k-1)*(2*math.pi)/4),
|
||||||
bg = fg,
|
|
||||||
widget = wibox.container.background
|
|
||||||
},
|
},
|
||||||
margins = padding,
|
margins = padding,
|
||||||
widget = wibox.container.margin,
|
widget = wibox.container.margin,
|
||||||
|
|
|
@ -36,6 +36,8 @@ local function create_indicators()
|
||||||
local padding = beautiful.collision_resize_padding or 7
|
local padding = beautiful.collision_resize_padding or 7
|
||||||
local bg = beautiful.collision_resize_bg or beautiful.bg_alternate or "#ff0000"
|
local bg = beautiful.collision_resize_bg or beautiful.bg_alternate or "#ff0000"
|
||||||
local fg = beautiful.collision_resize_fg or beautiful.fg_normal or "#0000ff"
|
local fg = beautiful.collision_resize_fg or beautiful.fg_normal or "#0000ff"
|
||||||
|
local arrow_bc = beautiful.collision_resize_arrow_border_color
|
||||||
|
local arrow_bw = beautiful.collision_resize_arrow_border_width or 0
|
||||||
|
|
||||||
for k,v in ipairs(values) do
|
for k,v in ipairs(values) do
|
||||||
local w = wibox {
|
local w = wibox {
|
||||||
|
@ -47,7 +49,7 @@ local function create_indicators()
|
||||||
|
|
||||||
angle = angle + (2*math.pi)/8
|
angle = angle + (2*math.pi)/8
|
||||||
|
|
||||||
local tr = (size - 2*padding) / 2
|
local tr = (size - 2*arrow_bw - 2*padding) / 2
|
||||||
|
|
||||||
w:setup {
|
w:setup {
|
||||||
{
|
{
|
||||||
|
@ -60,6 +62,8 @@ local function create_indicators()
|
||||||
: rotate ( angle )
|
: rotate ( angle )
|
||||||
: translate( -tr,-tr ),
|
: translate( -tr,-tr ),
|
||||||
bg = fg,
|
bg = fg,
|
||||||
|
border_color = arrow_bc,
|
||||||
|
border_width = arrow_bw,
|
||||||
widget = wibox.container.background
|
widget = wibox.container.background
|
||||||
},
|
},
|
||||||
margins = padding,
|
margins = padding,
|
||||||
|
|
Loading…
Reference in New Issue