focus: Add some beautiful options, update documentation
This commit is contained in:
parent
e0f6676a8b
commit
9c0be48833
17
README.md
17
README.md
|
@ -25,7 +25,7 @@ Now, open ~/.config/awesome/rc.lua (or copy /etc/xdg/awesome/rc.lua to
|
|||
and add this line somewhere in your `rc.lua`:
|
||||
|
||||
```lua
|
||||
local collision = require("collision")()
|
||||
require("collision")()
|
||||
```
|
||||
|
||||
It is a very good idea to also change the default `mod4+arrow` shortcut to
|
||||
|
@ -89,6 +89,19 @@ This can be used:
|
|||
Of course, if the `Vim` keys are used, any other shortcut binded to them have to
|
||||
be removed from rc.lua.
|
||||
|
||||
# Appearance
|
||||
|
||||
Collision appearance can be changed in yout theme using the `collision`
|
||||
namespace
|
||||
|
||||
## Focus
|
||||
|
||||
| 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 |
|
||||
|
||||
# Settings
|
||||
|
||||
```lua
|
||||
|
@ -106,4 +119,4 @@ cursor position.
|
|||
|
||||
# Notes
|
||||
|
||||
Using the focus arrows to select empty screens only work in Awesome 3.5.7+
|
||||
Using the focus arrows to select empty screens only work in Awesome 3.5.7+
|
|
@ -24,7 +24,11 @@ local function init()
|
|||
col_utils.draw_round_rect(cr,0,0,75,75,10)
|
||||
cr:fill()
|
||||
|
||||
local bounding,arrow = img._native,col_utils.arrow(55,10,0,beautiful.bg_normal,beautiful.fg_normal)
|
||||
local bounding,arrow = img._native,col_utils.arrow(55,10,0,
|
||||
beautiful.collision_bg_focus or beautiful.bg_normal or "#000000",
|
||||
beautiful.collision_fg_focus or beautiful.fg_normal or "#0000ff"
|
||||
)
|
||||
|
||||
wiboxes = {}
|
||||
for k,v in ipairs({"up","right","down","left","center"}) do
|
||||
wiboxes[v] = wibox({})
|
||||
|
@ -47,7 +51,7 @@ local function init()
|
|||
wiboxes[v].shape_bounding = bounding
|
||||
end
|
||||
end
|
||||
wiboxes["center"]:set_bg(beautiful.bg_urgent)
|
||||
wiboxes["center"]:set_bg(beautiful.collision_bg_center or beautiful.bg_urgent or "#ff0000")
|
||||
local img = cairo.ImageSurface(cairo.Format.ARGB32, 75,75)
|
||||
local cr = cairo.Context(img)
|
||||
col_utils.draw_round_rect(cr,0,0,75,75,75/2)
|
||||
|
|
Loading…
Reference in New Issue