add option for border color_hover
This commit is contained in:
parent
dc2adb634b
commit
21340d3446
|
@ -71,6 +71,7 @@ Customization:
|
|||
| `button_top_size` | `button_size` | size of top button |
|
||||
| `color_normal` | "#56666f" | border color |
|
||||
| `color_focus` | "#a1bfcf" | border color when client is focused |
|
||||
| `color_hover` | nil | border color on border hover |
|
||||
| `color_maximize_normal` | "#a9dd9d" | color of maximize button |
|
||||
| `color_maximize_focus` | "#a9dd9d" | color of maximize button when client is focused |
|
||||
| `color_maximize_hover` | "#c3f7b7" | color of maximize button on mouse hover |
|
||||
|
|
15
init.lua
15
init.lua
|
@ -158,6 +158,7 @@ local function new(config)
|
|||
|
||||
local color_normal = cfg.color_normal or "#56666f"
|
||||
local color_focus = cfg.color_focus or "#a1bfcf"
|
||||
local color_hover = cfg.color_hover or nil
|
||||
|
||||
local button_size = cfg.button_size or dpi(40)
|
||||
local spacing_widget = cfg.spacing_widget or nil
|
||||
|
@ -366,6 +367,20 @@ local function new(config)
|
|||
handle_button_press(c, button)
|
||||
end)
|
||||
|
||||
|
||||
if color_hover then
|
||||
border_bg:connect_signal("mouse::enter", function()
|
||||
border_bg.bg = color_hover
|
||||
end)
|
||||
border_bg:connect_signal("mouse::leave", function()
|
||||
if client.focus == c then
|
||||
border_bg.bg = color_focus
|
||||
else
|
||||
border_bg.bg = color_normal
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
local border_expander, border_expander_center
|
||||
|
||||
if layout == "fixed" then
|
||||
|
|
Loading…
Reference in New Issue