All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@git.madduck.net.
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
4 Licensed under GNU General Public License v2
5 * (c) 2015, Luke Bonham
6 * (c) 2015, plotnikovanton
10 local wibox = require("wibox")
11 local gears = require("gears")
13 -- Lain Cairo separators util submodule
14 -- lain.util.separators
15 local separators = { height = 0, width = 9 }
20 function separators.arrow_right(col1, col2)
21 local widget = wibox.widget.base.make_widget()
23 widget.fit = function(m, w, h)
24 return separators.width, separators.height
27 widget.draw = function(mycross, wibox, cr, width, height)
28 if col2 ~= "alpha" then
29 cr:set_source_rgb(gears.color.parse_color(col2))
32 cr:line_to(width, height/2)
39 cr:line_to(width, height/2)
40 cr:line_to(width, height)
45 if col1 ~= "alpha" then
46 cr:set_source_rgb(gears.color.parse_color(col1))
49 cr:line_to(width, height/2)
60 function separators.arrow_left(col1, col2)
61 local widget = wibox.widget.base.make_widget()
63 widget.fit = function(m, w, h)
64 return separators.width, separators.height
67 widget.draw = function(mycross, wibox, cr, width, height)
68 if col1 ~= "alpha" then
69 cr:set_source_rgb(gears.color.parse_color(col1))
72 cr:line_to(0, height/2)
78 cr:move_to(width, height)
79 cr:line_to(0, height/2)
85 if col2 ~= "alpha" then
88 cr:line_to(0, height/2)
89 cr:line_to(width, height)
92 cr:set_source_rgb(gears.color.parse_color(col2))